summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-02-23 18:30:21 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-02-26 20:47:52 +0300
commit2a78e42104444f948698f1225deaf515e9b7224d (patch)
treee0b89a26be6bc0c7e59c59f3353408f032e2453c /include/linux
parent1ae2f435350ec05224a39995c3a680aa6fdae5a5 (diff)
downloadlinux-2a78e42104444f948698f1225deaf515e9b7224d.tar.xz
ACPI: x86/rtc-cmos: Use platform device for driver binding
Modify the rtc-cmos driver to bind to a platform device on systems with ACPI via acpi_match_table and advertise the CMOST RTC ACPI device IDs for driver auto-loading. Note that adding the requisite device IDs to it and exposing them via MODULE_DEVICE_TABLE() is sufficient for this purpose. Since the ACPI device IDs in question are the same as for the CMOS RTC ACPI scan handler, put them into a common header file and use the definition from there in both places. Additionally, to prevent a PNP device from being created for the CMOS RTC if a platform one is present already, make is_cmos_rtc_device() check cmos_rtc_platform_device_present introduced previously. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://patch.msgid.link/13969123.uLZWGnKmhe@rafael.j.wysocki
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 2bdb801cee01..5ecdcdaf31aa 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -791,6 +791,12 @@ const char *acpi_get_subsystem_id(acpi_handle handle);
int acpi_mrrm_max_mem_region(void);
#endif
+#define ACPI_CMOS_RTC_IDS \
+ { "PNP0B00", }, \
+ { "PNP0B01", }, \
+ { "PNP0B02", }, \
+ { "", }
+
extern bool cmos_rtc_platform_device_present;
#else /* !CONFIG_ACPI */