Re: [RFC PATCH 00/26] Add thermal zones names and new registration func

From: Rafael J. Wysocki
Date: Thu Dec 21 2023 - 08:51:16 EST


On Thu, Dec 21, 2023 at 1:48 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@xxxxxxxxxxxxx> wrote:
>
> ** This RFC was sent only to thermal API maintainers + reviewers on purpose **
>
> As per previous discussion with Daniel [1], I've prepared this series adding
> a new struct thermal_zone_device_params, used in a new registration function
> for thermal zones thermal_zone_device_register(), deprecating and, finally,
> replacing functions thermal_tripless_zone_device_register() and
> thermal_zone_device_register_with_trips().
>
> The new flow to register a thermal zone becomes the following:
> - Declare a struct thermal_zone_device_params (`tzp` in this example)
> - Fill in all the params (instead of passing all of them to a function)
> - Call thermal_zone_device_register(tzp)
>
> Moreover, I've also introduced the concept of `name` for a thermal zone,
> and set, as suggested, a constraint for which:
> - Multiple thermal zones can have the same `type` (so, no change), and
> - A thermal zone's name must be *unique*.
>
> This should then help (in a later series?) to disambiguate thermal zone
> name vs type, as most of (if not all) the users seem to actually be
> misusing the TZ type referring to / using it as a TZ name.
>
> Please note that this series is currently a RFC because it's apparently
> growing bigger than I wanted - and because I probably have to add some
> more code on top. Before doing so, I'm trying to get feedback on what
> I've done until now.

And it is very unlikely that I will be able to provide any useful
feedback on this series before 6.8-rc1 is out.

Thanks!