summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx/em28xx.h
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2013-03-26 16:38:36 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-28 20:37:45 (GMT)
commita3ea4bf98bc8499e64b619808fcca09ca3eb4e2f (patch)
tree0e4e41e215a6008bd6f0131a7dd90350223f9147 /drivers/media/usb/em28xx/em28xx.h
parent80f23305ba43f9eda9596092735bffc283b9ae8d (diff)
downloadlinux-fsl-qoriq-a3ea4bf98bc8499e64b619808fcca09ca3eb4e2f.tar.xz
[media] em28xx: add support for em25xx i2c bus B read/write/check device operations
The webcam "SpeedLink VAD Laplace" (em2765 + ov2640) uses a special algorithm for i2c communication with the sensor, which is connected to a second i2c bus. We don't know yet how to find out which devices support/use it. It's very likely used by all em25xx and em276x+ bridges. Tests with other em28xx chips (em2820, em2882/em2883) show, that this algorithm always succeeds there although no slave device is connected. The algorithm likely also works for real i2c client devices (OV2640 uses SCCB), because the Windows driver seems to use it for probing Samsung and Kodak sensors. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx.h')
-rw-r--r--drivers/media/usb/em28xx/em28xx.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
index 4c667fd..aeee896 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -461,10 +461,17 @@ struct em28xx_fh {
enum v4l2_buf_type type;
};
+enum em28xx_i2c_algo_type {
+ EM28XX_I2C_ALGO_EM28XX = 0,
+ EM28XX_I2C_ALGO_EM2800,
+ EM28XX_I2C_ALGO_EM25XX_BUS_B,
+};
+
struct em28xx_i2c_bus {
struct em28xx *dev;
unsigned bus;
+ enum em28xx_i2c_algo_type algo_type;
};
@@ -651,7 +658,8 @@ struct em28xx_ops {
/* Provided by em28xx-i2c.c */
void em28xx_do_i2c_scan(struct em28xx *dev, unsigned bus);
-int em28xx_i2c_register(struct em28xx *dev, unsigned bus);
+int em28xx_i2c_register(struct em28xx *dev, unsigned bus,
+ enum em28xx_i2c_algo_type algo_type);
int em28xx_i2c_unregister(struct em28xx *dev, unsigned bus);
/* Provided by em28xx-core.c */