From aca62435bf72bcca5bc232907c15f51cd1b55a48 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 16 Apr 2014 19:23:15 +0530 Subject: ARM: tegra: use PMC interrupt polarity configuration appropriately Use the API provided by tegar-pmc driver for configuring the PMC interrupt polarity at appropriate location for Laguna and Norrin. Remove extra function calls and macros used locally for achieving this. Change-Id: Ic5e990453fd9bc2b61f433a7850708a34a4d0fa7 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/397149 --- arch/arm/mach-tegra/board-laguna-power.c | 21 ++------------------- arch/arm/mach-tegra/board-norrin-power.c | 8 +------- 2 files changed, 3 insertions(+), 26 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/board-laguna-power.c b/arch/arm/mach-tegra/board-laguna-power.c index fed82c5dffa6..e3ba1ea0aee3 100644 --- a/arch/arm/mach-tegra/board-laguna-power.c +++ b/arch/arm/mach-tegra/board-laguna-power.c @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -49,9 +50,6 @@ #include "tegra11_soctherm.h" #include "iomap.h" -#define PMC_CTRL 0x0 -#define PMC_CTRL_INTR_LOW (1 << 17) - struct bq2471x_platform_data laguna_bq2471x_pdata = { .charge_broadcast_mode = 1, .gpio_active_low = 1, @@ -65,21 +63,6 @@ static struct i2c_board_info __initdata bq2471x_boardinfo[] = { }, }; -int __init laguna_as3722_regulator_init(void) -{ - void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE); - u32 pmc_ctrl; - - /* AS3722: Normal state of INT request line is LOW. - * configure the power management controller to trigger PMU - * interrupts when HIGH. - */ - pmc_ctrl = readl(pmc + PMC_CTRL); - writel(pmc_ctrl | PMC_CTRL_INTR_LOW, pmc + PMC_CTRL); - - return 0; -} - static struct tegra_suspend_platform_data laguna_suspend_data = { .cpu_timer = 2000, .cpu_off_timer = 2000, @@ -164,7 +147,7 @@ int __init laguna_regulator_init(void) #ifdef CONFIG_ARCH_TEGRA_HAS_CL_DVFS laguna_cl_dvfs_init(); #endif - laguna_as3722_regulator_init(); + tegra_pmc_pmu_interrupt_polarity(true); if (get_power_supply_type() == POWER_SUPPLY_TYPE_BATTERY) i2c_register_board_info(1, bq2471x_boardinfo, diff --git a/arch/arm/mach-tegra/board-norrin-power.c b/arch/arm/mach-tegra/board-norrin-power.c index 02f1ad31cf23..78709dcf818a 100644 --- a/arch/arm/mach-tegra/board-norrin-power.c +++ b/arch/arm/mach-tegra/board-norrin-power.c @@ -45,12 +45,6 @@ #include "tegra11_soctherm.h" #include "iomap.h" -int __init norrin_as3722_regulator_init(void) -{ - tegra_pmc_pmu_interrupt_polarity(true); - return 0; -} - static struct tegra_suspend_platform_data norrin_suspend_data = { .cpu_timer = 2000, .cpu_off_timer = 2000, @@ -152,7 +146,7 @@ int __init norrin_regulator_init(void) #ifdef CONFIG_ARCH_TEGRA_HAS_CL_DVFS norrin_cl_dvfs_init(); #endif - norrin_as3722_regulator_init(); + tegra_pmc_pmu_interrupt_polarity(true); return 0; } -- cgit v1.2.3