Skip to content

thermal: Eliminate trip IDs from thermal driver interface

Rafael J. Wysocki linux-arm-msm linux-pm linux-tegra linux-wireless lkml 1 version In review

Get series with b4
b4 am 8409966.T7Z3S40VBb@kreacher

Versions newest first

  1. v1 Latest14 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14thermal: imx: Drop critical trip check from imx_set_trip_temp()drivers/thermal/imx_thermal.c+0 -90 replies
2/14thermal: helpers: Introduce thermal_trip_is_bound_to_cdev()drivers/thermal/thermal_helpers.c include/linux/thermal.h+38 -120 replies
3/14thermal: trip: Add conversion macros for thermal trip priv fielddrivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c include/linux/thermal.h+5 -120 replies
4/14thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callbackdrivers/net/wireless/intel/iwlwifi/mvm/tt.c drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c +7 more+54 -380 replies
5/14thermal: trip: Fold __thermal_zone_get_trip() into its callerdrivers/thermal/thermal_trip.c include/linux/thermal.h+4 -160 replies
6/14thermal: broadcom: Use thermal_zone_get_crit_temp() in bcm2835_thermal_probe()drivers/thermal/broadcom/bcm2835_thermal.c+3 -40 replies
7/14thermal: hisi: Use thermal_zone_for_each_trip() in hisi_thermal_register_sensor()drivers/thermal/hisi_thermal.c+13 -90 replies
8/14thermal: qcom: Use thermal_zone_get_crit_temp() in qpnp_tm_init()drivers/thermal/qcom/qcom-spmi-temp-alarm.c+3 -190 replies
9/14thermal: tegra: Introduce struct trip_temps for critical and hot tripsdrivers/thermal/tegra/tegra30-tsensor.c+20 -140 replies
10/14thermal: tegra: Use thermal_zone_for_each_trip() for walking trip pointsdrivers/thermal/tegra/soctherm.c drivers/thermal/tegra/tegra30-tsensor.c+33 -300 replies
11/14thermal: helpers: Drop get_thermal_instance()drivers/thermal/thermal_core.h drivers/thermal/thermal_helpers.c+6 -290 replies
12/14thermal: uniphier: Use thermal_zone_for_each_trip() for walking trip pointsdrivers/thermal/uniphier_thermal.c+23 -142 replies
13/14thermal: trip: Replace thermal_zone_get_num_trips()drivers/thermal/renesas/rcar_gen3_thermal.c drivers/thermal/thermal_trip.c include/linux/thermal.h+5 -63 replies
14/14thermal: trip: Drop thermal_zone_get_trip()drivers/thermal/thermal_trip.c include/linux/thermal.h+0 -160 replies

Reviews trailers per patch

1 of 14 patches has a Reviewed-by or Acked-by.

PatchKunihiko Hayashi
1/14
2/14
3/14
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14R-b
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 00/14] thermal: Eliminate trip IDs from thermal driver interface

Hi Everyone,

Trip IDs, which should be internal to the thermal core, are still used in the thermal driver interface in some places, but fortunately it does not take too much effort to get rid of them.

First of all, the .set_trip_temp() zone callback uses a trip ID as one of its arguments, but this isn't really necessary and there are a few weaknesses related to doing that. Please see the changelog of patch [04/14] for details.

Apart from that, several drivers use the thermal_zone_get_trip() helper function for trip point lookup which can be differently. Patches [06-12/14] address those cases (please see the individual patch changelogs for details).

The remaining patches in the series are preliminary changes or cleanups.

The series is based on the two cleanup series posted previously:

https://lore.kernel.org/linux-pm/5794974.DvuYhMxLoT@kreacher/T/#t
https://lore.kernel.org/linux-pm/12458899.O9o76ZdvQC@kreacher/T/#t

that have been included into the linux-next thermal material.

This series is available from the thermal-core-experimental branch in linux-pm.git.

Thanks!