diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-10-17 03:53:02 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-17 16:40:50 -0400 |
commit | 236088d215fd0a7144376641eea97785375fd364 (patch) | |
tree | b48c0b7997aa613d34b8e1ddb78e73d445ce482f /drivers/media | |
parent | 0bc99b5cf71e5598a94a0e82b5e45b27c7a97ba1 (diff) |
V4L/DVB (9289): gspca: Other sensor identified as om6802 in t613.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/gspca/t613.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/media/video/gspca/t613.c b/drivers/media/video/gspca/t613.c index 6aa3bca91b2f..c0beedc6b5db 100644 --- a/drivers/media/video/gspca/t613.c +++ b/drivers/media/video/gspca/t613.c | |||
@@ -50,7 +50,7 @@ struct sd { | |||
50 | 50 | ||
51 | __u8 sensor; | 51 | __u8 sensor; |
52 | #define SENSOR_TAS5130A 0 | 52 | #define SENSOR_TAS5130A 0 |
53 | #define SENSOR_OTHER 1 | 53 | #define SENSOR_OM6802 1 |
54 | }; | 54 | }; |
55 | 55 | ||
56 | /* V4L2 controls supported by the driver */ | 56 | /* V4L2 controls supported by the driver */ |
@@ -416,7 +416,8 @@ static void reg_w_buf(struct gspca_dev *gspca_dev, | |||
416 | } | 416 | } |
417 | } | 417 | } |
418 | 418 | ||
419 | static void other_sensor_init(struct gspca_dev *gspca_dev) | 419 | /* Reported as OM6802*/ |
420 | static void om6802_sensor_init(struct gspca_dev *gspca_dev) | ||
420 | { | 421 | { |
421 | int i; | 422 | int i; |
422 | const __u8 *p; | 423 | const __u8 *p; |
@@ -557,10 +558,13 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
557 | byte = reg_r(gspca_dev, 0x06); | 558 | byte = reg_r(gspca_dev, 0x06); |
558 | test_byte = reg_r(gspca_dev, 0x07); | 559 | test_byte = reg_r(gspca_dev, 0x07); |
559 | if (byte == 0x08 && test_byte == 0x07) { | 560 | if (byte == 0x08 && test_byte == 0x07) { |
560 | PDEBUG(D_CONF, "other sensor"); | 561 | PDEBUG(D_CONF, "sensor om6802"); |
561 | sd->sensor = SENSOR_OTHER; | 562 | sd->sensor = SENSOR_OM6802; |
563 | } else if (byte == 0x08 && test_byte == 0x01) { | ||
564 | PDEBUG(D_CONF, "sensor tas5130a"); | ||
565 | sd->sensor = SENSOR_TAS5130A; | ||
562 | } else { | 566 | } else { |
563 | PDEBUG(D_CONF, "sensor %02x %02x", byte, test_byte); | 567 | PDEBUG(D_CONF, "unknown sensor %02x %02x", byte, test_byte); |
564 | sd->sensor = SENSOR_TAS5130A; | 568 | sd->sensor = SENSOR_TAS5130A; |
565 | } | 569 | } |
566 | 570 | ||
@@ -771,7 +775,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
771 | sizeof tas5130a_sensor_init[0]); | 775 | sizeof tas5130a_sensor_init[0]); |
772 | reg_w(gspca_dev, 0x3c80); | 776 | reg_w(gspca_dev, 0x3c80); |
773 | } else { | 777 | } else { |
774 | other_sensor_init(gspca_dev); | 778 | om6802_sensor_init(gspca_dev); |
775 | } | 779 | } |
776 | /* just in case and to keep sync with logs (for mine) */ | 780 | /* just in case and to keep sync with logs (for mine) */ |
777 | reg_w_buf(gspca_dev, t1, sizeof t1); | 781 | reg_w_buf(gspca_dev, t1, sizeof t1); |