[source] lantiq: set up DSL front-end GPIOs if they exist

LEDE Commits lede-commits at lists.infradead.org
Fri Jul 7 04:41:40 PDT 2017


mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/08cd5b769deb4833b7a20208fa15674f52023fea

commit 08cd5b769deb4833b7a20208fa15674f52023fea
Author: Thomas Nixon <tom at tomn.co.uk>
AuthorDate: Sun Jul 2 13:33:00 2017 +0100

    lantiq: set up DSL front-end GPIOs if they exist
    
    This is necessary for devices using the PSB80108/VRX220LD front-end
    (currently only known on the Netgear DM200).
    
    Signed-off-by: Thomas Nixon <tom at tomn.co.uk>
---
 package/network/config/ltq-vdsl-app/files/dsl_control | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control b/package/network/config/ltq-vdsl-app/files/dsl_control
index c659d50..7406fe1 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -225,6 +225,20 @@ start_service() {
 		;;
 	esac
 
+	local annexgpio="/sys/class/gpio/annex"
+	if [ -d "${annexgpio}a" ] && [ -d "${annexgpio}b" ]; then
+		case "${annex}" in
+			a*|l*|m*)
+				echo 1 > "${annexgpio}a/value"
+				echo 0 > "${annexgpio}b/value"
+				;;
+			b*|j*)
+				echo 0 > "${annexgpio}a/value"
+				echo 1 > "${annexgpio}b/value"
+				;;
+		esac
+	fi
+
 	if [ -z "${firmware}" ]; then
 		# search for the firmware provided by dsl-vrx200-firmware-xdsl-*
 		if grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo; then



More information about the lede-commits mailing list