saa7134: fix warm Medion 7134 EEPROM read
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Sat, 2 Jul 2016 23:27:46 +0000 (20:27 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jul 2017 10:16:17 +0000 (12:16 +0200)
commitfb2dc28cf20a25707b2165d7227d09d33fc44f7a
tree299579d281d4bdc2d7cbec18c45d256fd92d8dc3
parent81ba752aa4761261e9caa32c6706703286b96e98
saa7134: fix warm Medion 7134 EEPROM read

commit 5a91206ff0d0548939f3e85a65fb76b400fb0e89 upstream.

When saa7134 module driving a Medion 7134 card is reloaded reads of this
card EEPROM (required for automatic detection of tuner model) will be
corrupted due to I2C gate in DVB-T demod being left closed.
This sometimes also happens on first saa7134 module load after a warm
reboot.

Fix this by opening this I2C gate before doing EEPROM read during i2c
initialization.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/pci/saa7134/saa7134-i2c.c