aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
diff options
context:
space:
mode:
authorDaniel Scheller <d.scheller@gmx.net>2017-04-09 16:38:16 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-06-20 09:45:20 -0300
commitc7518d13f70e62e2af3a30858a977365811783df (patch)
tree219f5defb93f5fbeed611c293b8eb3f0585892cc /drivers/media/pci/netup_unidvb/netup_unidvb_core.c
parent[media] dvb-frontends/cxd2841er: add variable for configuration flags (diff)
downloadlinux-dev-c7518d13f70e62e2af3a30858a977365811783df.tar.xz
linux-dev-c7518d13f70e62e2af3a30858a977365811783df.zip
[media] dvb-frontends/cxd2841er: make call to i2c_gate_ctrl optional
Some cards/bridges wrap i2c_gate_ctrl handling with a mutex_lock(). This is e.g. done in ddbridge to protect against concurrent tuner access with regards to the dual tuner HW, where concurrent tuner reconfiguration can result in tuning fails or bad reception quality. When the tuner driver additionally tries to open the I2C gate (which e.g. the tda18212 driver does) when the demod already did this, this will lead to a deadlock. This makes the calls to i2c_gatectrl from the demod driver optional when the flag is set, leaving this to the tuner driver. For readability reasons and to not have the check duplicated multiple times, the setup is factored into cxd2841er_tuner_set(). This commit also updates the netup card driver (which seems to be the only consumer of the cxd2841er as of now). Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Acked-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/netup_unidvb/netup_unidvb_core.c')
-rw-r--r--drivers/media/pci/netup_unidvb/netup_unidvb_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
index 9444483fb942..48b9cd773988 100644
--- a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
+++ b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
@@ -122,7 +122,8 @@ static void netup_unidvb_queue_cleanup(struct netup_dma *dma);
static struct cxd2841er_config demod_config = {
.i2c_addr = 0xc8,
- .xtal = SONY_XTAL_24000
+ .xtal = SONY_XTAL_24000,
+ .flags = CXD2841ER_USE_GATECTRL
};
static struct horus3a_config horus3a_conf = {