summaryrefslogtreecommitdiff
path: root/meta-fii/meta-kudo/recipes-kudo/host
diff options
context:
space:
mode:
authorCharles Boyer <Charles.Boyer@fii-usa.com>2022-02-04 00:11:38 +0300
committerVivekanand Veeracholan <vveerach@google.com>2022-04-21 22:42:58 +0300
commit3d071ee73fe297f86833ac2db25384852255ac01 (patch)
tree7b1938d3ba9c96e55e65e5af85be4cf5080e78d4 /meta-fii/meta-kudo/recipes-kudo/host
parent7b2123ff805f73e61fb407b651a866b134486ebb (diff)
downloadopenbmc-3d071ee73fe297f86833ac2db25384852255ac01.tar.xz
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 <Charles.Boyer@fii-usa.com> Change-Id: I34541c0f56887962ad780b811eae44f1d851059d
Diffstat (limited to 'meta-fii/meta-kudo/recipes-kudo/host')
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh24
1 files changed, 1 insertions, 23 deletions
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;