meta-ibm: Use gpioset in reset-fan-watchdog
The reset-fan-watchdog service needs to toggle a GPIO in order to unlock
the fan watchdog circuit so fans can be controlled after the watchdog
has expired and locked them at high speed. This gets called on every
power on to bring the fans under control again in case the watchdog had
expired on the previous boot.
This was done previously using a custom application which used libgpiod
under the covers, which was written before gpioset was around.
Now that gpioset is available, just use it instead to toggle the GPIO so
there's less custom code we have to worry about maintaining.
The actual minimum timing requirement of the toggle is around 5ns, so
the 1us being used by all the config files meets that.
Tested:
Expired the watchdog by stopping the fan-watchdog service, then powered
off and back on and made sure the fans can still be controlled.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ibd36ff17e83b57d521364f0092dfa1f5abf34856
diff --git a/meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service b/meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service
index 8c8aefe..6a2937a 100644
--- a/meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service
+++ b/meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service
@@ -8,4 +8,5 @@
Type=oneshot
RemainAfterExit=yes
EnvironmentFile={envfiledir}/obmc/fan-watchdog/reset-fan-watchdog.conf
-ExecStart=/usr/bin/phosphor-gpio-util -p ${{GPIO_PATH}} -g ${{GPIO}} -a ${{ACTION}} -d ${{DELAY}}
+ExecStart=/usr/bin/gpioset --mode=time -u ${{DELAY}} ${{GPIO_PATH}} ${{GPIO}}=0
+ExecStart=/usr/bin/gpioset --mode=time -u ${{DELAY}} ${{GPIO_PATH}} ${{GPIO}}=1