summaryrefslogtreecommitdiff
path: root/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-ctrl-init
blob: da4c278c29c97ccaba037e4b856a0592525d1551 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# Provide source directive to shellcheck.
gpioInitHighTable=(
    "power-nic-bmc-enable"
    "usb-bmc-enable"
    "reset-cause-usb-hub"
    "bmc-ready"
    "fan0-bmc-cpld-enable"
    "fan1-bmc-cpld-enable"
    "fan2-bmc-cpld-enable"
    "fan3-bmc-cpld-enable"
)

gpio-init()
{
    for gpioInitHigh in "${gpioInitHighTable[@]}"
    do
    # need the word splitting for gpiofind command.
    # shellcheck disable=SC2046
    gpioset $(gpiofind "${gpioInitHigh}")=1
    done
}

gpio-init