diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-03-01 18:54:06 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-03-06 10:50:41 +0100 |
commit | cf68c22f106369f6124342c58c4a50f07edd2174 (patch) | |
tree | 33c4836505f94a9c3f1e309e6b6471497505773a /drivers/media/usb/em28xx/em28xx-cards.c | |
parent | media: em28xx: constify most static structs (diff) | |
download | linux-cf68c22f106369f6124342c58c4a50f07edd2174.tar.xz linux-cf68c22f106369f6124342c58c4a50f07edd2174.zip |
media: em28xx: adjust I2C timeout according with I2C speed
If the I2C speed is too slow, it should wait more for an
answer.
While here, change disconnected type from char to unsigned
int, just like all other bitmask fields there at em28xx
struct.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-cards.c')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-cards.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index 5277f1cda253..fc4654f7eece 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -2704,6 +2704,8 @@ static inline void em28xx_set_xclk_i2c_speed(struct em28xx *dev) i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_100_KHZ; + dev->i2c_speed = i2c_speed & 0x03; + if (!dev->board.is_em2800) em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, i2c_speed); msleep(50); |