summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/ngene/ngene.h
diff options
context:
space:
mode:
authorDaniel Scheller <d.scheller@gmx.net>2018-02-25 13:31:32 +0100
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-03-06 16:59:04 +0100
commit1c2ad82e537d735863030e153769c900edb01d8f (patch)
tree2839d11228a7794385435fef949e72730767361e /drivers/media/pci/ngene/ngene.h
parentmedia: ngene: use defines to identify the demod_type (diff)
downloadlinux-1c2ad82e537d735863030e153769c900edb01d8f.tar.xz
linux-1c2ad82e537d735863030e153769c900edb01d8f.zip
media: ngene: support STV0367 DVB-C/T DuoFlex addons
Add support for STV0367+TDA18212 based DuoFlex CT addon modules. For this, add a demod probe function and all necessary demod/tuner attach functions which use existing auxiliary drivers (stv0367 and tda18212) to support this hardware. As tda18212 is an I2C client driver, proper cleanup code is added to the deregistration sequence in ngene-core. To not cause use- after-free situations when there's a CXD2099 I2C client connected, which is rather freed in ngene-core.c:cxd_detach(), add i2c_client_fe to struct ngene_channel to keep track if the i2c_client was allocated by a frontend driver, rather than the CI code paths. Also move the I2C access functions to the top of the file and add the required read_regs() function for the tda18212 ping to work. This adds autoselection (if MEDIA_SUBDRV_AUTOSELECT) of the STV0367 demod driver and TDA18212 tuner driver to Kconfig aswell. Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/ngene/ngene.h')
-rw-r--r--drivers/media/pci/ngene/ngene.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/pci/ngene/ngene.h b/drivers/media/pci/ngene/ngene.h
index 9724701a3274..1b88a9aa7aac 100644
--- a/drivers/media/pci/ngene/ngene.h
+++ b/drivers/media/pci/ngene/ngene.h
@@ -53,6 +53,7 @@
#define DEMOD_TYPE_STV090X 0
#define DEMOD_TYPE_DRXK 1
+#define DEMOD_TYPE_STV0367 2
enum STREAM {
STREAM_VIDEOIN1 = 0, /* ITU656 or TS Input */
@@ -634,6 +635,7 @@ struct ngene_channel {
struct device device;
struct i2c_adapter i2c_adapter;
struct i2c_client *i2c_client[1];
+ int i2c_client_fe;
struct ngene *dev;
int number;