RK3188: wakeup system by OTG BVALID interrupt in defconfig
authorwlf <wulf@rock-chips.com>
Sat, 23 Mar 2013 08:30:55 +0000 (16:30 +0800)
committerwlf <wulf@rock-chips.com>
Sat, 23 Mar 2013 08:30:55 +0000 (16:30 +0800)
arch/arm/plat-rk/Kconfig
arch/arm/plat-rk/include/plat/board.h
arch/arm/plat-rk/usb_detect.c

index 88f3964b61362fb3c2f4c3ddbeb26f83c593d1cd..8981798b1fd506f0f0ee85ff4ce634ee4fc79f3e 100755 (executable)
@@ -210,6 +210,6 @@ config RK_TIMER
 config RK_USB_DETECT_BY_OTG_BVALID
        bool "Wakeup system by OTG BVALID interrupt when USB OTG conneted"
        depends on USB_GADGET && (ARCH_RK2928 || ARCH_RK3188)
-       default y if ARCH_RK2928
+       default y if ARCH_RK2928 || ARCH_RK3188
 
 endif
index a4839c1695eed3b12896eae658126082fe37d92d..5a7bad299fc0f29d6b71dc011d831251e4ea91b4 100755 (executable)
@@ -477,7 +477,7 @@ struct rk_hdmi_platform_data {
 int board_boot_mode(void);
 
 /* for USB detection */
-#ifdef CONFIG_USB_GADGET
+#if defined(CONFIG_USB_GADGET) && !defined(CONFIG_RK_USB_DETECT_BY_OTG_BVALID)
 int __init board_usb_detect_init(unsigned gpio);
 #else
 static int inline board_usb_detect_init(unsigned gpio) { return 0; }
index b40b020a94de6934e2d4cf1bb2e0de75db5b0f2f..2671071a3f6b1fea25fdf6290aff31c5a08f280e 100755 (executable)
@@ -37,6 +37,7 @@ static irqreturn_t usb_detect_irq_handler(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
+#ifndef CONFIG_RK_USB_DETECT_BY_OTG_BVALID
 int __init board_usb_detect_init(unsigned gpio)
 {
        int ret;
@@ -75,6 +76,7 @@ int __init board_usb_detect_init(unsigned gpio)
 
        return 0;
 }
+#endif
 
 #ifdef IRQ_OTG_BVALID
 #include <linux/io.h>