arm: tegra: kai: registering LTR558 ALS on I2C
[linux-2.6.git] / arch / arm / mach-tegra / board-cardhu-sensors.c
index 46893ba..1344731 100644 (file)
@@ -845,12 +845,21 @@ static void mpuirq_init(void)
                ARRAY_SIZE(inv_mpu_i2c2_board_info));
 }
 
-
+#ifdef CONFIG_SENSORS_ISL29028
 static struct i2c_board_info cardhu_i2c2_isl_board_info[] = {
        {
                I2C_BOARD_INFO("isl29028", 0x44),
        }
 };
+#endif
+
+#ifdef CONFIG_SENSORS_LTR558
+static struct i2c_board_info cardhu_i2c2_ltr_board_info[] = {
+       {
+               I2C_BOARD_INFO("LTR_558ALS", 0x23),
+       }
+};
+#endif
 
 int __init cardhu_sensors_init(void)
 {
@@ -905,8 +914,15 @@ int __init cardhu_sensors_init(void)
                i2c_register_board_info(4, cardhu_i2c4_bq27510_board_info,
                        ARRAY_SIZE(cardhu_i2c4_bq27510_board_info));
 
+#ifdef CONFIG_SENSORS_ISL29028
        i2c_register_board_info(2, cardhu_i2c2_isl_board_info,
                ARRAY_SIZE(cardhu_i2c2_isl_board_info));
+#endif
+
+#ifdef CONFIG_SENSORS_LTR558
+       i2c_register_board_info(2, cardhu_i2c2_ltr_board_info,
+               ARRAY_SIZE(cardhu_i2c2_ltr_board_info));
+#endif
 
        err = cardhu_nct1008_init();
        if (err)