[PATCH v6 0/2] ACPI: Add ACPI 6.5 fixed clock support

From: Paul Cercueil

Date: Mon Nov 30 2026 - 07:29:01 EST


Hi Rafael, Russell,

Here's the v6 of my patchset that adds partial support for ACPI 6.5
clock resources.

This v6 adds a patch to clkdev, which updates clk_get() to use the ACPI
companion device if available, and fall back to the regular path if the
clock wasn't found there.

It also reworks the main patch, with quite a lot of changes, most
notably the switch from using devm functions which can't be used there.

This patchset was tested both for devices that are probed at boot, and
also through hot-plugging of ACPI tables using configfs. The ACPI
clocks are correctly probed when a new ACPI device is discovered, before
the driver probes, and are correctly unregistered when the hot-plugged
ACPI table is unloaded, after the driver is removed.

Changes in v6:

- [1/2]:
- Return -EFAULT instead of -EINVAL on bad firmware data
- Invert condition "res->type != ACPI_RESOURCE_TYPE_CLOCK_INPUT"
- Rename acpi_platform_init_clocks() to acpi_dev_init_clocks(), and
move it to drivers/acpi/resource.c
- Make sure clock index is incremented even for non-fixed clocks
- Use non-devm variants of the clk/clkdev APIs
- Keep a list of the acpi_device's clk/clkdev data so that they can be
unregistered on device removal
- acpi_dev_init_clocks() is now called from acpi_bus_attach()
- Add function acpi_dev_remove_clocks() to unregister the ACPI clocks,
called on ACPI device removal
- Add documentation for these two functions
- Use acpi_handle_info() instead of dev_warn()

- [2/2]:
- New patch

Cheers,
-Paul

Paul Cercueil (2):
ACPI: Add basic support for ACPI 6.5 fixed clock resources
clk: Search clocks of ACPI device with its companion device

drivers/acpi/resource.c | 132 ++++++++++++++++++++++++++++++++++++++++
drivers/acpi/scan.c | 6 ++
drivers/clk/clkdev.c | 10 +++
include/acpi/acpi_bus.h | 1 +
include/linux/acpi.h | 3 +
5 files changed, 152 insertions(+)

--
2.47.3