arm: tegra: power: guardbanding only for accuracy of TDiode
Diwakar Tundlam [Thu, 8 Sep 2011 17:59:56 +0000 (10:59 -0700)]
Bug 844025

Reviewed-on: http://git-master/r/51443
(cherry picked from commit 1abdcb266a1fa22fd766549d5eddcca92e1fb17e)

Change-Id: Ie9b405482eebf40923f8de20c897f20bebdb84ba
Reviewed-on: http://git-master/r/61681
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rb3c087972a3ead5b298dbd6756994f2b95995561

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

index 9f987c2..e9203ea 100644 (file)
@@ -609,6 +609,7 @@ static struct nct1008_platform_data cardhu_nct1008_pdata = {
        .ext_range = true,
        .conv_rate = 0x08,
        .hysteresis = 5,
+       .offset = 8, /* 4 * 2C. Bug 844025 - 1C for device accuracies */
        .shutdown_ext_limit = 90,
        .shutdown_local_limit = 90,
        .throttling_ext_limit = 75,
@@ -634,7 +635,6 @@ static int cardhu_nct1008_init(void)
 {
        int nct1008_port = -1;
        int ret;
-       struct nct1008_platform_data *pdata;
 #ifdef CONFIG_TEGRA_EDP_LIMITS
        const struct tegra_edp_limits *z;
        int zones_sz;
@@ -671,17 +671,6 @@ static int cardhu_nct1008_init(void)
                        tegra_gpio_enable(nct1008_port);
        }
 
-       /* Temperature guardband: bug 844025 */
-       if (board_info.board_id == BOARD_PM269) {
-               /* T30S DSC */
-               pdata = cardhu_i2c4_nct1008_board_info[0].platform_data;
-               pdata->offset = 41; /* 4 * 10.25C */
-       } else {
-               /* T30 MID */
-               pdata = cardhu_i2c4_nct1008_board_info[0].platform_data;
-               pdata->offset = 43; /* 4 * 10.75C */
-       }
-
 #ifdef CONFIG_TEGRA_EDP_LIMITS
        tegra_get_cpu_edp_limits(&z, &zones_sz);
        zones_sz = min(zones_sz, MAX_ZONES);