diff options
author | Joshua Primero <jprimero@nvidia.com> | 2012-05-25 15:54:13 -0700 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-07-03 14:55:32 -0700 |
commit | 5b1fcd1355485d347b3f15807561500ec06224ca (patch) | |
tree | 3d1ee6898d3c1b2b177c52d2e268d76eeac5c81f /arch/arm/mach-tegra/board-cardhu.c | |
parent | ad8fabee431584601e7184da76604ad3dfdd1109 (diff) |
drivers: skin: Skin prediction algorithm
Added skin prediction algorithm.
bug 1007726
Change-Id: Ia76f73cb818aa02e608e1fc69ab4d8277a5825eb
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/104814
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu.c | 78 |
1 files changed, 76 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu.c b/arch/arm/mach-tegra/board-cardhu.c index be1aeec820ff..4e33be32bf2d 100644 --- a/arch/arm/mach-tegra/board-cardhu.c +++ b/arch/arm/mach-tegra/board-cardhu.c @@ -71,10 +71,49 @@ #include "baseband-xmm-power.h" #include "wdt-recovery.h" +static struct balanced_throttle throttle_list[] = { +#ifdef CONFIG_TEGRA_THERMAL_THROTTLE + { + .id = BALANCED_THROTTLE_ID_TJ, + .throt_tab_size = 10, + .throt_tab = { + { 0, 1000 }, + { 640000, 1000 }, + { 640000, 1000 }, + { 640000, 1000 }, + { 640000, 1000 }, + { 640000, 1000 }, + { 760000, 1000 }, + { 760000, 1050 }, + {1000000, 1050 }, + {1000000, 1100 }, + }, + }, +#endif +#ifdef CONFIG_TEGRA_SKIN_THROTTLE + { + .id = BALANCED_THROTTLE_ID_SKIN, + .throt_tab_size = 6, + .throt_tab = { + { 640000, 1200 }, + { 640000, 1200 }, + { 760000, 1200 }, + { 760000, 1200 }, + {1000000, 1200 }, + {1000000, 1200 }, + }, + }, +#endif +}; + /* All units are in millicelsius */ static struct tegra_thermal_data thermal_data = { + .shutdown_device_id = THERMAL_DEVICE_ID_NCT_EXT, .temp_shutdown = 90000, - .temp_offset = TDIODE_OFFSET, /* temps based on tdiode */ + +#if defined(CONFIG_TEGRA_EDP_LIMITS) || defined(CONFIG_TEGRA_THERMAL_THROTTLE) + .throttle_edp_device_id = THERMAL_DEVICE_ID_NCT_EXT, +#endif #ifdef CONFIG_TEGRA_EDP_LIMITS .edp_offset = TDIODE_OFFSET, /* edp based on tdiode */ .hysteresis_edp = 3000, @@ -85,6 +124,39 @@ static struct tegra_thermal_data thermal_data = { .tc2 = 1, .passive_delay = 2000, #endif +#ifdef CONFIG_TEGRA_SKIN_THROTTLE + .skin_device_id = THERMAL_DEVICE_ID_SKIN, + .temp_throttle_skin = 43000, + .tc1_skin = 0, + .tc2_skin = 1, + .passive_delay_skin = 5000, + + .skin_temp_offset = 9793, + .skin_period = 1100, + .skin_devs_size = 2, + .skin_devs = { + { + THERMAL_DEVICE_ID_NCT_EXT, + { + 2, 1, 1, 1, + 1, 1, 1, 1, + 1, 1, 1, 0, + 1, 1, 0, 0, + 0, 0, -1, -7 + } + }, + { + THERMAL_DEVICE_ID_NCT_INT, + { + -11, -7, -5, -3, + -3, -2, -1, 0, + 0, 0, 1, 1, + 1, 2, 2, 3, + 4, 6, 11, 18 + } + }, + }, +#endif }; static struct rfkill_gpio_platform_data cardhu_bt_rfkill_pdata[] = { @@ -1295,7 +1367,9 @@ static void cardhu_sata_init(void) { } static void __init tegra_cardhu_init(void) { - tegra_thermal_init(&thermal_data); + tegra_thermal_init(&thermal_data, + throttle_list, + ARRAY_SIZE(throttle_list)); tegra_clk_init_from_table(cardhu_clk_init_table); cardhu_pinmux_init(); cardhu_i2c_init(); |