public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Slawomir Rosek <srosek@google.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
	Alex Hung <alexhung@gmail.com>,  Hans de Goede <hansg@kernel.org>,
	Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com>,
	 AceLan Kao <acelan.kao@canonical.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Zhang Rui <rui.zhang@intel.com>,
	 Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Tomasz Nowicki <tnowicki@google.com>,
	 Stanislaw Kardach <skardach@google.com>,
	Michal Krawczyk <mikrawczyk@google.com>,
	 linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	 platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org,
	 Slawomir Rosek <srosek@google.com>
Subject: [PATCH v3 0/6] ACPI: DPTF: Move INT340X enumeration from DPTF core to thermal drivers
Date: Thu,  2 Oct 2025 11:33:58 +0000	[thread overview]
Message-ID: <20251002113404.3117429-1-srosek@google.com> (raw)

The Intel Dynamic Platform and Thermal Framework (DPTF) relies on
the INT340X ACPI device objects. The temperature information and
cooling ability are exposed to the userspace via those objects.

Since kernel v3.17 the ACPI bus scan handler is introduced to prevent
enumeration of INT340X ACPI device objects on the platform bus unless
related thermal drivers are enabled. However, using the IS_ENABLED()
macro in the ACPI scan handler forces the kernel to be recompiled
when thermal drivers are enabled or disabled, which is a significant
limitation of its modularity. The IS_ENABLED() macro is particularly
problematic for the Android Generic Kernel Image (GKI) project which
uses unified core kernel while SoC/board support is moved to loadable
vendor modules.

This patch set moves enumeration of INT340X ACPI device objects on
the platform bus from DPTF core to thermal drivers. It starts with
some code cleanup and reorganization to eventually remove IS_ENABLED()
macro from the ACPI bus scan handler. Brief list of changes is listed
below:

1) Remove SOC DTS thermal driver case from the ACPI scan handler
   since its dependency on INT340X driver is unrelated to DPTF
2) Move all INT340X ACPI device ids to the common header and update
   the DPTF core and thermal drivers accordingly
3) Move dynamic enumeration of ACPI device objects on the platform bus
   from the intel-hid and intel-vbtn drivers to the ACPI platform core
4) Move enumeration of INT340X ACPI device objects on the platform bus
   from DPTF core to thermal drivers using ACPI platform core methods

Link to v1: https://lore.kernel.org/all/20250830053404.763995-1-srosek@google.com/
Link to v2: https://lore.kernel.org/all/20250917120719.2390847-1-srosek@google.com/

In v3 the SoC DTS thermal explicitly depends on X86_64.

Slawomir Rosek (6):
  ACPI: DPTF: Ignore SoC DTS thermal while scanning
  ACPI: DPTF: Move INT340X device IDs to header
  ACPI: DPTF: Move PCH FIVR device IDs to header
  ACPI: DPTF: Remove not supported INT340X IDs
  ACPI: platform: Add macro for acpi platform driver
  ACPI: DPTF: Move INT340X enumeration to modules

 drivers/acpi/acpi_platform.c                  | 27 +++++++
 drivers/acpi/dptf/dptf_pch_fivr.c             | 10 +--
 drivers/acpi/dptf/dptf_power.c                | 20 +----
 drivers/acpi/dptf/int340x_thermal.c           | 76 ++++---------------
 drivers/acpi/fan.h                            | 10 +--
 drivers/acpi/fan_core.c                       |  2 +-
 drivers/acpi/int340x_thermal.h                | 76 +++++++++++++++++++
 drivers/platform/x86/intel/hid.c              | 33 +-------
 drivers/platform/x86/intel/vbtn.c             | 30 +-------
 drivers/thermal/intel/Kconfig                 |  3 +-
 .../intel/int340x_thermal/int3400_thermal.c   | 12 +--
 .../intel/int340x_thermal/int3401_thermal.c   |  5 +-
 .../intel/int340x_thermal/int3402_thermal.c   |  5 +-
 .../intel/int340x_thermal/int3403_thermal.c   | 12 +--
 .../intel/int340x_thermal/int3406_thermal.c   |  5 +-
 include/linux/platform_device.h               | 17 +++++
 16 files changed, 164 insertions(+), 179 deletions(-)
 create mode 100644 drivers/acpi/int340x_thermal.h

-- 
2.51.0.618.g983fd99d29-goog


             reply	other threads:[~2025-10-02 11:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02 11:33 Slawomir Rosek [this message]
2025-10-02 11:33 ` [PATCH v3 1/6] ACPI: DPTF: Ignore SoC DTS thermal while scanning Slawomir Rosek
2025-10-22 18:33   ` Rafael J. Wysocki
2025-10-23 14:36     ` Sławomir Rosek
2025-10-23 14:59       ` Rafael J. Wysocki
2025-10-02 11:34 ` [PATCH v3 2/6] ACPI: DPTF: Move INT340X device IDs to header Slawomir Rosek
2025-10-22 18:46   ` Rafael J. Wysocki
2025-10-23 14:41     ` Sławomir Rosek
2025-10-23 15:11       ` Rafael J. Wysocki
2025-10-23 16:27         ` Sławomir Rosek
2025-10-23 16:30           ` Rafael J. Wysocki
2025-11-03 16:30             ` Sławomir Rosek
2025-10-02 11:34 ` [PATCH v3 3/6] ACPI: DPTF: Move PCH FIVR " Slawomir Rosek
2025-10-02 11:34 ` [PATCH v3 4/6] ACPI: DPTF: Remove not supported INT340X IDs Slawomir Rosek
2025-10-22 18:48   ` Rafael J. Wysocki
2025-10-23 14:37     ` Sławomir Rosek
2025-10-02 11:34 ` [PATCH v3 5/6] ACPI: platform: Add macro for acpi platform driver Slawomir Rosek
2025-10-22 18:58   ` Rafael J. Wysocki
2025-10-02 11:34 ` [PATCH v3 6/6] ACPI: DPTF: Move INT340X enumeration to modules Slawomir Rosek
2025-10-22 17:02 ` [PATCH v3 0/6] ACPI: DPTF: Move INT340X enumeration from DPTF core to thermal drivers Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251002113404.3117429-1-srosek@google.com \
    --to=srosek@google.com \
    --cc=acelan.kao@canonical.com \
    --cc=alexhung@gmail.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mikrawczyk@google.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=skardach@google.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=tnowicki@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox