diff options
author | Lars Povlsen <lars.povlsen@microchip.com> | 2020-09-03 15:47:04 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2020-09-23 09:39:40 -0700 |
commit | fcb575bfac80d6deb4940d2ebf506d6701761f38 (patch) | |
tree | 5efe7f1c4dc6913b3a05abe3c5d45a0760fceeeb /block | |
parent | ba4f184e126b751d1bffad5897f263108befc780 (diff) | |
download | linux-stable-fcb575bfac80d6deb4940d2ebf506d6701761f38.tar.gz linux-stable-fcb575bfac80d6deb4940d2ebf506d6701761f38.tar.bz2 linux-stable-fcb575bfac80d6deb4940d2ebf506d6701761f38.zip |
hwmon: (sparx5) Fix initial reading of temperature
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>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions