]> www.infradead.org Git - users/dwmw2/linux.git/commit
ACPI: EC: make EC support compile-time conditional
authorArnd Bergmann <arnd@arndb.de>
Fri, 11 Oct 2024 06:18:17 +0000 (06:18 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 24 Oct 2024 15:47:15 +0000 (17:47 +0200)
commita6021aa24f6417416d93318bbfa022ab229c33c8
treef72102ddc495b81fbec8ca07791ad2a381eeaf74
parent42f7652d3eb527d03665b09edac47f85fb600924
ACPI: EC: make EC support compile-time conditional

The embedded controller code is mainly used on x86 laptops and cannot
work without PC style I/O port access.

Make this a user-visible configuration option that is default enabled
on x86 but otherwise disabled, and that can never be enabled unless
CONFIG_HAS_IOPORT is also available.

The empty stubs in internal.h help ignore the EC code in configurations
that don't support it. In order to see those stubs, the sbshc code also
has to include this header and drop duplicate declarations.

All the direct callers of ec_read/ec_write already had an x86
dependency and now also need to depend on APCI_EC.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patch.msgid.link/20241011061948.3211423-1-arnd@kernel.org
[ rjw: Subject edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/Kconfig
drivers/acpi/Makefile
drivers/acpi/internal.h
drivers/acpi/sbshc.c
drivers/char/Kconfig
drivers/hwmon/Kconfig
drivers/platform/x86/Kconfig
drivers/platform/x86/dell/Kconfig
drivers/platform/x86/hp/Kconfig
drivers/platform/x86/intel/Kconfig
include/linux/acpi.h