From 3d071ee73fe297f86833ac2db25384852255ac01 Mon Sep 17 00:00:00 2001 From: Charles Boyer Date: Thu, 3 Feb 2022 15:11:38 -0600 Subject: meta-fii: meta-kudo: Use phosphor-buttons package The method to monitor the power and reset buttons through the ampere_power_util.sh with phosphor-gpio-monitor was a temporary solution. It was a temporary workaround until there is support for Nuvoton GPIO in phosphor-buttons. Signed-off-by: Charles Boyer Change-Id: I34541c0f56887962ad780b811eae44f1d851059d --- .../recipes-kudo/host/files/ampere_power_util.sh | 24 +--------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'meta-fii/meta-kudo/recipes-kudo/host') diff --git a/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh b/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh index 934af16d43..d6cfea498a 100644 --- a/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh +++ b/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh @@ -6,7 +6,7 @@ source /usr/libexec/kudo-fw/kudo-lib.sh # Usage of this utility function usage() { - echo "usage: power-util mb [on|off|graceful_shutdown|host_reset|host_cycle|shutdown_ack|hotswap|power_button]"; + echo "usage: power-util mb [on|off|graceful_shutdown|host_reset|host_cycle|shutdown_ack|hotswap]"; } hotswap() { @@ -100,26 +100,6 @@ shutdown_ack() { fi } -power_button() { - echo "Power button trigger event." - current_time="$(timestamp)" - if [ -f "/run/openbmc/power-button" ]; then - echo "Power button released" - press_time="$(cat /run/openbmc/power-button)" - if [[ "$current_time" -le "(($press_time + 1))" ]]; then - power_on - elif [[ "$current_time" -ge "(($press_time + 5))" ]]; then - power_off - else - echo "Button press did not match interval." - fi - rm "/run/openbmc/power-button" - else - echo "Power button pressed" - timestamp > "/run/openbmc/power-button" - fi -} - if [ $# -lt 2 ]; then echo "Total number of parameter=$#" echo "Insufficient parameter" @@ -156,8 +136,6 @@ elif [ "$2" == "host_cycle" ]; then host_cycle elif [ "$2" == "shutdown_ack" ]; then shutdown_ack -elif [ "$2" == "power_button" ]; then - power_button else echo "Invalid parameter2=$2" usage; -- cgit v1.2.3