public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/26] Add thermal zones names and new registration func
@ 2023-12-21 12:47 AngeloGioacchino Del Regno
  2023-12-21 12:48 ` [RFC PATCH 01/26] thermal: Introduce thermal_zone_device_register() and params structure AngeloGioacchino Del Regno
                   ` (26 more replies)
  0 siblings, 27 replies; 42+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-12-21 12:47 UTC (permalink / raw)
  To: daniel.lezcano
  Cc: rafael, rui.zhang, lukasz.luba, linux-pm, linux-kernel,
	AngeloGioacchino Del Regno, kernel

** 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.

P.S.: I know, there's a fixup commit in the mix, will obviously fix
that for v1 :-)

[1]: https://lore.kernel.org/all/20231115144857.424005-1-angelogioacchino.delregno@collabora.com/

AngeloGioacchino Del Regno (26):
  thermal: Introduce thermal_zone_device_register() and params structure
  thermal/of: Migrate to thermal_zone_device_register()
  platform/x86: acerhdf: Migrate to thermal_zone_device_register()
  ACPI: thermal: Migrate to thermal_zone_device_register()
  thermal/drivers/da9062: Migrate to thermal_zone_device_register()
  thermal/drivers/imx: Migrate to thermal_zone_device_register()
  thermal/drivers/rcar: Migrate to thermal_zone_device_register()
  thermal/drivers/st: Migrate to thermal_zone_device_register()
  thermal: intel: pch_thermal: Migrate to thermal_zone_device_register()
  thermal: intel: quark_dts: Migrate to thermal_zone_device_register()
  thermal: intel: soc_dts_iosf: Migrate to
    thermal_zone_device_register()
  thermal: intel: int340x: Migrate to thermal_zone_device_register()
  thermal: int340x: processor: Migrate to thermal_zone_device_register()
  thermal: intel: x86_pkg_temp: Migrate to
    thermal_zone_device_register()
  power: supply: core: Migrate to thermal_zone_device_register()
  thermal/drivers/armada: Migrate to thermal_zone_device_register()
  thermal/drivers/dove: Migrate to thermal_zone_device_register()
  thermal/drivers/kirkwood: Migrate to thermal_zone_device_register()
  thermal/drivers/spear: Migrate to thermal_zone_device_register()
  thermal/drivers/int340x: Migrate to thermal_zone_device_register()
  wifi: iwlwifi: mvm: Migrate to thermal_zone_device_register()
  cxgb4: Migrate to thermal_zone_device_register()
  mlxsw: core_thermal: Migrate to thermal_zone_device_register()
  fixup! power: supply: core: Migrate to thermal_zone_device_register()
  thermal: Remove tripless_zone_register and register_with_trips
    functions
  thermal: Introduce thermal zones names

 drivers/acpi/thermal.c                        |  18 +--
 .../ethernet/chelsio/cxgb4/cxgb4_thermal.c    |  18 ++-
 .../ethernet/mellanox/mlxsw/core_thermal.c    |  93 +++++++-------
 drivers/net/wireless/intel/iwlwifi/mvm/tt.c   |  27 ++--
 drivers/platform/x86/acerhdf.c                |  25 ++--
 drivers/power/supply/power_supply_core.c      |  14 +-
 drivers/thermal/armada_thermal.c              |  10 +-
 drivers/thermal/da9062-thermal.c              |  14 +-
 drivers/thermal/dove_thermal.c                |   8 +-
 drivers/thermal/imx_thermal.c                 |  19 ++-
 .../intel/int340x_thermal/int3400_thermal.c   |  17 +--
 .../int340x_thermal/int340x_thermal_zone.c    |  28 ++--
 .../processor_thermal_device_pci.c            |  23 ++--
 drivers/thermal/intel/intel_pch_thermal.c     |  11 +-
 .../thermal/intel/intel_quark_dts_thermal.c   |  21 +--
 drivers/thermal/intel/intel_soc_dts_iosf.c    |  22 +++-
 drivers/thermal/intel/x86_pkg_temp_thermal.c  |  20 +--
 drivers/thermal/kirkwood_thermal.c            |   8 +-
 drivers/thermal/rcar_thermal.c                |  13 +-
 drivers/thermal/spear_thermal.c               |   8 +-
 drivers/thermal/st/st_thermal.c               |  15 ++-
 drivers/thermal/thermal_core.c                | 120 +++++++++---------
 drivers/thermal/thermal_of.c                  |  38 +++---
 drivers/thermal/thermal_sysfs.c               |   9 ++
 drivers/thermal/thermal_trace.h               |  17 ++-
 include/linux/thermal.h                       |  50 ++++++--
 26 files changed, 391 insertions(+), 275 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2024-01-23 10:58 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-21 12:47 [RFC PATCH 00/26] Add thermal zones names and new registration func AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 01/26] thermal: Introduce thermal_zone_device_register() and params structure AngeloGioacchino Del Regno
2024-01-15 12:39   ` Daniel Lezcano
2024-01-16  9:58     ` AngeloGioacchino Del Regno
2024-01-18  9:39       ` AngeloGioacchino Del Regno
2024-01-18  9:46         ` AngeloGioacchino Del Regno
2024-01-22 19:19         ` Daniel Lezcano
2024-01-23 10:58           ` AngeloGioacchino Del Regno
2024-01-22 19:19         ` Daniel Lezcano
2023-12-21 12:48 ` [RFC PATCH 02/26] thermal/of: Migrate to thermal_zone_device_register() AngeloGioacchino Del Regno
2024-01-15 17:17   ` Daniel Lezcano
2024-01-16  9:50     ` AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 03/26] platform/x86: acerhdf: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 04/26] ACPI: thermal: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 05/26] thermal/drivers/da9062: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 06/26] thermal/drivers/imx: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 07/26] thermal/drivers/rcar: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 08/26] thermal/drivers/st: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 09/26] thermal: intel: pch_thermal: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 10/26] thermal: intel: quark_dts: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 11/26] thermal: intel: soc_dts_iosf: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 12/26] thermal: intel: int340x: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 13/26] thermal: int340x: processor: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 14/26] thermal: intel: x86_pkg_temp: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 15/26] power: supply: core: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 16/26] thermal/drivers/armada: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 17/26] thermal/drivers/dove: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 18/26] thermal/drivers/kirkwood: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 19/26] thermal/drivers/spear: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 20/26] thermal/drivers/int340x: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 21/26] wifi: iwlwifi: mvm: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 22/26] cxgb4: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 23/26] mlxsw: core_thermal: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 24/26] fixup! power: supply: core: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 25/26] thermal: Remove tripless_zone_register and register_with_trips functions AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 26/26] thermal: Introduce thermal zones names AngeloGioacchino Del Regno
2024-01-16  9:14   ` Daniel Lezcano
2024-01-16  9:45     ` AngeloGioacchino Del Regno
2024-01-16 11:30       ` Daniel Lezcano
2024-01-16 11:37         ` AngeloGioacchino Del Regno
2023-12-21 13:38 ` [RFC PATCH 00/26] Add thermal zones names and new registration func Rafael J. Wysocki
2023-12-21 13:54   ` AngeloGioacchino Del Regno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox