From e29eba6369fd29a2c60d2723db7f57fedb42c47f Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 13 Feb 2015 07:28:53 +0000 Subject: [PATCH] ar71xx: ZyXEL NBG6716 add gpio usb power on/off ZyXEL NBG6716 add missing GPIO USB power on/off Signed-off-by: Marcin Mikolajczak SVN-Revision: 44425 --- target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c index b27872f410..acdfb0ae70 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -55,6 +56,8 @@ #define NBG6716_GPIO_BTN_USB2 14 #define NBG6716_GPIO_BTN_WPS 22 +#define NBG6716_GPIO_USB_POWER 16 + #define NBG6716_KEYS_POLL_INTERVAL 20 /* msecs */ #define NBG6716_KEYS_DEBOUNCE_INTERVAL (3 * NBG6716_KEYS_POLL_INTERVAL) @@ -203,6 +206,10 @@ static void __init nbg6716_common_setup(void) ath79_nfc_set_ecc_mode(AR934X_NFC_ECC_HW); ath79_register_nfc(); + gpio_request_one(NBG6716_GPIO_USB_POWER, + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, + "USB power"); + ath79_register_usb(); nbg6716_get_mac("ethaddr=", tmpmac); -- 2.30.2