Closed james-bay closed 4 years ago
@james-bay have you tried to replicate this on a Raspbian?
@agherzan No, but I will try. However, if I right understand this:
After a delay of 100ms, the GPIO is set to inactive, thus causing an active->inactive edge, triggering negative edge triggered power off. After another 100ms delay, the GPIO is driver active again. If the power is still on and the CPU still running after a 3000ms delay, a WARN_ON(1) is emitted.
It's expected behavior. That is, if the board is not powered off from outside, the driver warns about this.
Got it! Thanks.
Description I built core-image-base image then I added gpio-poweroff.dtbo to the
overlays
directory on an sd card and addeddtoverlay=gpio-poweroff,gpiopin=20
at the end ofconfig.txt
. When I runpoweroff
on gpio pin 20 I getactive_high
, but shutting down hangs. I don't use any external hardware, but with an HDMI LCD, the result is the same: the screen does not go blank and on it, I see a frozen cursor.The result I received: I can observe the following, when I'm using serial communication:
Additional details I use yocto branch Zeus,
systemd
as an init system and simplelocal.conf
:Maybe this is the correct behavior and I just have to de-energize the board on
active_high
?