From 77dde9f8f196157a0dda464e212073eb7822a87d Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Tue, 24 Feb 2026 17:06:38 +0100 Subject: [PATCH] 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 --- meta-digi-arm/conf/machine/ccimx95-dvk.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meta-digi-arm/conf/machine/ccimx95-dvk.conf b/meta-digi-arm/conf/machine/ccimx95-dvk.conf index 13224fa6f..5aec31690 100644 --- a/meta-digi-arm/conf/machine/ccimx95-dvk.conf +++ b/meta-digi-arm/conf/machine/ccimx95-dvk.conf @@ -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)}"