]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ACPI: x86/rtc-cmos: Use platform device for driver binding
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 23 Feb 2026 15:30:21 +0000 (16:30 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 26 Feb 2026 17:47:52 +0000 (18:47 +0100)
commit2a78e42104444f948698f1225deaf515e9b7224d
treee0b89a26be6bc0c7e59c59f3353408f032e2453c
parent1ae2f435350ec05224a39995c3a680aa6fdae5a5
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
drivers/acpi/acpi_pnp.c
drivers/acpi/x86/cmos_rtc.c
drivers/rtc/rtc-cmos.c
include/linux/acpi.h