ARM: Tegra: Roth: location for NCT72/1008 sensors
Anshul Jain [Thu, 22 Nov 2012 07:37:10 +0000 (23:37 -0800)]
Roth has multiple NCT sensors, left, right and on tegra. This
change specifies different platform data based on the location
of the NCT device.

Change-Id: I7067e6bb13d64d498d31534316e3e944f299794e
Signed-off-by: Anshul Jain <anshulj@nvidia.com>
Reviewed-on: http://git-master/r/167620
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>

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

index 7c2232a..f066a22 100644 (file)
@@ -89,6 +89,7 @@ static struct nct1008_platform_data roth_nct1008_pdata = {
        .offset = 0,
        .shutdown_ext_limit = 85, /* C */
        .shutdown_local_limit = 120, /* C */
+       .loc_name = "soc",
 
        .passive_delay = 2000,
 
@@ -105,11 +106,22 @@ static struct nct1008_platform_data roth_nct1008_pdata = {
        },
 };
 
-static struct nct1008_platform_data roth_nct1008_lr_pdata = {
+static struct nct1008_platform_data roth_nct1008_left_pdata = {
        .supported_hwrev = true,
        .ext_range = true,
        .conv_rate = 0x08,
        .offset = 0,
+       .loc_name = "left",
+       .shutdown_ext_limit = 90, /* C */
+       .shutdown_local_limit = 120, /* C */
+};
+
+static struct nct1008_platform_data roth_nct1008_right_pdata = {
+       .supported_hwrev = true,
+       .ext_range = true,
+       .conv_rate = 0x08,
+       .offset = 0,
+       .loc_name = "right",
        .shutdown_ext_limit = 90, /* C */
        .shutdown_local_limit = 120, /* C */
 };
@@ -125,12 +137,12 @@ static struct i2c_board_info roth_i2c4_nct1008_board_info[] = {
 static struct i2c_board_info roth_i2c4_nct1008_lr_board_info[] = {
        {
                I2C_BOARD_INFO("nct1008", 0x4C),
-               .platform_data = &roth_nct1008_lr_pdata,
+               .platform_data = &roth_nct1008_left_pdata,
                .irq = -1,
        },
        {
                I2C_BOARD_INFO("nct1008", 0x4D),
-               .platform_data = &roth_nct1008_lr_pdata,
+               .platform_data = &roth_nct1008_right_pdata,
                .irq = -1,
        }
 };