From 4ee6a4928da29ffe3c10ab930434bc3452575e6c Mon Sep 17 00:00:00 2001 From: hjc Date: Tue, 5 Feb 2013 16:19:53 +0800 Subject: [PATCH] rk3168_86v: restart the system if the mid is connect to the dc or usb in pwd --- arch/arm/configs/rk3168_86v_defconfig | 9 +++++++-- arch/arm/mach-rk30/board-rk3168-86v.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/arm/configs/rk3168_86v_defconfig b/arch/arm/configs/rk3168_86v_defconfig index 2409e17e414f..d0a00bce1295 100644 --- a/arch/arm/configs/rk3168_86v_defconfig +++ b/arch/arm/configs/rk3168_86v_defconfig @@ -1038,6 +1038,7 @@ CONFIG_MISC_DEVICES=y # CONFIG_SENSORS_APDS990X is not set # CONFIG_HMC6352 is not set # CONFIG_SENSORS_AK8975 is not set +# CONFIG_SENSORS_AK8963 is not set # CONFIG_DS1682 is not set CONFIG_UID_STAT=y # CONFIG_BMP085 is not set @@ -2467,9 +2468,13 @@ CONFIG_USB20_HOST=y CONFIG_USB20_HOST_EN=y CONFIG_USB20_OTG=y # CONFIG_DWC_OTG_HOST_ONLY is not set -CONFIG_DWC_OTG_DEVICE_ONLY=y -# CONFIG_DWC_OTG_BOTH_HOST_SLAVE is not set +# CONFIG_DWC_OTG_DEVICE_ONLY is not set +CONFIG_DWC_OTG_BOTH_HOST_SLAVE=y +CONFIG_DWC_OTG_DEFAULT_ID=y +# CONFIG_DWC_OTG_DEFAULT_HOST is not set +# CONFIG_DWC_OTG_DEFAULT_DEVICE is not set CONFIG_DWC_CONN_EN=y +CONFIG_USB20_OTG_EN=y # CONFIG_DWC_OTG_DEBUG is not set # CONFIG_DWC_REMOTE_WAKEUP is not set CONFIG_DWC_OTG=y diff --git a/arch/arm/mach-rk30/board-rk3168-86v.c b/arch/arm/mach-rk30/board-rk3168-86v.c index 719425ba7997..f05888e9ff62 100755 --- a/arch/arm/mach-rk30/board-rk3168-86v.c +++ b/arch/arm/mach-rk30/board-rk3168-86v.c @@ -1796,9 +1796,9 @@ static void rk30_pm_power_off(void) wm831x_device_shutdown(Wm831x);//wm8326 shutdown #endif #if defined(CONFIG_REGULATOR_ACT8846) - if (pmic_is_act8846()) { + if (pmic_is_tps65910()) { printk("enter dcdet===========\n"); - if(gpio_get_value (RK30_PIN0_PB2) == GPIO_LOW) + if((gpio_get_value (RK30_PIN0_PB2) == GPIO_LOW)||(gpio_get_value (RK30_PIN0_PA7) == GPIO_HIGH)) { printk("enter restart===========\n"); arm_pm_restart(0, NULL); -- 2.34.1