From 7b319731ee21aa4a635f1e952645ac4cf0f22a0b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Thu, 10 May 2012 20:37:49 +0800 Subject: [PATCH] rk30:phone loquat:Reporte the button for shutdown --- arch/arm/mach-rk30/board-rk30-phone-loquat.c | 10 ++-------- arch/arm/mach-rk30/board-rk30-phone-twl60xx.c | 10 +++++----- drivers/input/misc/twl6030-pwrbutton.c | 4 ++-- 3 files changed, 9 insertions(+), 15 deletions(-) mode change 100644 => 100755 drivers/input/misc/twl6030-pwrbutton.c diff --git a/arch/arm/mach-rk30/board-rk30-phone-loquat.c b/arch/arm/mach-rk30/board-rk30-phone-loquat.c index 97e6c9f30dc0..6fcfd96dc814 100755 --- a/arch/arm/mach-rk30/board-rk30-phone-loquat.c +++ b/arch/arm/mach-rk30/board-rk30-phone-loquat.c @@ -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(); diff --git a/arch/arm/mach-rk30/board-rk30-phone-twl60xx.c b/arch/arm/mach-rk30/board-rk30-phone-twl60xx.c index 21434217bd57..aa5e01aea321 100755 --- a/arch/arm/mach-rk30/board-rk30-phone-twl60xx.c +++ b/arch/arm/mach-rk30/board-rk30-phone-twl60xx.c @@ -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, diff --git a/drivers/input/misc/twl6030-pwrbutton.c b/drivers/input/misc/twl6030-pwrbutton.c old mode 100644 new mode 100755 index 051a056276df..b4ba14e13cce --- a/drivers/input/misc/twl6030-pwrbutton.c +++ b/drivers/input/misc/twl6030-pwrbutton.c @@ -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; -- 2.34.1