]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ar71xx: add usb power gpio for GL.iNet GL-MIFI
authorKyson Lok <kysonlok@gmail.com>
Sat, 4 Aug 2018 06:23:37 +0000 (14:23 +0800)
committerKyson Lok <kysonlok@gmail.com>
Mon, 6 Aug 2018 08:13:05 +0000 (16:13 +0800)
target/linux/ar71xx/files/arch/mips/ath79/mach-gl-mifi.c

index a5c68ed65ab1b14e1dc96742c7ae610960dd9d58..a588b3d62c851cf66c09b89b8738d36f00a3dcce 100644 (file)
@@ -31,6 +31,8 @@
 
 #define GL_MIFI_GPIO_BTN_RESET    11
 
+#define GL_MIFI_GPIO_USB_POWER         6
+
 #define GL_MIFI_KEYS_POLL_INTERVAL     20      /* msecs */
 #define GL_MIFI_KEYS_DEBOUNCE_INTERVAL (3 * GL_MIFI_KEYS_POLL_INTERVAL)
 
@@ -97,6 +99,10 @@ static void __init gl_mifi_setup(void)
                                        ARRAY_SIZE(gl_mifi_gpio_keys),
                                        gl_mifi_gpio_keys);
 
+       gpio_request_one(GL_MIFI_GPIO_USB_POWER,
+                        GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+                        "usbpower");
+
        /* enable usb */
        ath79_register_usb();