summaryrefslogtreecommitdiff
path: root/drivers/hwmon/sparx5-temp.c
AgeCommit message (Collapse)Author
2020-09-23hwmon: (sparx5) Fix initial reading of temperatureLars Povlsen
If the temperature is read before the internal calibration is completed, the driver returns -EIO. Instead it should return -EAGAIN to encourage repeating the operation. Note (groeck): Returning -EAGAIN to userspace may result in hard loops; some userspace code interprets -EAGAIN as request to retry immediately. I would prefer -ENODATA, but it turns out that the thermal subsystem only handles -EAGAIN silently, so we'll have to stick with that. Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com> Link: https://lore.kernel.org/r/20200903134704.8949-1-lars.povlsen@microchip.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24hwmon: (sparx5) Make symbol 's5_temp_match' staticWei Yongjun
The sparse tool complains as follows: drivers/hwmon/sparx5-temp.c:150:27: warning: symbol 's5_temp_match' was not declared. Should it be static? This variable is not used outside of sparx5-temp.c, this commit marks it static. Fixes: c2cb4b5777e1 ("hwmon: sparx5: Add Sparx5 SoC temperature driver") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20200721134919.34033-1-weiyongjun1@huawei.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24hwmon: sparx5: Add Sparx5 SoC temperature driverLars Povlsen
This patch adds a temperature sensor driver to the Sparx5 SoC. Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20200618135951.25441-4-lars.povlsen@microchip.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>