diff options
author | Prashant Gaikwad <pgaikwad@nvidia.com> | 2011-02-22 14:37:27 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:46:25 -0800 |
commit | 21f16617317fa5f411759d6b2e5d69109c1249ce (patch) | |
tree | 5eb7b138341160fcf88f2573a56becaab5bf4df5 /arch/arm/mach-tegra/board-whistler-sensors.c | |
parent | 96eca24c53c6f40b6e2125d977574f7ed43401a6 (diff) |
[ARM] tegra: Platform data for Thermal Throttling
Platform data added in ADT7461 Thermal Sensor driver
registration for Thermal Throttling.
Bug 786378
Original-Change-Id: I3bdbe1bb6b32d2221f4a0236f467e11f9b724329
Reviewed-on: http://git-master/r/20376
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: Ra421fffd0e080d5c0b1d4a97cdd783de387542ae
Diffstat (limited to 'arch/arm/mach-tegra/board-whistler-sensors.c')
-rw-r--r-- | arch/arm/mach-tegra/board-whistler-sensors.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-whistler-sensors.c b/arch/arm/mach-tegra/board-whistler-sensors.c index 20c37c326c38..cae4d04bdb0c 100644 --- a/arch/arm/mach-tegra/board-whistler-sensors.c +++ b/arch/arm/mach-tegra/board-whistler-sensors.c @@ -23,6 +23,8 @@ #include <media/ov5650.h> #include <linux/regulator/consumer.h> #include <linux/err.h> +#include <linux/adt7461.h> + #include "gpio-names.h" #define CAMERA1_PWDN_GPIO TEGRA_GPIO_PT2 @@ -35,6 +37,8 @@ #define ISL29018_IRQ_GPIO TEGRA_GPIO_PK2 #define ADT7461_IRQ_GPIO TEGRA_GPIO_PI2 +extern void tegra_throttling_enable(bool enable); + static struct regulator *reg_avdd_cam1; /* LDO9 */ static struct regulator *reg_vdd_af; /* LDO13 */ @@ -159,10 +163,24 @@ static void whistler_adt7461_init(void) gpio_direction_input(ADT7461_IRQ_GPIO); } +static struct adt7461_platform_data whistler_adt7461_pdata = { + .supported_hwrev = true, + .ext_range = false, + .therm2 = true, + .conv_rate = 0x05, + .offset = 0, + .hysteresis = 0, + .shutdown_ext_limit = 115, + .shutdown_local_limit = 120, + .throttling_ext_limit = 90, + .alarm_fn = tegra_throttling_enable, +}; + static struct i2c_board_info whistler_i2c4_board_info[] = { { I2C_BOARD_INFO("adt7461", 0x4C), .irq = TEGRA_GPIO_TO_IRQ(ADT7461_IRQ_GPIO), + .platform_data = &whistler_adt7461_pdata, }, }; |