summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBill Huang <bilhuang@nvidia.com>2011-12-19 22:25:06 -0800
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-22 11:35:13 +0530
commit62edc6767193e121b04e4bf7b713ebd6eae91d31 (patch)
tree1e3ed66afa03949c2efbd4d2c193a0883b1072a0 /arch
parent5b12c16ce596aed7c1b35b7885207b93629b8abb (diff)
arm: tegra: harmony: add pm_power_off method for harmony
implement pm_power_off with tps6586x's power off routine. Change-Id: I20b818816982bad97daae1d8961aade4b6a0e6c4 Signed-off-by: Bill Huang <bilhuang@nvidia.com> Reviewed-on: http://git-master/r/71139 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-harmony.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index 904aa2bb5284..e69cf33e20a0 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -32,6 +32,7 @@
#include <linux/i2c-tegra.h>
#include <linux/memblock.h>
#include <linux/delay.h>
+#include <linux/mfd/tps6586x.h>
#include <sound/wm8903.h>
@@ -452,6 +453,22 @@ static int __init harmony_wifi_init(void)
*/
subsys_initcall_sync(harmony_wifi_init);
+static void harmony_power_off(void)
+{
+ int ret;
+
+ ret = tps6586x_power_off();
+ if (ret)
+ pr_err("harmony: failed to power off\n");
+
+ while (1);
+}
+
+static void __init harmony_power_off_init(void)
+{
+ pm_power_off = harmony_power_off;
+}
+
static void __init tegra_harmony_init(void)
{
tegra_clk_init_from_table(harmony_clk_init_table);
@@ -475,6 +492,7 @@ static void __init tegra_harmony_init(void)
harmony_kbc_init();
#endif
harmony_pcie_init();
+ harmony_power_off_init();
}
void __init tegra_harmony_reserve(void)