diff options
author | Daniel Scheller <d.scheller@gmx.net> | 2017-03-29 13:43:11 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-06-20 09:27:52 -0300 |
commit | dbbac11e1de1250ad39bbc15490c8614ac7f9def (patch) | |
tree | 6f42853ce57462cab64b902231d764a37ba8da72 /drivers/media/dvb-frontends/stv0367.h | |
parent | 2cafa6b288b61137dc2525efa18d1004fdeb783b (diff) | |
download | op-kernel-dev-dbbac11e1de1250ad39bbc15490c8614ac7f9def.zip op-kernel-dev-dbbac11e1de1250ad39bbc15490c8614ac7f9def.tar.gz |
[media] dvb-frontends/stv0367: add Digital Devices compatibility
This - in conjunction with the previous changes - makes it possible to use
the STV0367 DVB-C/T demodulator driver with Digital Devices hardware having
this demodulator soldered on them (namely CineCTv6 bridges and some earlier
DuoFlex CT addon modules).
The changes do the following:
- add a third *_attach function which will make use of a third frontend_ops
struct which announces both -C and -T support (the same as with DD's own
driver stv0367dd). This is necessary to support both delivery systems
on one FE without having to do large conversions to VB2 or the need to
select either -C or -T mode via modparams and the like. Additionally,
the frontend_ops point to new "glue" functions which will then call into
the existing functionality depending on the active delivery system/demod
state (all used functionality works almost OOTB).
- Demod initialisation has been ported from stv0367dd. DD's driver always
does a full init of both OFDM and QAM cores, with some additional things.
The active delivery system is remembered and upon switch, the Demod will
be reconfigured to work in OFDM or QAM mode (that's what the ddb_setup_XX
functions are used for). Note that in QAM mode, the DD demods work with
an IC speed of 58Mhz. It's not very good to perform full reinits upon
Demod mode changes since in very rare occasions this can lead to the I2C
interface or the whole Demod to crash, requiring a powercycle, thus the
flag to perform full reinit is set to disabled.
- A little enum is added for named identifiers of the current Demod state.
Initialisation code/register writes originate from stv0367dd. Permission
to reuse was formally granted by Ralph Metzler <rjkm@metzlerbros.de>.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-frontends/stv0367.h')
-rw-r--r-- | drivers/media/dvb-frontends/stv0367.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/stv0367.h b/drivers/media/dvb-frontends/stv0367.h index aaa0236..8f7a314 100644 --- a/drivers/media/dvb-frontends/stv0367.h +++ b/drivers/media/dvb-frontends/stv0367.h @@ -44,6 +44,9 @@ dvb_frontend *stv0367ter_attach(const struct stv0367_config *config, extern struct dvb_frontend *stv0367cab_attach(const struct stv0367_config *config, struct i2c_adapter *i2c); +extern struct +dvb_frontend *stv0367ddb_attach(const struct stv0367_config *config, + struct i2c_adapter *i2c); #else static inline struct dvb_frontend *stv0367ter_attach(const struct stv0367_config *config, @@ -59,6 +62,13 @@ dvb_frontend *stv0367cab_attach(const struct stv0367_config *config, printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); return NULL; } +static inline struct +dvb_frontend *stv0367ddb_attach(const struct stv0367_config *config, + struct i2c_adapter *i2c) +{ + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); + return NULL; +} #endif #endif |