V4L/DVB (12449): adds webcam for Micron device MT9M111 0x143A to em28xx
[mchehab@redhat.com: fix merge conflict and a few CodingStyle issues] Signed-off-by: Steve Gotthardt <gotthardt@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
3746b61780
commit
f2e26ae7c8
2 changed files with 39 additions and 2 deletions
|
@ -1730,6 +1730,25 @@ static inline void em28xx_set_model(struct em28xx *dev)
|
|||
EM28XX_I2C_FREQ_100_KHZ;
|
||||
}
|
||||
|
||||
|
||||
/* FIXME: Should be replaced by a proper mt9m111 driver */
|
||||
static int em28xx_initialize_mt9m111(struct em28xx *dev)
|
||||
{
|
||||
int i;
|
||||
unsigned char regs[][3] = {
|
||||
{ 0x0d, 0x00, 0x01, }, /* reset and use defaults */
|
||||
{ 0x0d, 0x00, 0x00, },
|
||||
{ 0x0a, 0x00, 0x21, },
|
||||
{ 0x21, 0x04, 0x00, }, /* full readout speed, no row/col skipping */
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(regs); i++)
|
||||
i2c_master_send(&dev->i2c_client, ®s[i][0], 3);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* FIXME: Should be replaced by a proper mt9m001 driver */
|
||||
static int em28xx_initialize_mt9m001(struct em28xx *dev)
|
||||
{
|
||||
|
@ -1758,7 +1777,7 @@ static int em28xx_initialize_mt9m001(struct em28xx *dev)
|
|||
|
||||
/* HINT method: webcam I2C chips
|
||||
*
|
||||
* This method work for webcams with Micron sensors
|
||||
* This method works for webcams with Micron sensors
|
||||
*/
|
||||
static int em28xx_hint_sensor(struct em28xx *dev)
|
||||
{
|
||||
|
@ -1804,6 +1823,23 @@ static int em28xx_hint_sensor(struct em28xx *dev)
|
|||
dev->vinctl = 0x00;
|
||||
|
||||
break;
|
||||
|
||||
case 0x143a: /* MT9M111 as found in the ECS G200 */
|
||||
dev->model = EM2750_BOARD_UNKNOWN;
|
||||
em28xx_set_model(dev);
|
||||
|
||||
sensor_name = "mt9m111";
|
||||
dev->board.xclk = EM28XX_XCLK_FREQUENCY_48MHZ;
|
||||
dev->em28xx_sensor = EM28XX_MT9M111;
|
||||
em28xx_initialize_mt9m111(dev);
|
||||
dev->sensor_xres = 640;
|
||||
dev->sensor_yres = 512;
|
||||
|
||||
dev->vinmode = 0x0a;
|
||||
dev->vinctl = 0x00;
|
||||
|
||||
break;
|
||||
|
||||
case 0x8431:
|
||||
dev->model = EM2750_BOARD_UNKNOWN;
|
||||
em28xx_set_model(dev);
|
||||
|
@ -1820,7 +1856,7 @@ static int em28xx_hint_sensor(struct em28xx *dev)
|
|||
|
||||
break;
|
||||
default:
|
||||
printk("Unknown Micron Sensor 0x%04x\n", be16_to_cpu(version));
|
||||
printk("Unknown Micron Sensor 0x%04x\n", version);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -367,6 +367,7 @@ enum em28xx_sensor {
|
|||
EM28XX_NOSENSOR = 0,
|
||||
EM28XX_MT9V011,
|
||||
EM28XX_MT9M001,
|
||||
EM28XX_MT9M111,
|
||||
};
|
||||
|
||||
enum em28xx_adecoder {
|
||||
|
|
Loading…
Reference in a new issue