rk30:phone loquat:Reporte the button for shutdown
author张晴 <zhangqing@rock-chips.com>
Thu, 10 May 2012 12:37:49 +0000 (20:37 +0800)
committer张晴 <zhangqing@rock-chips.com>
Thu, 10 May 2012 12:37:49 +0000 (20:37 +0800)
arch/arm/mach-rk30/board-rk30-phone-loquat.c
arch/arm/mach-rk30/board-rk30-phone-twl60xx.c
drivers/input/misc/twl6030-pwrbutton.c [changed mode: 0644->0755]

index 97e6c9f30dc0b71dfe9c6979ff148dc786cd3542..6fcfd96dc81445d17b7b98dc164e34c3bf252d8b 100755 (executable)
@@ -1745,14 +1745,11 @@ static void __init rk30_i2c_register_board_info(void)
 }
 //end of i2c
 
-#define POWER_ON_PIN RK30_PIN6_PB0   //power_hold
 static void rk30_pm_power_off(void)
 {
        printk(KERN_ERR "rk30_pm_power_off start...\n");
-       gpio_direction_output(POWER_ON_PIN, GPIO_LOW);
-#if defined(CONFIG_MFD_WM831X)
-       wm831x_set_bits(Wm831x,WM831X_GPIO_LEVEL,0x0001,0x0000);  //set sys_pwr 0
-       wm831x_device_shutdown(Wm831x);//wm8326 shutdown
+#if defined(CONFIG_TWL4030_CORE)
+       twl6030_poweroff();
 #endif
        while (1);
 }
@@ -1823,9 +1820,6 @@ static int rk_virtual_keys_init(void)
 
 static void __init machine_rk30_board_init(void)
 {
-       gpio_request(POWER_ON_PIN, "poweronpin");
-       gpio_direction_output(POWER_ON_PIN, GPIO_HIGH);
-       
        pm_power_off = rk30_pm_power_off;
        
        rk30_i2c_register_board_info();
index 21434217bd5780774accc23b873cd07e757b10df..aa5e01aea3212b5d3cd5be90254aa045713fce85 100755 (executable)
@@ -594,11 +594,11 @@ static struct twl4030_bci_platform_data tps80032_bci_data = {
        .tblsize                = ARRAY_SIZE(tps_batt_table),
 };
 
-int rk30_phy_init(){}
-int rk30_phy_exit(){}
-int rk30_phy_power(){}
-int rk30_phy_set_clk(){}
-int rk30_phy_suspend(){}
+static int rk30_phy_init(){}
+static int rk30_phy_exit(){}
+static int rk30_phy_power(){}
+static int rk30_phy_set_clk(){}
+static int rk30_phy_suspend(){}
 static struct twl4030_usb_data tps80032_usbphy_data = {
        .phy_init       = rk30_phy_init,
        .phy_exit       = rk30_phy_exit,
old mode 100644 (file)
new mode 100755 (executable)
index 051a056..b4ba14e
@@ -89,12 +89,12 @@ static irqreturn_t powerbutton_irq(int irq, void *_pwr)
                input_sync(pwr->input_dev);
        } else if (!push_release_flag) {
                push_release_flag = 1;
-               input_report_key(pwr->input_dev, pwr->report_key, !pwr_val);
+               input_report_key(pwr->input_dev, pwr->report_key, pwr_val);
                input_sync(pwr->input_dev);
 
                msleep(20);
 
-               input_report_key(pwr->input_dev, pwr->report_key, pwr_val);
+               input_report_key(pwr->input_dev, pwr->report_key, !pwr_val);
                input_sync(pwr->input_dev);
        } else
                push_release_flag = 0;