aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorThomas Nixon <tom@tomn.co.uk>2017-07-02 13:33:00 +0100
committerMathias Kresin <dev@kresin.me>2017-07-07 07:13:24 +0200
commit08cd5b769deb4833b7a20208fa15674f52023fea (patch)
treed325b228c9aede4efc0faf68ee17c0eba8ef50be /package/network
parent4b32d66216b4772cd29d34175d421eccc59d8d09 (diff)
downloadupstream-08cd5b769deb4833b7a20208fa15674f52023fea.tar.gz
upstream-08cd5b769deb4833b7a20208fa15674f52023fea.tar.bz2
upstream-08cd5b769deb4833b7a20208fa15674f52023fea.zip
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@tomn.co.uk>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/config/ltq-vdsl-app/files/dsl_control14
1 files changed, 14 insertions, 0 deletions
diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control b/package/network/config/ltq-vdsl-app/files/dsl_control
index c659d50e1b..7406fe1c0c 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