diff options
author | Jin Park <jinyoungp@nvidia.com> | 2011-11-15 18:12:41 +0900 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:50:04 -0800 |
commit | eb3435a9e412f7bec4e4af39bb010d756df18691 (patch) | |
tree | c2b6ed7fdde0acf09dc627a2af08cc4744cfac18 /arch/arm/mach-tegra/board-cardhu-power.c | |
parent | 0a07511299d211318b17c650b773f4c5019c92a0 (diff) |
arm: tegra: cardhu: Integrate MAX77663 PMIC into Cardhu
Integrating MAX77663 PMIC based PM269 board into the Cardhu board.
The system will be find the correct PMIC using the Board ID of PMIC
in the Cardhu init phase.
Bug 849360
Reviewed-on: http://git-master/r/56354
(cherry picked from commit 4d7da62a829de4d051c458caa052a6d612f642fa)
Change-Id: I41a52b70d27378e6240522c16256f8c7e42144b5
Signed-off-by: Jin Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/64399
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>
Rebase-Id: R6baa5408a249a41d577f22da8476ad020600b12d
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-power.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-power.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-power.c b/arch/arm/mach-tegra/board-cardhu-power.c index 3c7fd3fa8bbe..a258707af659 100644 --- a/arch/arm/mach-tegra/board-cardhu-power.c +++ b/arch/arm/mach-tegra/board-cardhu-power.c @@ -23,6 +23,7 @@ #include <linux/resource.h> #include <linux/regulator/machine.h> #include <linux/mfd/tps6591x.h> +#include <linux/mfd/max77663-core.h> #include <linux/gpio.h> #include <linux/io.h> #include <linux/regulator/gpio-switch-regulator.h> @@ -385,6 +386,9 @@ int __init cardhu_regulator_init(void) tegra_get_board_info(&board_info); tegra_get_pmu_board_info(&pmu_board_info); + if (pmu_board_info.board_id == BOARD_PMU_PM298) + return cardhu_pm298_regulator_init(); + if (pmu_board_info.board_id == BOARD_PMU_PM299) return cardhu_pm299_regulator_init(); @@ -957,6 +961,9 @@ int __init cardhu_gpio_switch_regulator_init(void) tegra_get_pmu_board_info(&pmu_board_info); tegra_get_display_board_info(&display_board_info); + if (pmu_board_info.board_id == BOARD_PMU_PM298) + return cardhu_pm298_gpio_switch_regulator_init(); + if (pmu_board_info.board_id == BOARD_PMU_PM299) return cardhu_pm299_gpio_switch_regulator_init(); @@ -1103,9 +1110,28 @@ static void cardhu_power_off(void) 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) { - pm_power_off = cardhu_power_off; + 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; } |