diff options
Diffstat (limited to 'meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh')
-rwxr-xr-x | meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh b/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh new file mode 100755 index 0000000000..8e0dae38c2 --- /dev/null +++ b/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +GPIO_BASE=$(cat /sys/devices/platform/ahb/ahb:apb/1e780000.gpio/gpio/*/base) +GPIO_NUM=$(($GPIO_BASE + 24 + 3)) + +echo 1 > /sys/class/gpio/gpio${GPIO_NUM}/value +sleep 5 +echo 0 > /sys/class/gpio/gpio${GPIO_NUM}/value + +exit 0; |