summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPrashant Gaikwad <pgaikwad@nvidia.com>2011-03-10 16:27:49 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:46:25 -0800
commited8a03fac94154852e21e6a348896675de8ad22b (patch)
treea53d90c8d32c38bc358426acb0701d97abe93481 /arch
parent2977388739076488db69f6190aff7f92c59746a2 (diff)
[ARM] tegra: set pm_power_off to whistler routine
for whistler, implement pm_power_off with max8907c's power off routine. Bug 799957 Bug 800602 (Cold boot) Original-Change-Id: I003547d55a4203f2d04ba0086199b61d05936563 Reviewed-on: http://git-master/r/22388 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R60e9aaa33fb680ff91d1836d885cb421b05fdde9
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-whistler.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-whistler.c b/arch/arm/mach-tegra/board-whistler.c
index ae847f1870e0..53d6762a2e40 100644
--- a/arch/arm/mach-tegra/board-whistler.c
+++ b/arch/arm/mach-tegra/board-whistler.c
@@ -34,6 +34,7 @@
#include <linux/gpio_scrollwheel.h>
#include <linux/input.h>
#include <linux/platform_data/tegra_usb.h>
+#include <linux/mfd/max8907c.h>
#include <linux/memblock.h>
#include <mach/clk.h>
@@ -324,6 +325,22 @@ static int __init whistler_gps_init(void)
return 0;
}
+static void whistler_power_off(void)
+{
+ int ret;
+
+ ret = max8907c_power_off();
+ if (ret)
+ pr_err("whistler: failed to power off\n");
+
+ while (1);
+}
+
+static void __init whistler_power_off_init(void)
+{
+ pm_power_off = whistler_power_off;
+}
+
static void whistler_usb_init(void)
{
tegra_otg_device.dev.platform_data = &tegra_otg_pdata;
@@ -352,6 +369,7 @@ static void __init tegra_whistler_init(void)
whistler_gps_init();
whistler_usb_init();
whistler_scroll_init();
+ whistler_power_off_init();
}
int __init tegra_whistler_protected_aperture_init(void)