[OpenWrt-Devel] [PATCH] oxnas: also make use of the GPIO poweroff driver

Daniel Golle daniel at makrotopia.org
Fri Dec 12 19:37:34 EST 2014


Works great to power-off the kd20 ;)

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/oxnas/config-3.14                            | 4 ++++
 target/linux/oxnas/config-3.18                            | 4 ++++
 target/linux/oxnas/files/arch/arm/boot/dts/ox820-kd20.dts | 5 +++++
 3 files changed, 13 insertions(+)

diff --git a/target/linux/oxnas/config-3.14 b/target/linux/oxnas/config-3.14
index a065363..9b0f3f9 100644
--- a/target/linux/oxnas/config-3.14
+++ b/target/linux/oxnas/config-3.14
@@ -280,6 +280,10 @@ CONFIG_PM=y
 CONFIG_PM_CLK=y
 # CONFIG_PM_DEBUG is not set
 CONFIG_PM_RUNTIME=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_GPIO=y
+# CONFIG_POWER_RESET_VEXPRESS is not set
+CONFIG_POWER_SUPPLY=y
 CONFIG_PPS=y
 # CONFIG_PREEMPT_RCU is not set
 CONFIG_PRINTK_TIME=y
diff --git a/target/linux/oxnas/config-3.18 b/target/linux/oxnas/config-3.18
index b9172d9..e255781 100644
--- a/target/linux/oxnas/config-3.18
+++ b/target/linux/oxnas/config-3.18
@@ -293,6 +293,10 @@ CONFIG_PM=y
 CONFIG_PM_CLK=y
 # CONFIG_PM_DEBUG is not set
 CONFIG_PM_RUNTIME=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_GPIO=y
+# CONFIG_POWER_RESET_VEXPRESS is not set
+CONFIG_POWER_SUPPLY=y
 CONFIG_PPS=y
 # CONFIG_PREEMPT_RCU is not set
 CONFIG_PRINTK_TIME=y
diff --git a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-kd20.dts b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-kd20.dts
index 79442be..9375748 100644
--- a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-kd20.dts
+++ b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-kd20.dts
@@ -137,4 +137,9 @@
 		compatible = "gpio-fan";
 		gpios = <&GPIOA 2 1>;
 	};
+
+	gpio-poweroff {
+		compatible = "gpio-poweroff";
+		gpios = <&GPIOA 9 0>;
+	};
 };
-- 
2.1.3
_______________________________________________
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