diff options
author | Dan Willemsen <dwillemsen@nvidia.com> | 2011-12-01 15:09:35 -0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-02-15 16:55:41 -0800 |
commit | 8e9c3586d309db31fea2826f7d7f929bc715e3e7 (patch) | |
tree | 4dc5fbb189aca706df0921edaada4776c54e9275 /arch/arm/mach-tegra/board-cardhu-power.c | |
parent | b2aed388161fc9642de76045cfce746d4175d63e (diff) |
ARM: tegra: cardhu: Update pm_power_off registration
Just set the opt in booleans in the platform data instead of checking
which function to register for pm_power_off.
Change-Id: If336ff69e4b61b4220e6766b2643c5fba74d01cc
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/83597
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-power.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-power.c | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-power.c b/arch/arm/mach-tegra/board-cardhu-power.c index 83f9483b54a6..2be32f781710 100644 --- a/arch/arm/mach-tegra/board-cardhu-power.c +++ b/arch/arm/mach-tegra/board-cardhu-power.c @@ -328,6 +328,7 @@ static struct tps6591x_platform_data tps_platform = { .gpio_base = TPS6591X_GPIO_BASE, .dev_slp_en = true, .slp_keepon = &tps_slp_keepon, + .use_power_off = true, }; static struct i2c_board_info __initdata cardhu_regulators[] = { @@ -1183,42 +1184,6 @@ int __init cardhu_suspend_init(void) return 0; } -static void cardhu_power_off(void) -{ - int ret; - pr_err("cardhu: Powering off the device\n"); - ret = tps6591x_power_off(); - if (ret) - pr_err("cardhu: failed to power off\n"); - - while (1); -} - -static void cardhu_pm298_power_off(void) -{ - int ret; - pr_err("cardhu-pm298: Powering off the device\n"); - ret = max77663_power_off(); - if (ret) - pr_err("cardhu-pm298: failed to power off\n"); - - while (1); -} - -int __init cardhu_power_off_init(void) -{ - struct board_info pmu_board_info; - - tegra_get_pmu_board_info(&pmu_board_info); - - if (pmu_board_info.board_id == BOARD_PMU_PM298) - pm_power_off = cardhu_pm298_power_off; - else - pm_power_off = cardhu_power_off; - - return 0; -} - static struct tegra_tsensor_pmu_data tpdata = { .poweroff_reg_addr = 0x3F, .poweroff_reg_data = 0x80, |