Message ID | 20240130111250.185718-1-angelogioacchino.delregno@collabora.com (mailing list archive) |
---|---|
Headers | show |
Series | Thermal: Part 1 - Introduce new structs and registration | expand |
On Tue, Jan 30, 2024 at 12:13 PM AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote: > > This series is a preparation for a bigger cleanup that will be split in > three parts in order to avoid immutable branches on multiple subsystems, > as in other parts of this series there will be changes in: > - drivers/acpi > - drivers/platform/x86 > - drivers/power/supply > - drivers/net/wireless > - drivers/net/ethernet > > This is the first part which adds new structures and starts reorganizing > struct members around, plus, this migrates all of the thermal drivers > found in drivers/thermal/ to the new thermal_zone_device_register() > function, and advertises that the old registration functions are > deprecated and will be removed. > > The reorganization is supposed to be complete (or mostly) but... > - struct thermal_zone_platform_params has a temporary name: > this is done in order to avoid compile time failures for > the drivers outside of drivers/thermal before migrating > them to thermal_zone_device_params/thermal_zone_device_register(); > - struct thermal_zone_params temporarily has two duplicated members, > governor_name and no_hwmon; > > Part 2 of this topic will migrate all drivers that are external to > drivers/thermal to thermal_zone_device_register(); I will send that > part only after part 1 is confirmed to be acceptable, as otherwise > I'd be spamming people for no reason :-) > > After all drivers will be migrated to thermal_zone_device_register(), > we won't have to care about changing anything outside of drivers/thermal > to finish this set of cleanups/changes (and no immutable branches needed) > and this means that... > Part 3 of this topic will contain the following changes: > - thermal_zone_device_register_with_trips() will be removed > - thermal_tripless_zone_device_register() will be removed > - thermal_zone_params will be renamed to thermal_governor_ipa_params > - governor_name, no_hwmon members will be removed > - thermal_zone_platform_params will be renamed to thermal_zone_params > - Removal of the THERMAL_NAME_LENGTH limitation for `type` > > More scheduled changes, which should end up in part 3 (at least that's > my intention), or eventually entirely after this cleanup topic, include: > - Introduction of Thermal Zone names > - Disambiguation of TZ name and type > - Addition of `thermal-zones`, `thermal-zone-names` parsing for > devicetrees You really should start with this, because that's your goal. It is quite arguable that it can be achieved without making all of the changes mentioned above. > > ... Summarizing ... > > Part 1: > - Reorganize structures (some temporary names/leftovers) > - New registration function, deprecation of old ones > - Migration of drivers/thermal drivers to new registration I kind of see where this is going, but I don't agree with some of the changes made. Let me comment on individual patches (which is not necessarily going to happen today or even tomorrow, so let me go through the entire series before deciding what to do next). Thanks!
Il 01/02/24 19:35, Rafael J. Wysocki ha scritto: > On Tue, Jan 30, 2024 at 12:13 PM AngeloGioacchino Del Regno > <angelogioacchino.delregno@collabora.com> wrote: >> >> This series is a preparation for a bigger cleanup that will be split in >> three parts in order to avoid immutable branches on multiple subsystems, >> as in other parts of this series there will be changes in: >> - drivers/acpi >> - drivers/platform/x86 >> - drivers/power/supply >> - drivers/net/wireless >> - drivers/net/ethernet >> >> This is the first part which adds new structures and starts reorganizing >> struct members around, plus, this migrates all of the thermal drivers >> found in drivers/thermal/ to the new thermal_zone_device_register() >> function, and advertises that the old registration functions are >> deprecated and will be removed. >> >> The reorganization is supposed to be complete (or mostly) but... >> - struct thermal_zone_platform_params has a temporary name: >> this is done in order to avoid compile time failures for >> the drivers outside of drivers/thermal before migrating >> them to thermal_zone_device_params/thermal_zone_device_register(); >> - struct thermal_zone_params temporarily has two duplicated members, >> governor_name and no_hwmon; >> >> Part 2 of this topic will migrate all drivers that are external to >> drivers/thermal to thermal_zone_device_register(); I will send that >> part only after part 1 is confirmed to be acceptable, as otherwise >> I'd be spamming people for no reason :-) >> >> After all drivers will be migrated to thermal_zone_device_register(), >> we won't have to care about changing anything outside of drivers/thermal >> to finish this set of cleanups/changes (and no immutable branches needed) >> and this means that... >> Part 3 of this topic will contain the following changes: >> - thermal_zone_device_register_with_trips() will be removed >> - thermal_tripless_zone_device_register() will be removed >> - thermal_zone_params will be renamed to thermal_governor_ipa_params >> - governor_name, no_hwmon members will be removed >> - thermal_zone_platform_params will be renamed to thermal_zone_params >> - Removal of the THERMAL_NAME_LENGTH limitation for `type` >> >> More scheduled changes, which should end up in part 3 (at least that's >> my intention), or eventually entirely after this cleanup topic, include: >> - Introduction of Thermal Zone names >> - Disambiguation of TZ name and type >> - Addition of `thermal-zones`, `thermal-zone-names` parsing for >> devicetrees > > You really should start with this, because that's your goal. > > It is quite arguable that it can be achieved without making all of the > changes mentioned above. > Actually, my initial idea was exactly that... but then there were some discussions around it, please check [1] for the thermal-zone-names, and [2] for the rest of the discussion. [1]: https://lore.kernel.org/all/8d42e0f5-b2d2-471b-ada9-79f76c637abe@collabora.com/ [2]: https://lore.kernel.org/all/4dd4ac79-e8bc-4d88-92d6-6061dae42092@collabora.com/ >> >> ... Summarizing ... >> >> Part 1: >> - Reorganize structures (some temporary names/leftovers) >> - New registration function, deprecation of old ones >> - Migration of drivers/thermal drivers to new registration > > I kind of see where this is going, but I don't agree with some of the > changes made. > > Let me comment on individual patches (which is not necessarily going > to happen today or even tomorrow, so let me go through the entire > series before deciding what to do next). > Sure, thanks for your feedback! Cheers, Angelo