linux/drivers/thermal
Peter Mamonov 370f995d58 thermal: of: Make thermal_zone_of_sensor_register return -ENODEV if a sensor OF node is missing
When devm_thermal_zone_of_sensor_register() is called from
hwmon_thermal_add_sensor() it is possible that the relevant sensor is
missing an OF node. In this case thermal_zone_of_sensor_register() returns
-EINVAL which causes hwmon_thermal_add_sensor() to fail as well. This patch
changes relevant return code of thermal_zone_of_sensor_register() to
-ENODEV, which is tolerated by hwmon_thermal_add_sensor().

Here is a particular case of such behaviour: the Marvell ethernet PHYs
driver registers hwmon device for the built-in temperature sensor (see
drivers/net/phy/marvell.c). Since the sensor doesn't have associated OF
node devm_hwmon_device_register() returns error which ultimately causes
failure of the PHY driver's probe function.

Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20190827143952.19591-1-pmamonov@gmail.com
2020-01-27 15:39:52 +01:00
..
broadcom thermal: brcmstb_thermal: Register different ops per process 2020-01-27 11:41:08 +01:00
intel thermal: intel: intel_pch_thermal: Add Comet Lake (CML) platform support 2020-01-27 11:43:24 +01:00
qcom drivers: thermal: tsens: Work with old DTBs 2020-01-07 08:22:35 +01:00
samsung thermal: exynos: Rename Samsung and Exynos to lowercase 2020-01-27 10:24:32 +01:00
st treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
tegra thermal: tegra: Appease the kernel-doc deity 2020-01-27 10:24:32 +01:00
ti-soc-thermal treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
amlogic_thermal.c thermal: amlogic: Appease the kernel-doc deity 2020-01-27 10:24:32 +01:00
armada_thermal.c thermal: armada: Clear reset in armadaxp_init 2020-01-27 10:24:32 +01:00
clock_cooling.c thermal/drivers/cpu_cooling: Rename to cpufreq_cooling 2020-01-27 10:24:32 +01:00
cpufreq_cooling.c thermal/drivers/cpu_cooling: Rename to cpufreq_cooling 2020-01-27 10:24:32 +01:00
cpuidle_cooling.c thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver 2020-01-27 10:24:32 +01:00
da9062-thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
db8500_thermal.c thermal: db8500: Depromote debug print 2020-01-27 10:24:32 +01:00
devfreq_cooling.c thermal: devfreq_cooling: Appease the kernel-doc deity 2020-01-27 10:24:32 +01:00
dove_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
fair_share.c thermal: step_wise: Appease the kernel-doc deity 2020-01-27 10:24:32 +01:00
gov_bang_bang.c thermal: step_wise: Appease the kernel-doc deity 2020-01-27 10:24:32 +01:00
hisi_thermal.c thermal/drivers/hisi: Fix number of sensors on hi3660 2018-12-10 20:13:09 -08:00
imx_thermal.c thermal: imx: save one condition block for normal case of nvmem initialization 2019-01-02 04:47:12 -08:00
Kconfig thermal/drivers/sun8i: Add thermal driver for H6/H5/H3/A64/A83T/R40 2020-01-27 10:24:32 +01:00
kirkwood_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
Makefile thermal/drivers/sun8i: Add thermal driver for H6/H5/H3/A64/A83T/R40 2020-01-27 10:24:32 +01:00
max77620_thermal.c thermal: max77620: Appease the kernel-doc deity 2020-01-27 10:24:32 +01:00
mtk_thermal.c thermal: mediatek: Appease the kernel-doc deity 2020-01-27 10:24:32 +01:00
of-thermal.c thermal: of: Make thermal_zone_of_sensor_register return -ENODEV if a sensor OF node is missing 2020-01-27 15:39:52 +01:00
power_allocator.c thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
qoriq_thermal.c thermal: qoriq: Add hwmon support 2020-01-27 10:24:32 +01:00
rcar_gen3_thermal.c thermal: rcar_gen3_thermal: Remove temperature bound 2020-01-27 11:43:24 +01:00
rcar_thermal.c thermal: rcar_thermal: Remove temperature bound 2020-01-27 11:43:24 +01:00
rockchip_thermal.c thermal: rockchip: Enable hwmon 2020-01-27 10:24:32 +01:00
spear_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
step_wise.c thermal: step_wise: Appease the kernel-doc deity 2020-01-27 10:24:32 +01:00
sun8i_thermal.c thermal: sun8i: Add hwmon support 2020-01-27 11:41:08 +01:00
tango_thermal.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
thermal_core.c thermal: Fix deadlock in thermal thermal_zone_device_check 2019-11-14 22:41:09 +08:00
thermal_core.h thermal/drivers/of-thermal: Make of_thermal_destroy_zones static 2020-01-27 10:24:32 +01:00
thermal_helpers.c drivers: thermal: Update license to SPDX format 2018-05-30 14:46:17 +08:00
thermal_hwmon.c thermal_hwmon: Add devres wrapper for thermal_add_hwmon_sysfs() 2020-01-27 10:24:32 +01:00
thermal_hwmon.h thermal_hwmon: Add devres wrapper for thermal_add_hwmon_sysfs() 2020-01-27 10:24:32 +01:00
thermal_mmio.c thermal: no need to set .owner when using module_platform_driver 2019-11-07 07:00:26 +01:00
thermal_sysfs.c thermal: Fix locking in cooling device sysfs update cur_state 2018-11-30 16:57:51 +08:00
thermal-generic-adc.c thermal: generic-adc: silence info message for IIO_TEMP channels 2020-01-27 10:24:32 +01:00
uniphier_thermal.c thermal: uniphier: Convert to SPDX identifier 2019-01-02 04:47:16 -08:00
user_space.c thermal: step_wise: Appease the kernel-doc deity 2020-01-27 10:24:32 +01:00
zx2967_thermal.c thermal: zx2967: Appease the kernel-doc deity 2020-01-27 10:24:32 +01:00