diff options
Diffstat (limited to 'meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/chassis-poweroff')
-rw-r--r-- | meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/chassis-poweroff | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/chassis-poweroff b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/chassis-poweroff index 991dbc5dc2..98692ea396 100644 --- a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/chassis-poweroff +++ b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/chassis-poweroff @@ -5,18 +5,24 @@ # Provide source directive to shellcheck. # shellcheck source=meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-cmd source /usr/libexec/phosphor-state-manager/power-cmd - -GPIOCHIP_IO_EXP_SLOT_PWR_CTRL=$(basename "/sys/bus/i2c/devices/$SPIDER_BOARD_IO_EXP_BUS_NUM-00$IO_EXP_SLOT_PWR_CTRL_ADDR/"*gpiochip*) - #IO 0:7 input port for showing slot 1:8 power status #IO 8:16 output port for controlling slot 1:8 power status CHASSIS_ID=$1 IO_EXP_SLOT_PWR_STATUS=$((CHASSIS_ID - 1)) IO_EXP_SLOT_PWR_CTRL=$((IO_EXP_SLOT_PWR_STATUS + 8)) +IO_EXP_BIC_PWR_CTRL=32 + +GPIOCHIP_IO_EXP_SLOT_PWR_CTRL=$(basename "/sys/bus/i2c/devices/$SPIDER_BOARD_IO_EXP_BUS_NUM-00$IO_EXP_SLOT_PWR_CTRL_ADDR/"*gpiochip*) +GPIOCHIP_IO_EXP_BIC_PWR_CTRL=$(basename "/sys/bus/i2c/devices/$IO_EXP_SLOT_PWR_STATUS-00$IO_EXP_BIC_PWR_CTRL_ADDR/"*gpiochip*) # Server 12v power off chassis-power-off() { + if ! gpioset "$GPIOCHIP_IO_EXP_BIC_PWR_CTRL" "$IO_EXP_BIC_PWR_CTRL"=0 + then + echo "Failed to set slot$1 sentinel dome bic off" + fi + sleep 1 if ! gpioset "$GPIOCHIP_IO_EXP_SLOT_PWR_CTRL" "$IO_EXP_SLOT_PWR_CTRL"=1 then echo "Failed to set slot$1 power off" |