[source] ramips: add button support and make LEDs known to userspace for DIR-860L B1

LEDE Commits lede-commits at lists.infradead.org
Thu Jun 30 08:12:59 PDT 2016


neoraider pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=103ed00cfb370236c3e96e427d5feb643a8d7c8e

commit 103ed00cfb370236c3e96e427d5feb643a8d7c8e
Author: Matthias Schiffer <mschiffer at universe-factory.net>
AuthorDate: Thu Jun 30 15:18:03 2016 +0200

    ramips: add button support and make LEDs known to userspace for DIR-860L B1
    
    Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
    Reviewed-by: Jo-Philipp Wich <jo at mein.io>
---
 target/linux/ramips/base-files/etc/board.d/01_leds |  3 +++
 target/linux/ramips/base-files/etc/diag.sh         |  1 +
 target/linux/ramips/dts/DIR-860L-B1.dts            | 12 ++++++++++++
 3 files changed, 16 insertions(+)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 460253c..0e30ba0 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -136,6 +136,9 @@ mzk-750dhp|\
 mzk-dp150n)
 	ucidef_set_led_default "power" "power" "$board:green:power" "1"
 	;;
+dir-860l-b1)
+	ucidef_set_led_netdev "wan" "wan" "$board:green:net" "eth0.2"
+	;;
 ex2700)
 	ucidef_set_led_default "power_r" "POWER (red)" "$board:red:power" "0"
 	set_wifi_led "$board:green:router"
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 0c5abb2..e9d623d 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -19,6 +19,7 @@ get_status_led() {
 	asl26555|\
 	br-6425|\
 	br-6475nd|\
+	dir-860l-b1|\
 	e1700|\
 	fonera20n|\
 	mzk-750dhp|\
diff --git a/target/linux/ramips/dts/DIR-860L-B1.dts b/target/linux/ramips/dts/DIR-860L-B1.dts
index b6336d8..579df58 100644
--- a/target/linux/ramips/dts/DIR-860L-B1.dts
+++ b/target/linux/ramips/dts/DIR-860L-B1.dts
@@ -44,6 +44,18 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 		poll-interval = <20>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 7 1>;
+			linux,code = <0x198>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio0 18 1>;
+			linux,code = <0x211>;
+		};
 	};
 };
 



More information about the lede-commits mailing list