This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media_tree.git tree:
Subject: [media] gspca - sonixj: Simplify and clarify the hv7131r probe function Author: Jean-François Moine <[email protected]> Date: Fri Oct 29 08:10:37 2010 -0300 Signed-off-by: Jean-François Moine <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> drivers/media/video/gspca/sonixj.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) --- http://git.linuxtv.org/media_tree.git?a=commitdiff;h=ba2c226dc03135e50e8d72b86477b8074ceea3b9 diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 330dadc..2229847 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c @@ -1579,22 +1579,22 @@ static void i2c_w_seq(struct gspca_dev *gspca_dev, } } +/* check the ID of the hv7131 sensor */ +/* this sequence is needed because it activates the sensor */ static void hv7131r_probe(struct gspca_dev *gspca_dev) { - i2c_w1(gspca_dev, 0x02, 0); /* sensor wakeup */ + i2c_w1(gspca_dev, 0x02, 0); /* sensor wakeup */ msleep(10); - reg_w1(gspca_dev, 0x02, 0x66); /* Gpio on */ + reg_w1(gspca_dev, 0x02, 0x66); /* Gpio on */ msleep(10); - i2c_r(gspca_dev, 0, 5); /* read sensor id */ - if (gspca_dev->usb_buf[0] == 0x02 + i2c_r(gspca_dev, 0, 5); /* read sensor id */ + if (gspca_dev->usb_buf[0] == 0x02 /* chip ID (02 is R) */ && gspca_dev->usb_buf[1] == 0x09 - && gspca_dev->usb_buf[2] == 0x01 - && gspca_dev->usb_buf[3] == 0x00 - && gspca_dev->usb_buf[4] == 0x00) { - PDEBUG(D_PROBE, "Sensor sn9c102P HV7131R found"); + && gspca_dev->usb_buf[2] == 0x01) { + PDEBUG(D_PROBE, "Sensor HV7131R found"); return; } - PDEBUG(D_PROBE, "Sensor 0x%02x 0x%02x 0x%02x - sn9c102P not found", + warn("Erroneous HV7131R ID 0x%02x 0x%02x 0x%02x", gspca_dev->usb_buf[0], gspca_dev->usb_buf[1], gspca_dev->usb_buf[2]); } _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
