From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>, Armin Wolf <w_armin@gmx.de>,
Hans de Goede <hansg@kernel.org>
Subject: [PATCH v1 0/4] ACPI: thermal: Convert ACPI thermal driver to a platform one
Date: Wed, 10 Dec 2025 15:41:37 +0100 [thread overview]
Message-ID: <6222428.lOV4Wx5bFT@rafael.j.wysocki> (raw)
Hi All,
This is a continuation of
https://lore.kernel.org/linux-acpi/2339822.iZASKD2KPV@rafael.j.wysocki/
specifically concerning the ACPI thermal driver which is kind of a special
case because ACPI thermal zone objects it binds to are formally not device
objects.
Also the series contains one extra modification on top of the driver
conversion.
The general rationale is the same as for the series linked above.
While binding drivers directly to struct acpi_device objects allows
basic functionality to be provided, at least in the majority of cases,
there are some problems with it, related to general consistency, sysfs
layout, power management operation ordering, and code cleanliness.
First of all, struct acpi_device objects represent firmware entities
rather than hardware and in many cases they provide auxiliary information
on devices enumerated independently (like PCI devices or CPUs). It is
therefore generally questionable to assign resources to them or create
class devices and similar under them because they don't provide
functionality associated with those entities by themselves (for example,
they don't generate wakeup or input events).
As a general rule, a struct acpi_device can only be a parent of another
struct acpi_device. If that's not the case, the location of the child
device in the device hierarchy is at least confusing and it may not be
straightforward to identify the piece of hardware corresponding to that
device.
Using system suspend and resume callbacks directly with struct acpi_device
objects is questionable either because it may cause ordering problems to
happen. Namely, struct acpi_device objects are registered before any
devices corresponded to by them and they land on the PM list before all
of those devices. Consequently, the execution ordering of their PM
callbacks may be different from what is generally expected. Moreover,
dependencies returned by _DEP objects don't generally affect struct
acpi_device objects themselves, only the "physical" device objects
associated with them, which potentially is one more source of inconsistency.
All of the above means that binding drivers to struct acpi_device "devices"
should generally be avoided and so this series converts three generic ACPI
device drivers, the button driver, the tiny power button driver, and the
battery driver, to platform drivers.
Patches [1-2/4] are preparatory, patch [3/4] is the driver conversion one,
and patch [4/4] updates thermal zone power management to stop attempting
to resume active cooling devices (fans).
Thanks!
next reply other threads:[~2025-12-10 14:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 14:41 Rafael J. Wysocki [this message]
2025-12-10 14:42 ` [PATCH v1 1/4] ACPI: scan: Register platform devices for thermal zones Rafael J. Wysocki
2025-12-18 6:28 ` lihuisong (C)
2025-12-10 14:43 ` [PATCH v1 2/4] ACPI: thermal: Adjust event notification routine Rafael J. Wysocki
2025-12-18 6:30 ` lihuisong (C)
2025-12-10 14:43 ` [PATCH v1 3/4] ACPI: thermal: Convert the driver to a platform one Rafael J. Wysocki
2025-12-18 6:39 ` lihuisong (C)
2025-12-10 14:44 ` [PATCH v1 4/4] ACPI: thermal: Rework system suspend and resume handling Rafael J. Wysocki
2025-12-18 6:48 ` lihuisong (C)
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=6222428.lOV4Wx5bFT@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=hansg@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=w_armin@gmx.de \
/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