op-pwrctl: Make latch transparent briefly, only after state changes

The Zaius motherboard has latches between BMC control pins to power up
the host and the input pins to the power sequencer. This allows BMC
resets to not interrupt power to the host.

Currently, the latches are made transparent prior to sampling the power
state of the system, which causes BMC boot to kill host power. In
addition the latches remain transparent, so the system can be brought
down by the BMC shutting down.

Enable the latches only after power control pins change state.
Enable the latches only momentarily.

After this change, Zaius BMC can reboot without taking down its host.

Signed-off-by: Xo Wang <xow@google.com>
Change-Id: If150cbcf3fabda359d1ce94602c40cb96741e869
1 file changed