ccimx95: adapt systemd power key events for SMARC module

For the ccimx95 SMARC module, the power button is connected
to the MCA, and the MCA is the one that generates the signal
to the ON_OFF input. In the SMARC design, the power button is dedicated
(there is a different button for standby) so we want short key
presses to be treated as a poweroff event right away.
We also want systemd to ignore long presses, as these are absorbed by
the MCA firmware to forcefully power off the PMIC.

When SMARC is disabled, use the default behavior:
- short press: suspend
- long press: graceful poweroff

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This commit is contained in:
Hector Palacios 2026-02-24 17:06:38 +01:00
parent 6b9d2e4114
commit 77dde9f8f1
1 changed files with 10 additions and 0 deletions

View File

@ -83,3 +83,13 @@ DEFAULT_IMAGE_NAME ?= "dey-image-chromium"
BOOTABLE_ARTIFACTS = " \
imx-boot##SIGNED##-ccimx95-dvk.bin \
"
# Systemd logind power key event.
# short press:
# SMARC=1: graceful poweroff
# SMARC=0: suspend
# long press:
# SMARC=1: ignored by systemd (absorbed by MCA fw for a forceful poweroff)
# SMARC=0: graceful poweroff
LOGIND_HANDLE_POWER_KEY ?= "${@oe.utils.conditional('SMARC', '1', 'poweroff', 'suspend', d)}"
LOGIND_HANDLE_POWER_KEY_LONGPRESS ?= "${@oe.utils.conditional('SMARC', '1', 'ignore', 'poweroff', d)}"