summaryrefslogtreecommitdiff
path: root/meta-quanta/meta-q71l
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2023-04-16 04:05:21 +0300
committerPatrick Williams <patrick@stwcx.xyz>2023-04-27 19:16:12 +0300
commit8c2262344c1fc1f8708f4a44af395ea8c49f12e2 (patch)
treec77f039128cd588f75b89a2272248960b3482baf /meta-quanta/meta-q71l
parentbd58e95482128fa5aefb97125613e6b23723e85e (diff)
downloadopenbmc-8c2262344c1fc1f8708f4a44af395ea8c49f12e2.tar.xz
meta-quanta: fix shellcheck issues
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I189baf142cc86d44ebbf615edd3bb0ec1785be8d
Diffstat (limited to 'meta-quanta/meta-q71l')
-rwxr-xr-xmeta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/init_once.sh16
-rwxr-xr-xmeta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh2
-rwxr-xr-xmeta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh2
3 files changed, 10 insertions, 10 deletions
diff --git a/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/init_once.sh b/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/init_once.sh
index 205ecaff0f..08b288083f 100755
--- a/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/init_once.sh
+++ b/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/init_once.sh
@@ -7,26 +7,26 @@ function set_gpio_active_low() {
return;
fi
- echo $1 > /sys/class/gpio/export
- echo 1 > /sys/class/gpio/gpio$1/active_low
- echo $2 > /sys/class/gpio/gpio$1/direction
+ echo "$1" > /sys/class/gpio/export
+ echo 1 > "/sys/class/gpio/gpio$1/active_low"
+ echo "$2" > "/sys/class/gpio/gpio$1/direction"
}
GPIO_BASE=$(cat /sys/devices/platform/ahb/ahb:apb/1e780000.gpio/gpio/*/base)
# FM_BMC_READY_N, GPIO Q4, active low
-set_gpio_active_low $((${GPIO_BASE} + 128 + 4)) high
+set_gpio_active_low $((GPIO_BASE + 128 + 4)) high
# FM_BMC_SSB_SMI_LPC_N, GPIO Q6, active low
-set_gpio_active_low $((${GPIO_BASE} + 128 + 6)) high
+set_gpio_active_low $((GPIO_BASE + 128 + 6)) high
# FM_BMC_SYS_THROTTLE_N, GPIO A3, active low
-set_gpio_active_low $((${GPIO_BASE} + 0 + 3)) high
+set_gpio_active_low $((GPIO_BASE + 0 + 3)) high
# FM_BMC_SSB_SCI_LPC_N, GPIO E4, active low
-set_gpio_active_low $((${GPIO_BASE} + 32 + 4)) high
+set_gpio_active_low $((GPIO_BASE + 32 + 4)) high
# FP_PWR_BTN_PASS_R_N, GPIO D3, active low
-set_gpio_active_low $((${GPIO_BASE} + 24 + 3)) high
+set_gpio_active_low $((GPIO_BASE + 24 + 3)) high
exit 0;
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
index 8e0dae38c2..5049f41f30 100755
--- a/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh
+++ b/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh
@@ -1,7 +1,7 @@
#!/bin/bash
GPIO_BASE=$(cat /sys/devices/platform/ahb/ahb:apb/1e780000.gpio/gpio/*/base)
-GPIO_NUM=$(($GPIO_BASE + 24 + 3))
+GPIO_NUM=$((GPIO_BASE + 24 + 3))
echo 1 > /sys/class/gpio/gpio${GPIO_NUM}/value
sleep 5
diff --git a/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh b/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh
index f925a33a8c..2ae70de350 100755
--- a/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh
+++ b/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh
@@ -1,7 +1,7 @@
#!/bin/bash
GPIO_BASE=$(cat /sys/devices/platform/ahb/ahb:apb/1e780000.gpio/gpio/*/base)
-GPIO_NUM=$(($GPIO_BASE + 24 + 3))
+GPIO_NUM=$((GPIO_BASE + 24 + 3))
echo 1 > /sys/class/gpio/gpio${GPIO_NUM}/value
sleep 1