rk3168_86v: restart the system if the mid is connect to the dc or usb in pwd
authorhjc <hjc@rock-chips.com>
Tue, 5 Feb 2013 08:19:53 +0000 (16:19 +0800)
committerhjc <hjc@rock-chips.com>
Tue, 5 Feb 2013 08:19:53 +0000 (16:19 +0800)
arch/arm/configs/rk3168_86v_defconfig
arch/arm/mach-rk30/board-rk3168-86v.c

index 2409e17e414f2c59ed57baf535130eaf073e236c..d0a00bce12956a27e927d40e4e3315c2cf1915c7 100644 (file)
@@ -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
index 719425ba79977bf82d7f4e5361413d04513ebbe9..f05888e9ff6257c47f5ea6f73e3da38cb94b0293 100755 (executable)
@@ -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);