ARM: tegra: whistler: Update max8907c power off
Dan Willemsen [Thu, 1 Dec 2011 23:18:59 +0000 (15:18 -0800)]
Opt into max8907c registering a pm_power_off handler instead of doing it
ourselves.

Change-Id: Ie4eb76e3b7e05d1393815ace18458ce37d8a0c7c
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/83601
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

arch/arm/mach-tegra/board-whistler-power.c
arch/arm/mach-tegra/board-whistler.c

index 89ca697..10f8c38 100644 (file)
@@ -228,6 +228,7 @@ static struct max8907c_platform_data max8907c_pdata = {
        .subdevs = whistler_max8907c_power_devices,
        .irq_base = TEGRA_NR_IRQS,
        .max8907c_setup = whistler_max8907c_setup,
+       .use_power_off = true,
 };
 
 static struct i2c_board_info __initdata whistler_regulators[] = {
index 046b327..041c4dd 100644 (file)
@@ -538,22 +538,6 @@ 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_usb_phy_init(tegra_usb_phy_pdata, ARRAY_SIZE(tegra_usb_phy_pdata));
@@ -581,7 +565,6 @@ static void __init tegra_whistler_init(void)
        whistler_gps_init();
        whistler_usb_init();
        whistler_scroll_init();
-       whistler_power_off_init();
        whistler_emc_init();
        if (modem_id == 0x1)
                whistler_baseband_init();