Re: [PATCH v3 1/4] platform profile: Extract the core from ACPI

From: Geert Uytterhoeven

Date: Tue Nov 17 2026 - 06:54:05 EST


Hi Daniel,

On Sun, 25 Oct 2026 at 00:56, Daniel Lezcano
<daniel.lezcano@xxxxxxxxxxxxxxxx> wrote:
> Platform profile providers already use device-based callbacks and do not
> need ACPI types. The core is nevertheless confined to the ACPI build and
> refuses to initialize when ACPI is disabled.
>
> Move the implementation to drivers/platform/profile and introduce the
> firmware-independent PLATFORM_PROFILE symbol. Update all provider
> selectors. Keep provider-specific ACPI dependencies and the
> platform_profile module name.
>
> Isolate access to the legacy ACPI kobject in an optional compatibility
> object linked into the same module. Retain the legacy ABI on active ACPI
> systems, and initialize the class even when ACPI is absent or disabled.
>
> Use subsys_initcall_sync so the class is ready before built-in thermal
> and CPUFreq providers, but after ACPI has initialized its compatibility
> kobject.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxxxxxxxx>

Thanks for your patch, which is now commit 699041135f75b13a
("platform profile: Extract the core from ACPI") in pm/linux-next/

> --- a/drivers/platform/Kconfig
> +++ b/drivers/platform/Kconfig
> @@ -1,4 +1,20 @@
> # SPDX-License-Identifier: GPL-2.0-only
> +config PLATFORM_PROFILE
> + tristate "Platform profile support"

I guess this can be invisible (perhaps "... if COMPILE_TEST"?), as
you have updated all provider selectors?

If not, I guess this needs a "depend on X86 || COMPILE_TEST", so people
configuring kernels for different architectures do not see this option?

> + help
> + Provide a common sysfs interface for selecting platform power,
> + performance and cooling profiles. Platform-specific provider drivers
> + map their operating modes onto standard profile names, independently
> + of the firmware interface they use.
> +
> + The core exposes per-provider controls under /sys/class/platform-profile/.
> + A provider driver must register before profile attributes become
> + available. ACPI is not required; on ACPI systems the legacy system-wide
> + interface under /sys/firmware/acpi/ is also provided.
> +
> + To compile this as a module, choose M here: the module will be called
> + platform_profile.
> +
> source "drivers/platform/mips/Kconfig"
>
> source "drivers/platform/loongarch/Kconfig"

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds