[PATCH] platform/x86/amd/pmf: constrain ACPI button linkage

From: Pengpeng Hou

Date: Mon Nov 30 2026 - 07:28:46 EST


The PMF input collection calls acpi_lid_open(). With AMD_PMF=y and
ACPI_BUTTON=m, button.h exposes the external declaration, but the
button implementation is not linked into vmlinux.

Constrain the optional dependency to exclude that combination. Keep
ACPI_BUTTON=n supported through the existing stub rather than
forcing the button driver on.

The issue was found by our static-analysis tool and manually reviewed.

Fixes: f4627dfd0e19 ("platform/x86/amd/pmf: Add support to get inputs from other subsystems")
Signed-off-by: Pengpeng Hou <hppiscas@xxxxxxx>
---
AI assistance: gpt 5 (patch preparation and review).

drivers/platform/x86/amd/pmf/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/amd/pmf/Kconfig b/drivers/platform/x86/amd/pmf/Kconfig
index ad4faf1..b7e5f35 100644
--- a/drivers/platform/x86/amd/pmf/Kconfig
+++ b/drivers/platform/x86/amd/pmf/Kconfig
@@ -12,6 +12,7 @@ config AMD_PMF
depends on TEE && AMDTEE
depends on AMD_SFH_HID
depends on HAS_IOMEM
+ depends on ACPI_BUTTON || !ACPI_BUTTON
help
This driver provides support for the AMD Platform Management Framework.
The goal is to enhance end user experience by making AMD PCs smarter,

base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244