[lkml]   [2018]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 00/17] thermal: enable/check sensor after its setup is finished
Hi Bartlomiej,

> Bartlomiej Zolnierkiewicz <> hat am 10. April 2018 um 14:41 geschrieben:
> Hi,
> [devm]_thermal_zone_of_sensor_register() is used to register
> thermal sensor by thermal drivers using DeviceTree. Besides
> registering sensor this function also immediately enables it
> (using ->set_mode method) and then checks it with a update call
> to the thermal core (which ends up using ->get_temp method).
> For many DT thermal drivers this causes a problem because
> [devm]_thermal_zone_of_sensor_register() need to be called in
> order to obtain data about thermal trips which are then used to
> finish hardware sensor setup (only after which ->get_temp can
> be used). The issue has been observed when using Samsung Exynos
> thermal driver and fixed internally in the driver in commit
> d8efad71e5b6 ("thermal: exynos: Reading temperature makes sense
> only when TMU is turned on"). However after this commit there
> are now following warnings from the thermal core visible:
> [ 3.453602] thermal thermal_zone0: failed to read out thermal zone (-22)
> [ 3.483468] thermal thermal_zone1: failed to read out thermal zone (-22)
> [ 3.505965] thermal thermal_zone2: failed to read out thermal zone (-22)
> [ 3.528455] thermal thermal_zone3: failed to read out thermal zone (-22)
> [ 3.550939] thermal thermal_zone4: failed to read out thermal zone (-22)
> This patchset attempts to directly address the thermal core
> problem with [devm]_thermal_zone_of_sensor_register() and
> affected DT thermal drivers. In order to achieve this sensor
> registration, enable and check operations are separated and
> corresponding drivers are modified to use the new helpers to
> enable and check sensor explicitly.

i've tested patch 1-5 + 17 on a Raspberry Pi 1 B and didn't see any regressions.

Tested-by: Stefan Wahren <>

 \ /
  Last update: 2018-04-19 00:27    [W:0.145 / U:2.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site