aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c44
1 files changed, 41 insertions, 3 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index ed281f565945..1c2e544eda73 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -1730,6 +1730,25 @@ static inline void em28xx_set_model(struct em28xx *dev)
1730 EM28XX_I2C_FREQ_100_KHZ; 1730 EM28XX_I2C_FREQ_100_KHZ;
1731} 1731}
1732 1732
1733
1734/* FIXME: Should be replaced by a proper mt9m111 driver */
1735static int em28xx_initialize_mt9m111(struct em28xx *dev)
1736{
1737 int i;
1738 unsigned char regs[][3] = {
1739 { 0x0d, 0x00, 0x01, }, /* reset and use defaults */
1740 { 0x0d, 0x00, 0x00, },
1741 { 0x0a, 0x00, 0x21, },
1742 { 0x21, 0x04, 0x00, }, /* full readout speed, no row/col skipping */
1743 };
1744
1745 for (i = 0; i < ARRAY_SIZE(regs); i++)
1746 i2c_master_send(&dev->i2c_client, &regs[i][0], 3);
1747
1748 return 0;
1749}
1750
1751
1733/* FIXME: Should be replaced by a proper mt9m001 driver */ 1752/* FIXME: Should be replaced by a proper mt9m001 driver */
1734static int em28xx_initialize_mt9m001(struct em28xx *dev) 1753static int em28xx_initialize_mt9m001(struct em28xx *dev)
1735{ 1754{
@@ -1758,7 +1777,7 @@ static int em28xx_initialize_mt9m001(struct em28xx *dev)
1758 1777
1759/* HINT method: webcam I2C chips 1778/* HINT method: webcam I2C chips
1760 * 1779 *
1761 * This method work for webcams with Micron sensors 1780 * This method works for webcams with Micron sensors
1762 */ 1781 */
1763static int em28xx_hint_sensor(struct em28xx *dev) 1782static int em28xx_hint_sensor(struct em28xx *dev)
1764{ 1783{
@@ -1804,6 +1823,23 @@ static int em28xx_hint_sensor(struct em28xx *dev)
1804 dev->vinctl = 0x00; 1823 dev->vinctl = 0x00;
1805 1824
1806 break; 1825 break;
1826
1827 case 0x143a: /* MT9M111 as found in the ECS G200 */
1828 dev->model = EM2750_BOARD_UNKNOWN;
1829 em28xx_set_model(dev);
1830
1831 sensor_name = "mt9m111";
1832 dev->board.xclk = EM28XX_XCLK_FREQUENCY_48MHZ;
1833 dev->em28xx_sensor = EM28XX_MT9M111;
1834 em28xx_initialize_mt9m111(dev);
1835 dev->sensor_xres = 640;
1836 dev->sensor_yres = 512;
1837
1838 dev->vinmode = 0x0a;
1839 dev->vinctl = 0x00;
1840
1841 break;
1842
1807 case 0x8431: 1843 case 0x8431:
1808 dev->model = EM2750_BOARD_UNKNOWN; 1844 dev->model = EM2750_BOARD_UNKNOWN;
1809 em28xx_set_model(dev); 1845 em28xx_set_model(dev);
@@ -1820,7 +1856,7 @@ static int em28xx_hint_sensor(struct em28xx *dev)
1820 1856
1821 break; 1857 break;
1822 default: 1858 default:
1823 printk("Unknown Micron Sensor 0x%04x\n", be16_to_cpu(version)); 1859 printk("Unknown Micron Sensor 0x%04x\n", version);
1824 return -EINVAL; 1860 return -EINVAL;
1825 } 1861 }
1826 1862
@@ -2346,7 +2382,9 @@ void em28xx_card_setup(struct em28xx *dev)
2346 } 2382 }
2347 2383
2348 em28xx_tuner_setup(dev); 2384 em28xx_tuner_setup(dev);
2349 em28xx_ir_init(dev); 2385
2386 if(!disable_ir)
2387 em28xx_ir_init(dev);
2350} 2388}
2351 2389
2352 2390