arm: tegra: dalmore: add ALS sensor support
Sri Krishna chowdary [Fri, 14 Sep 2012 12:13:13 +0000 (17:13 +0530)]
I2c registration of ALS driver CM3218.

Bug 1030776

Change-Id: I9cd96913933fd513a96f7944db8188e8a0bad0d7
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/145610
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

arch/arm/mach-tegra/board-dalmore-sensors.c

index 3829763..10d58f3 100644 (file)
@@ -272,6 +272,12 @@ static struct mpu_platform_data mpu9150_gyro_data = {
                .value = _value,                                \
        }
 
+static struct i2c_board_info dalmore_i2c_board_info_cm3218[] = {
+       {
+               I2C_BOARD_INFO("cm3218", 0x48),
+       },
+};
+
 static struct i2c_board_info __initdata inv_mpu9150_i2c2_board_info[] = {
         {
                 I2C_BOARD_INFO(MPU_GYRO_NAME, MPU_GYRO_ADDR),
@@ -315,5 +321,8 @@ int __init dalmore_sensors_init(void)
        dalmore_camera_init();
        mpuirq_init();
 
+       i2c_register_board_info(0, dalmore_i2c_board_info_cm3218,
+               ARRAY_SIZE(dalmore_i2c_board_info_cm3218));
+
        return 0;
 }