mt9m114: temporary: add device registration
authorTuukka Toivonen <tuukka.toivonen@intel.com>
Tue, 13 Dec 2011 16:25:00 +0000 (18:25 +0200)
committerbuildbot <buildbot@intel.com>
Thu, 26 Jan 2012 08:24:27 +0000 (00:24 -0800)
BZ: 20596

Device firmware SFI table does not yet define mt9m114 device.
Add the driver by explicitly registering it in the kernel platform code.

This patch is temporary. It should be reverted when SFI contains
the device.

Change-Id: I20b324db79eed56936651d5cf1d479ea36ed4ae4
Signed-off-by: Tuukka Toivonen <tuukka.toivonen@intel.com>
Reviewed-on: http://android.intel.com:8080/32618
Reviewed-by: Koski, Anttu <anttu.koski@intel.com>
Tested-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
arch/x86/platform/mrst/mrst.c

index 9ec9d63..169528c 100644 (file)
@@ -1377,6 +1377,17 @@ void *ov8830_platform_data_init(void *info)
 /*
  * MFLD PR2 secondary camera sensor - MT9M114 platform data
  */
+
+#define MT9M114_I2C_ADDR (0x90 >> 1)   /* i2c address, 0x90 or 0xBA */
+#define MT9M114_BUS      4             /* i2c bus number */
+
+static struct i2c_board_info mt9m114_info = {
+       .type = "mt9m114",
+       .flags = 0,
+       .addr = MT9M114_I2C_ADDR,
+       .irq = 255,
+};
+
 static int mt9m114_gpio_ctrl(struct v4l2_subdev *sd, int flag)
 {
        int ret;
@@ -2377,6 +2388,10 @@ static int __init mrst_platform_init(void)
                /* Add ov8830 driver for detection
                 * -- FIXME: remove as soon as ov8830 is defined in SFI table */
                sfi_handle_i2c_dev(OV8830_BUS, &ov8830_info);
+
+               /* Add mt9m114 driver for detection
+                * -- FIXME: remove when the sensor is defined in SFI table */
+               sfi_handle_i2c_dev(MT9M114_BUS, &mt9m114_info);
        }
 
        return 0;