diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-09-11 15:05:07 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-09-12 20:12:05 +0200 |
| commit | cdb9bf0faa50592d976eb956fcfc68382dae567b (patch) | |
| tree | 2d23d0e67ddc9a18cc323940a6f2b8bc2e929a5e /include/linux | |
| parent | 8a2622ae68984913ba0a778e64722f192721109b (diff) | |
ACPI: thermal: Use cooling device parent for thermal zone binding
The ACPI thermal zone .should_bind() callback function,
acpi_thermal_should_bind_cdev(), expects the given cooling device's
devdata to point to an ACPI device object whose ACPI handle should be
compared with ACPI handles in a list associated with the given trip
point. That is not particularly straightforward and it effectively
requires the drivers of ACPI cooling devices to populate the devdata
with addresses of the ACPI companions of the devices they bind to.
Consequently, the devdata cannot be used by the driver for its own
needs which is its intended purpose.
That can be overcome with the help of the observation that the
ACPI device objects to be matched against the lists of ACPI handles
associated with trip points are in fact the ACPI companions of the
parents of cooling devices. Thus instead of using the given cooling
device's devdata, it is sufficient to obtain the ACPI handle of its
parent and compare that ACPI handle with the ones in the list
associated with the given trip point.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
[ rjw: Added parent_handle check against NULL ]
Link: https://patch.msgid.link/9672996.CDJkKcVGEf@rafael.j.wysocki
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
