Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (12312): stv0900: fix i2c repeater configuration must be set to manual

In automatic mode every stop event on SDA line ends repetition.
However, in NetUP Dual card on the same i2c bus we have several devices.
If someone using both adapters to lock simultaneously or working with CAM interface
during lock procedure, it lead to end repetition prematurely quite often.
Set stv0900 i2c repeater to manual mode prevents such situation.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Abylay Ospan and committed by
Mauro Carvalho Chehab
fc7e4a3e 644c7ef0

+4 -4
+4 -4
drivers/media/dvb/frontends/stv0900_core.c
··· 230 230 stv0900_write_reg(i_params, R0900_P2_DMDISTATE, 0x5c); 231 231 stv0900_write_reg(i_params, R0900_P1_TNRCFG, 0x6c); 232 232 stv0900_write_reg(i_params, R0900_P2_TNRCFG, 0x6f); 233 - stv0900_write_reg(i_params, R0900_P1_I2CRPT, 0x24); 234 - stv0900_write_reg(i_params, R0900_P2_I2CRPT, 0x24); 233 + stv0900_write_reg(i_params, R0900_P1_I2CRPT, 0x20); 234 + stv0900_write_reg(i_params, R0900_P2_I2CRPT, 0x20); 235 235 stv0900_write_reg(i_params, R0900_NCOARSE, 0x13); 236 236 msleep(3); 237 237 stv0900_write_reg(i_params, R0900_I2CCFG, 0x08); ··· 370 370 u32 fi2c; 371 371 372 372 dmd_reg(fi2c, F0900_P1_I2CT_ON, F0900_P2_I2CT_ON); 373 - if (enable) 374 - stv0900_write_bits(i_params, fi2c, 1); 373 + 374 + stv0900_write_bits(i_params, fi2c, enable); 375 375 376 376 return 0; 377 377 }