Skip to content

thermal: thermal_of: pass-through change_mode & implement for tsens

Benjamin Li linux-arm-msm linux-pm lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Changes in v3 from the cover letter

- Upgraded logging to dev_info_ratelimited and revised log message.
- Remove unrelated hunk.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2thermal: thermal_of: add pass-through change_mode to ops structdrivers/thermal/thermal_of.c include/linux/thermal.h+16 -00 replies
2/2drivers: thermal: tsens: implement change_mode to disable sensor IRQsdrivers/thermal/qcom/tsens.c drivers/thermal/qcom/tsens.h+45 -20 replies

Reviews trailers per patch

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

PatchBjorn Andersson
1/2
2/2R-b

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 0/2] thermal: thermal_of: pass-through change_mode & implement for tsens

Plumb through the change_mode callback from thermal core into thermal_of, and implement change_mode for the Qualcomm tsens driver.

Supersedes "[PATCH v3] drivers: thermal: tsens: respect thermal_device_mode in threshold irq reporting". Changelog for that patchset:

Changes in v3:
- Upgraded logging to dev_info_ratelimited and revised log message.
- Remove unrelated hunk.

Some drivers that support thermal zone disabling implement a set_mode operation and simply disable the sensor or the relevant IRQ(s), so they actually don't log anything when zones are disabled. These drivers are imx_thermal.c, intel_quark_dts_thermal.c, and int3400_thermal.c.

For tsens.c, implementing a change_mode would require migrating the driver from devm_thermal_zone_of_sensor_register to thermal_zone_device_register (or updating thermal_of.c to add a change_mode operation in thermal_zone_ of_device_ops).

stm_thermal.c seems to use this patch's model of not disabling IRQs when the zone is disabled (they still perform the thermal_zone_device_update upon IRQ, but return -EAGAIN from their get_temp).

Changes in v2:
- Reordered sentences in first part of commit message to make sense.

Benjamin Li (2):
thermal: thermal_of: add pass-through change_mode to ops struct
drivers: thermal: tsens: implement change_mode to disable sensor IRQs

 drivers/thermal/qcom/tsens.c | 43 ++++++++++++++++++++++++++++++++++--
 drivers/thermal/qcom/tsens.h |  4 ++++
 drivers/thermal/thermal_of.c | 14 ++++++++++++
 include/linux/thermal.h      |  2 ++
 4 files changed, 61 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1