Some case need configure the GPIO as power off button.
One solution is to use “gpio-keys” to send the “KEY_POWER” event to the system.
Co-work with systemd, system gets power off.