diff options
Diffstat (limited to 'drivers/usb/media/sn9c102_sensor.h')
-rw-r--r-- | drivers/usb/media/sn9c102_sensor.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/usb/media/sn9c102_sensor.h b/drivers/usb/media/sn9c102_sensor.h index 6a7adebcb4bf..a45166c3488c 100644 --- a/drivers/usb/media/sn9c102_sensor.h +++ b/drivers/usb/media/sn9c102_sensor.h | |||
@@ -64,6 +64,7 @@ struct sn9c102_sensor; | |||
64 | */ | 64 | */ |
65 | extern int sn9c102_probe_hv7131d(struct sn9c102_device* cam); | 65 | extern int sn9c102_probe_hv7131d(struct sn9c102_device* cam); |
66 | extern int sn9c102_probe_mi0343(struct sn9c102_device* cam); | 66 | extern int sn9c102_probe_mi0343(struct sn9c102_device* cam); |
67 | extern int sn9c102_probe_ov7630(struct sn9c102_device* cam); | ||
67 | extern int sn9c102_probe_pas106b(struct sn9c102_device* cam); | 68 | extern int sn9c102_probe_pas106b(struct sn9c102_device* cam); |
68 | extern int sn9c102_probe_pas202bcb(struct sn9c102_device* cam); | 69 | extern int sn9c102_probe_pas202bcb(struct sn9c102_device* cam); |
69 | extern int sn9c102_probe_tas5110c1b(struct sn9c102_device* cam); | 70 | extern int sn9c102_probe_tas5110c1b(struct sn9c102_device* cam); |
@@ -80,6 +81,7 @@ static int (*sn9c102_sensor_table[])(struct sn9c102_device*) = { \ | |||
80 | &sn9c102_probe_pas106b, /* strong detection based on SENSOR ids */ \ | 81 | &sn9c102_probe_pas106b, /* strong detection based on SENSOR ids */ \ |
81 | &sn9c102_probe_pas202bcb, /* strong detection based on SENSOR ids */ \ | 82 | &sn9c102_probe_pas202bcb, /* strong detection based on SENSOR ids */ \ |
82 | &sn9c102_probe_hv7131d, /* strong detection based on SENSOR ids */ \ | 83 | &sn9c102_probe_hv7131d, /* strong detection based on SENSOR ids */ \ |
84 | &sn9c102_probe_ov7630, /* detection mostly based on USB pid/vid */ \ | ||
83 | &sn9c102_probe_tas5110c1b, /* detection based on USB pid/vid */ \ | 85 | &sn9c102_probe_tas5110c1b, /* detection based on USB pid/vid */ \ |
84 | &sn9c102_probe_tas5130d1b, /* detection based on USB pid/vid */ \ | 86 | &sn9c102_probe_tas5130d1b, /* detection based on USB pid/vid */ \ |
85 | NULL, \ | 87 | NULL, \ |
@@ -103,7 +105,8 @@ static const struct usb_device_id sn9c102_id_table[] = { \ | |||
103 | { USB_DEVICE(0x0c45, 0x6029), }, /* PAS106B */ \ | 105 | { USB_DEVICE(0x0c45, 0x6029), }, /* PAS106B */ \ |
104 | { USB_DEVICE(0x0c45, 0x602a), }, /* HV7131D */ \ | 106 | { USB_DEVICE(0x0c45, 0x602a), }, /* HV7131D */ \ |
105 | { USB_DEVICE(0x0c45, 0x602b), }, /* MI-0343 */ \ | 107 | { USB_DEVICE(0x0c45, 0x602b), }, /* MI-0343 */ \ |
106 | { USB_DEVICE(0x0c45, 0x602c), }, /* OV7620 */ \ | 108 | { USB_DEVICE(0x0c45, 0x602c), }, /* OV7630 */ \ |
109 | { USB_DEVICE(0x0c45, 0x602d), }, \ | ||
107 | { USB_DEVICE(0x0c45, 0x6030), }, /* MI03x */ \ | 110 | { USB_DEVICE(0x0c45, 0x6030), }, /* MI03x */ \ |
108 | { USB_DEVICE(0x0c45, 0x6080), }, \ | 111 | { USB_DEVICE(0x0c45, 0x6080), }, \ |
109 | { USB_DEVICE(0x0c45, 0x6082), }, /* MI0343 and MI0360 */ \ | 112 | { USB_DEVICE(0x0c45, 0x6082), }, /* MI0343 and MI0360 */ \ |
@@ -145,6 +148,8 @@ static const struct usb_device_id sn9c102_id_table[] = { \ | |||
145 | */ | 148 | */ |
146 | 149 | ||
147 | /* The "try" I2C I/O versions are used when probing the sensor */ | 150 | /* The "try" I2C I/O versions are used when probing the sensor */ |
151 | extern int sn9c102_i2c_try_write(struct sn9c102_device*,struct sn9c102_sensor*, | ||
152 | u8 address, u8 value); | ||
148 | extern int sn9c102_i2c_try_read(struct sn9c102_device*,struct sn9c102_sensor*, | 153 | extern int sn9c102_i2c_try_read(struct sn9c102_device*,struct sn9c102_sensor*, |
149 | u8 address); | 154 | u8 address); |
150 | 155 | ||
@@ -201,6 +206,8 @@ enum sn9c102_i2c_interface { | |||
201 | SN9C102_I2C_3WIRES, | 206 | SN9C102_I2C_3WIRES, |
202 | }; | 207 | }; |
203 | 208 | ||
209 | #define SN9C102_MAX_CTRLS V4L2_CID_LASTP1-V4L2_CID_BASE+10 | ||
210 | |||
204 | struct sn9c102_sensor { | 211 | struct sn9c102_sensor { |
205 | char name[32], /* sensor name */ | 212 | char name[32], /* sensor name */ |
206 | maintainer[64]; /* name of the mantainer <email> */ | 213 | maintainer[64]; /* name of the mantainer <email> */ |
@@ -243,7 +250,7 @@ struct sn9c102_sensor { | |||
243 | sensor according to the default configuration structures below. | 250 | sensor according to the default configuration structures below. |
244 | */ | 251 | */ |
245 | 252 | ||
246 | struct v4l2_queryctrl qctrl[V4L2_CID_LASTP1-V4L2_CID_BASE]; | 253 | struct v4l2_queryctrl qctrl[SN9C102_MAX_CTRLS]; |
247 | /* | 254 | /* |
248 | Optional list of default controls, defined as indicated in the | 255 | Optional list of default controls, defined as indicated in the |
249 | V4L2 API. Menu type controls are not handled by this interface. | 256 | V4L2 API. Menu type controls are not handled by this interface. |
@@ -356,7 +363,7 @@ struct sn9c102_sensor { | |||
356 | core module to store successfully updated values of the above | 363 | core module to store successfully updated values of the above |
357 | settings, for rollbacks..etc..in case of errors during atomic I/O | 364 | settings, for rollbacks..etc..in case of errors during atomic I/O |
358 | */ | 365 | */ |
359 | struct v4l2_queryctrl _qctrl[V4L2_CID_LASTP1-V4L2_CID_BASE]; | 366 | struct v4l2_queryctrl _qctrl[SN9C102_MAX_CTRLS]; |
360 | struct v4l2_rect _rect; | 367 | struct v4l2_rect _rect; |
361 | }; | 368 | }; |
362 | 369 | ||
@@ -367,5 +374,8 @@ struct sn9c102_sensor { | |||
367 | #define SN9C102_V4L2_CID_GREEN_BALANCE V4L2_CID_PRIVATE_BASE + 1 | 374 | #define SN9C102_V4L2_CID_GREEN_BALANCE V4L2_CID_PRIVATE_BASE + 1 |
368 | #define SN9C102_V4L2_CID_RESET_LEVEL V4L2_CID_PRIVATE_BASE + 2 | 375 | #define SN9C102_V4L2_CID_RESET_LEVEL V4L2_CID_PRIVATE_BASE + 2 |
369 | #define SN9C102_V4L2_CID_PIXEL_BIAS_VOLTAGE V4L2_CID_PRIVATE_BASE + 3 | 376 | #define SN9C102_V4L2_CID_PIXEL_BIAS_VOLTAGE V4L2_CID_PRIVATE_BASE + 3 |
377 | #define SN9C102_V4L2_CID_GAMMA V4L2_CID_PRIVATE_BASE + 4 | ||
378 | #define SN9C102_V4L2_CID_BAND_FILTER V4L2_CID_PRIVATE_BASE + 5 | ||
379 | #define SN9C102_V4L2_CID_BRIGHT_LEVEL V4L2_CID_PRIVATE_BASE + 6 | ||
370 | 380 | ||
371 | #endif /* _SN9C102_SENSOR_H_ */ | 381 | #endif /* _SN9C102_SENSOR_H_ */ |