ARM: tegra: ventana: Update pm_power_off registration
Dan Willemsen [Thu, 1 Dec 2011 23:14:40 +0000 (15:14 -0800)]
Opt into the tps6586x registering the pm_power_off handler instead of
doing it ourselves.

Change-Id: I8363a3b4f5626bb45b2118559c3ab67e247e3172
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/83599
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

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

index 3ab178d..7cdafcb 100644 (file)
@@ -203,6 +203,7 @@ static struct tps6586x_platform_data tps_platform = {
        .num_subdevs = ARRAY_SIZE(tps_devs),
        .subdevs = tps_devs,
        .gpio_base = TPS6586X_GPIO_BASE,
+       .use_power_off = true,
 };
 
 static struct i2c_board_info __initdata ventana_regulators[] = {
index 21278d1..a7f051a 100644 (file)
@@ -554,22 +554,6 @@ static int __init ventana_gps_init(void)
        return 0;
 }
 
-static void ventana_power_off(void)
-{
-       int ret;
-
-       ret = tps6586x_power_off();
-       if (ret)
-               pr_err("ventana: failed to power off\n");
-
-       while(1);
-}
-
-static void __init ventana_power_off_init(void)
-{
-       pm_power_off = ventana_power_off;
-}
-
 static void ventana_usb_init(void)
 {
        tegra_usb_phy_init(tegra_usb_phy_pdata, ARRAY_SIZE(tegra_usb_phy_pdata));
@@ -621,7 +605,6 @@ static void __init tegra_ventana_init(void)
        ventana_panel_init();
        ventana_sensors_init();
        ventana_bt_rfkill();
-       ventana_power_off_init();
        ventana_emc_init();
 
        ventana_setup_bluesleep();