aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tda8290.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tda8290.c')
-rw-r--r--drivers/media/video/tda8290.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c
index 18e6a09642fa..f0191babe40c 100644
--- a/drivers/media/video/tda8290.c
+++ b/drivers/media/video/tda8290.c
@@ -746,6 +746,22 @@ int tda829x_probe(struct tuner *t)
746 unsigned char restore_9886[] = { 0x00, 0xd6, 0x30 }; 746 unsigned char restore_9886[] = { 0x00, 0xd6, 0x30 };
747 unsigned char addr_dto_lsb = 0x07; 747 unsigned char addr_dto_lsb = 0x07;
748 unsigned char data; 748 unsigned char data;
749#define PROBE_BUFFER_SIZE 8
750 unsigned char buf[PROBE_BUFFER_SIZE];
751 int i;
752
753 /* rule out tda9887, which would return the same byte repeatedly */
754 tuner_i2c_xfer_send(&i2c_props, soft_reset, 1);
755 tuner_i2c_xfer_recv(&i2c_props, buf, PROBE_BUFFER_SIZE);
756 for (i = 1; i < PROBE_BUFFER_SIZE; i++) {
757 if (buf[i] == buf[0])
758 continue;
759 break;
760 }
761
762 /* all bytes are equal, not a tda829x - probably a tda9887 */
763 if (i == PROBE_BUFFER_SIZE)
764 return -ENODEV;
749 765
750 if ((tda8290_probe(&i2c_props) == 0) || 766 if ((tda8290_probe(&i2c_props) == 0) ||
751 (tda8295_probe(&i2c_props) == 0)) 767 (tda8295_probe(&i2c_props) == 0))