]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
arm: tegra: enable nct72 device for skin temp sensing
authorDiwakar Tundlam <dtundlam@nvidia.com>
Sat, 13 Jul 2013 01:33:57 +0000 (18:33 -0700)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:38:53 +0000 (13:38 -0700)
Enable discovery of NCT72 connected to skin Diode.

Bug 1315460

Change-Id: Ied846d55d17e4466b781a73ac6c4fd4d365ce02a
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/250908
Reviewed-by: Hyungwoo Yang <hyungwooy@nvidia.com>
arch/arm/mach-tegra/board-ardbeg-power.c
arch/arm/mach-tegra/board-ardbeg-sensors.c

index c3867ce65621669343abd18edaea1c1c6c909569..701e166a606da6028204211c61994dd7edaa4b05 100644 (file)
@@ -94,6 +94,7 @@ static struct regulator_consumer_supply as3722_ldo2_supply[] = {
        REGULATOR_SUPPLY("avdd_hsic_mdm", NULL),
        REGULATOR_SUPPLY("vdd_lcd_bl", NULL),
        REGULATOR_SUPPLY("vdd", "1-004c"),
+       REGULATOR_SUPPLY("vdd", "1-004d"),
 };
 
 static struct regulator_consumer_supply as3722_ldo3_supply[] = {
@@ -702,6 +703,7 @@ static struct regulator_consumer_supply palmas_ldo6_supply[] = {
        REGULATOR_SUPPLY("avdd_cam1_cam", NULL),
        REGULATOR_SUPPLY("vana", "2-0010"),
        REGULATOR_SUPPLY("vdd", "1-004c"),
+       REGULATOR_SUPPLY("vdd", "1-004d"),
 };
 
 static struct regulator_consumer_supply palmas_ldo7_supply[] = {
index 177cbe84e6c35dd9795c05d64b7437a4b05d0287..21f2aabd86426bf38248adcd539dda645571cfda 100644 (file)
@@ -512,6 +512,8 @@ static int __init ardbeg_tj_throttle_init(void)
 module_init(ardbeg_tj_throttle_init);
 
 static struct nct1008_platform_data ardbeg_nct72_pdata = {
+       .loc_name = "tegra",
+
        .supported_hwrev = true,
        .ext_range = true,
        .conv_rate = 0x06, /* 4Hz conversion rate */
@@ -542,11 +544,40 @@ static struct nct1008_platform_data ardbeg_nct72_pdata = {
        },
 };
 
+static struct nct1008_platform_data ardbeg_nct72_tskin_pdata = {
+       .loc_name = "skin",
+
+       .supported_hwrev = true,
+       .ext_range = true,
+       .conv_rate = 0x06, /* 4Hz conversion rate */
+       .offset = 0,
+       .shutdown_ext_limit = 85, /* C */
+       .shutdown_local_limit = 120, /* C */
+
+       .passive_delay = 5000,
+       .polling_delay = 1000,
+       .num_trips = 1,
+       .trips = {
+               {
+                       .cdev_type = "skin-balanced",
+                       .trip_temp = 50000,
+                       .trip_type = THERMAL_TRIP_PASSIVE,
+                       .upper = THERMAL_NO_LIMIT,
+                       .lower = THERMAL_NO_LIMIT,
+               },
+       },
+};
+
 static struct i2c_board_info ardbeg_i2c_nct72_board_info[] = {
        {
                I2C_BOARD_INFO("nct72", 0x4c),
                .platform_data = &ardbeg_nct72_pdata,
                .irq = -1,
+       },
+       {
+               I2C_BOARD_INFO("nct72", 0x4d),
+               .platform_data = &ardbeg_nct72_tskin_pdata,
+               .irq = -1,
        }
 };