提交 3e5cbad0 编写于 作者: E Erik Andr?n 提交者: Mauro Carvalho Chehab

V4L/DVB (11474): gspca - m5602-po1030: Fix sensor probing.

The po1030 read sensor are currently returning the contents of the address+1 fix the probing of the sensor to cope with this. Obviously this needs to be tracked down and fixed.
Signed-off-by: NErik Andr?n <erik.andren@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 d9a11e28
...@@ -157,7 +157,7 @@ static void po1030_dump_registers(struct sd *sd); ...@@ -157,7 +157,7 @@ static void po1030_dump_registers(struct sd *sd);
int po1030_probe(struct sd *sd) int po1030_probe(struct sd *sd)
{ {
u8 dev_id_h = 0, dev_id_l = 0, i; u8 dev_id_h = 0, i;
s32 *sensor_settings; s32 *sensor_settings;
if (force_sensor) { if (force_sensor) {
...@@ -185,10 +185,7 @@ int po1030_probe(struct sd *sd) ...@@ -185,10 +185,7 @@ int po1030_probe(struct sd *sd)
if (m5602_read_sensor(sd, PO1030_DEVID_H, &dev_id_h, 1)) if (m5602_read_sensor(sd, PO1030_DEVID_H, &dev_id_h, 1))
return -ENODEV; return -ENODEV;
if (m5602_read_sensor(sd, PO1030_DEVID_L, &dev_id_l, 1)) if (dev_id_h == 0x30) {
return -ENODEV;
if ((dev_id_h == 0x10) && (dev_id_l == 0x30)) {
info("Detected a po1030 sensor"); info("Detected a po1030 sensor");
goto sensor_found; goto sensor_found;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册