aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-02-13 07:28:53 +0000
committerJohn Crispin <blogic@openwrt.org>2015-02-13 07:28:53 +0000
commit9d5f884a09e6b612ac2695c2f4fe184b1a0a6c6d (patch)
tree02c46daccc58cd2efdcf99caad80a6a24f9d9f62 /target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c
parent1ac4c843665031399429e8190a23773c9f832a1c (diff)
downloadmaster-187ad058-9d5f884a09e6b612ac2695c2f4fe184b1a0a6c6d.tar.gz
master-187ad058-9d5f884a09e6b612ac2695c2f4fe184b1a0a6c6d.tar.bz2
master-187ad058-9d5f884a09e6b612ac2695c2f4fe184b1a0a6c6d.zip
ar71xx: ZyXEL NBG6716 add gpio usb power on/off
ZyXEL NBG6716 add missing GPIO USB power on/off Signed-off-by: Marcin Mikolajczak <gr4ffy at gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44425 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c7
1 files changed, 7 insertions, 0 deletions
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 <linux/platform_device.h>
#include <linux/ar8216_platform.h>
+#include <linux/gpio.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/platform/ar934x_nfc.h>
@@ -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);