summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-loki-sensors.c
diff options
context:
space:
mode:
authorAnshul Jain <anshulj@nvidia.com>2013-11-22 17:44:35 -0800
committerDiwakar Tundlam <dtundlam@nvidia.com>2013-11-25 16:08:15 -0800
commitb4be0659e91aa7de8626e054188744d1c24b169c (patch)
tree19ad0b341b062612fa4b0d9d90740c7b2bb8c196 /arch/arm/mach-tegra/board-loki-sensors.c
parent86a5b069ad8ca33994d3e9a936e28fc7e341c744 (diff)
arm: tegra12: loki: New fan curve for Loki/Foster
This change declares new fan curves for loki and foster. Bug 1364451 Change-Id: I06540f10afc389b9291f1c6dd5c9f0802459d3e1 Signed-off-by: Anshul Jain <anshulj@nvidia.com> Reviewed-on: http://git-master/r/334779 Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-loki-sensors.c')
-rw-r--r--arch/arm/mach-tegra/board-loki-sensors.c36
1 files changed, 29 insertions, 7 deletions
diff --git a/arch/arm/mach-tegra/board-loki-sensors.c b/arch/arm/mach-tegra/board-loki-sensors.c
index 13b4554dc287..6174e3236856 100644
--- a/arch/arm/mach-tegra/board-loki-sensors.c
+++ b/arch/arm/mach-tegra/board-loki-sensors.c
@@ -495,8 +495,17 @@ static int loki_fan_est_get_temp(void *data, long *temp)
return 0;
}
+static int active_trip_temps_loki[] = {0, 60000, 68000, 79000, 90000,
+ 140000, 150000, 160000, 170000, 180000};
+static int active_hysteresis_loki[] = {0, 20000, 7000, 10000, 10000,
+ 0, 0, 0, 0, 0};
+
+static int active_trip_temps_foster[] = {0, 63000, 74000, 85000, 120000,
+ 140000, 150000, 160000, 170000, 180000};
+static int active_hysteresis_foster[] = {0, 15000, 11000, 6000, 4000,
+ 0, 0, 0, 0, 0};
/*Fan thermal estimator data for P2548*/
-static struct therm_fan_est_data fan_est_data_p2548 = {
+static struct therm_fan_est_data fan_est_data = {
.toffset = 0,
.polling_period = 1100,
.ndevs = 2,
@@ -525,23 +534,36 @@ static struct therm_fan_est_data fan_est_data_p2548 = {
},
},
.cdev_type = "pwm-fan",
- .active_trip_temps = {0, 47000, 55000, 67000, 103000,
- 140000, 150000, 160000, 170000, 180000},
- .active_hysteresis = {0, 12000, 7000, 10000, 0, 0, 0, 0, 0, 0},
};
-static struct platform_device loki_fan_therm_est_device_p2548 = {
+static struct platform_device loki_fan_therm_est_device = {
.name = "therm-fan-est",
.id = -1,
.num_resources = 0,
.dev = {
- .platform_data = &fan_est_data_p2548,
+ .platform_data = &fan_est_data,
},
};
static int __init loki_fan_est_init(void)
{
- platform_device_register(&loki_fan_therm_est_device_p2548);
+ if ((board_info.sku == 900) && (board_info.board_id == BOARD_P2530)) {
+ memcpy((&fan_est_data)->active_trip_temps,
+ &active_trip_temps_foster,
+ sizeof(active_trip_temps_foster));
+ memcpy((&fan_est_data)->active_hysteresis,
+ &active_hysteresis_foster,
+ sizeof(active_hysteresis_foster));
+ } else {
+ memcpy((&fan_est_data)->active_trip_temps,
+ &active_trip_temps_loki,
+ sizeof(active_trip_temps_loki));
+ memcpy((&fan_est_data)->active_hysteresis,
+ &active_hysteresis_loki,
+ sizeof(active_hysteresis_loki));
+ }
+
+ platform_device_register(&loki_fan_therm_est_device);
return 0;
}