CVSROOT: /cvs Module name: src Changes by: j...@cvs.openbsd.org 2022/10/03 15:02:02
Modified files: sys/dev/fdt : dapmic.c Log message: dapmic(4): support clean shutdown with the power button Register an interrupt handler and look for nONKEY events. Mask off all other events. Also clear the FAULT_LOG register at startup, but don't attempt to acknowledge its contents at runtime. This lets the user force a shutdown with a long power button press. Some events in EVENT_* or FAULT_LOG may benefit from more graceful handling. This makes it possible to cleanly shutdown my Hifive Unmatched using the power button. Thanks to kettenis@ who wrote sfgpio(4) to handle dapmic(4) interrupts on the Unmatched. ok kettenis@