[OpenWrt-Devel] [PATCH] ar71xx: ZyXEL NBG6716 led/buttons cleanup

Marcin Mikolajczak gr4ffy at gmail.com
Wed Feb 11 15:24:57 EST 2015


ZyXEL NBG6716 led/buttons cleanup
 - improper numbered leds
 - improper named buttons

Signed-off-by: Marcin Mikolajczak <gr4ffy at gmail.com>
---
Index: target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
===================================================================
--- target/linux/ar71xx/base-files/etc/uci-defaults/01_leds	(revision 44411)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/01_leds	(working copy)
@@ -220,8 +220,8 @@
 	ucidef_set_led_netdev "wan" "WAN" "zyxel:white:internet" "eth1"
 	ucidef_set_led_wlan "wlan" "WLAN" "zyxel:white:wifi2g" "phy1tpt"
 	ucidef_set_led_wlan "wlan5" "WLAN5" "zyxel:white:wifi5g" "phy0tpt"
-	ucidef_set_led_usbdev "usb1" "USB1" "zyxel:white:usb0" "1-1"
-	ucidef_set_led_usbdev "usb2" "USB2" "zyxel:white:usb1" "2-1"
+	ucidef_set_led_usbdev "usb1" "USB1" "zyxel:white:usb1" "2-1"
+	ucidef_set_led_usbdev "usb2" "USB2" "zyxel:white:usb2" "1-1"
 	;;
 
 om2p | \
Index: target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c
===================================================================
--- target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c	(revision 44411)
+++ target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c	(working copy)
@@ -43,8 +43,8 @@
 
 #define NBG6716_GPIO_LED_INTERNET	18
 #define NBG6716_GPIO_LED_POWER		15
-#define NBG6716_GPIO_LED_USB0		13
 #define NBG6716_GPIO_LED_USB1		4
+#define NBG6716_GPIO_LED_USB2		13
 #define NBG6716_GPIO_LED_WIFI2G		19
 #define NBG6716_GPIO_LED_WIFI5G		17
 #define NBG6716_GPIO_LED_WPS		21
@@ -51,8 +51,8 @@
 
 #define NBG6716_GPIO_BTN_RESET		23
 #define NBG6716_GPIO_BTN_RFKILL		1
-#define NBG6716_GPIO_BTN_USB0		14
 #define NBG6716_GPIO_BTN_USB1		0
+#define NBG6716_GPIO_BTN_USB2		14
 #define NBG6716_GPIO_BTN_WPS		22
 
 #define NBG6716_KEYS_POLL_INTERVAL	20	/* msecs */
@@ -75,13 +75,13 @@
 		.active_low	= 1,
 	},
 	{
-		.name		= "zyxel:white:usb0",
-		.gpio		= NBG6716_GPIO_LED_USB0,
+		.name		= "zyxel:white:usb1",
+		.gpio		= NBG6716_GPIO_LED_USB1,
 		.active_low	= 1,
 	},
 	{
-		.name		= "zyxel:white:usb1",
-		.gpio		= NBG6716_GPIO_LED_USB1,
+		.name		= "zyxel:white:usb2",
+		.gpio		= NBG6716_GPIO_LED_USB2,
 		.active_low	= 1,
 	},
 	{
@@ -119,19 +119,19 @@
 		.active_low	= 1,
 	},
 	{
-		.desc		= "USB0 eject button",
+		.desc		= "USB1 eject button",
 		.type		= EV_KEY,
-		.code		= BTN_0,
+		.code		= BTN_1,
 		.debounce_interval = NBG6716_KEYS_DEBOUNCE_INTERVAL,
-		.gpio		= NBG6716_GPIO_BTN_USB0,
+		.gpio		= NBG6716_GPIO_BTN_USB1,
 		.active_low	= 1,
 	},
 	{
-		.desc		= "USB1 eject button",
+		.desc		= "USB2 eject button",
 		.type		= EV_KEY,
-		.code		= BTN_1,
+		.code		= BTN_2,
 		.debounce_interval = NBG6716_KEYS_DEBOUNCE_INTERVAL,
-		.gpio		= NBG6716_GPIO_BTN_USB1,
+		.gpio		= NBG6716_GPIO_BTN_USB2,
 		.active_low	= 1,
 	},
 	{
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list