Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

Commit 6cf59df

Browse files
Add EXPORTED_GPIOS to M11gpio and configure it to export 890 and 898 per default.
1 parent 26334e8 commit 6cf59df

File tree

1 file changed

+13
-0
lines changed
  • OS/buildroot/overlay/etc/init.d

1 file changed

+13
-0
lines changed

OS/buildroot/overlay/etc/init.d/M11gpio

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,27 @@ else
77
fi
88

99
MODULE="gpio.ko"
10+
EXPORTED_GPIOS="890 898"
1011

1112
case "$1" in
1213
insert)
1314
echo "Inserting $MODULE..."
1415
modprobe $MODULE
1516
echo "Inserted $MODULE"
17+
18+
echo "Exporting selected GPIOs..."
19+
for gpio in $EXPORTED_GPIOS; do
20+
echo $gpio > /sys/class/gpio/export
21+
done
22+
echo "Exported selected GPIOs"
1623
;;
1724
remove)
25+
echo "Unexporting selected GPIOs..."
26+
for gpio in $EXPORTED_GPIOS; do
27+
echo $gpio > /sys/class/gpio/unexport
28+
done
29+
echo "Unexported selected GPIOs"
30+
1831
echo "Removing $MODULE..."
1932
modprobe -r $MODULE
2033
echo "Removed $MODULE"

0 commit comments

Comments
 (0)