Re: [PATCH v4 0/6] Thermal zone device structure encapsulation

From: Daniel Lezcano
Date: Thu Apr 27 2023 - 16:53:54 EST


On 27/04/2023 19:23, Rafael J. Wysocki wrote:
On Wed, Apr 19, 2023 at 10:33 AM Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:

The thermal zone device structure is defined in the exported thermal
header include/linux/thermal.h

Given the definition being public, the structure is exposed to the
external components other than the thermal framework core code. It
results the drivers are tampering the structure internals like taking
the lock or changing the field values.

Obviously that is bad for several reasons as the drivers can hook the
thermal framework behavior and makes very difficult the changes in the
core code as external components depend on it directly.

Moreover, the thermal trip points being reworked, we don't want the
drivers to access the trips array directly in the thermal zone
structure and doing assumptions on how they are organized.

This series provides a second set of changes moving to the thermal
zone device structure self-encapsulation.

The ACPI and the Menlon drivers are using the thermal zone's device
fields to create symlinks and new attributes in the sysfs thermal zone
directory. These changes provide a hopefully temporary wrapper to
access it in order to allow moving forward in the thermal zone device
self-encapsulation and a Kconfig option to disable by default such a
extra sysfs information.


[ ... ]

Patches [4/6] and [6/6] were superseded by the Menlow driver removal.

I've applied the rest as 6.4-rc material, with some subject
adjustments and after removing some trailing white space in a few
places.


Thanks!

--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog