ARM: tegra: tegratab: Add Tskin coefficients for P1640 A02
Jinyoung Park [Mon, 5 Aug 2013 03:10:56 +0000 (12:10 +0900)]
Added Tskin coefficients for P1640 A02.

Bug 1341945

Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/257983
(cherry picked from commit a65f96ef3f5788c44db1dca63f1d825bb10622fa)

Change-Id: I6c48db541d19a63b07a8d3c1fedb995df4263ee7
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/301034
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>

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

index 6901d51..c5caead 100644 (file)
@@ -573,6 +573,29 @@ static struct therm_est_subdevice skin_devs[] = {
        },
 };
 
+static struct therm_est_subdevice skin_devs_a02[] = {
+       {
+               .dev_data = "Tdiode",
+               .coeffs = {
+                       -1, -2, -4, -5,
+                       -5, -4, -3, -3,
+                       -2, -2, -2, -2,
+                       -2, -2, -3, -4,
+                       -5, -5, -7, -10
+               },
+       },
+       {
+               .dev_data = "Tboard",
+               .coeffs = {
+                       144, 30, -11, -21,
+                       -24, -10, 0, 10,
+                       9, -3, -1, 14,
+                       23, 22, 35, 33,
+                       23, -17, -53, -40
+               },
+       },
+};
+
 static struct therm_est_data skin_data = {
        .num_trips = ARRAY_SIZE(skin_trips),
        .trips = skin_trips,
@@ -676,6 +699,14 @@ static struct balanced_throttle skin_throttle = {
 static int __init tegratab_skin_init(void)
 {
        if (machine_is_tegratab()) {
+               tegra_get_board_info(&board_info);
+               if (board_info.board_id == BOARD_P1640 &&
+                       board_info.fab == BOARD_FAB_A02) {
+                       skin_data.toffset = -1727;
+                       skin_data.ndevs = ARRAY_SIZE(skin_devs_a02);
+                       skin_data.devs = skin_devs_a02;
+               }
+
                balanced_throttle_register(&skin_throttle, "skin-balanced");
                tegra_skin_therm_est_device.dev.platform_data = &skin_data;
                platform_device_register(&tegra_skin_therm_est_device);