drivers: hwmon: rp1-adc: check conversion validity before supplying value
authorJonathan Bell <jonathan@raspberrypi.com>
Thu, 4 May 2023 14:48:53 +0000 (15:48 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:34:51 +0000 (11:34 +0000)
commita4aecc20fd311bdbc11c22815c4b9fc7d9973a02
treeda1ddbe9acf94bd37a23091684c6a8ad1674fd82
parentec2408cb206695a83b4e6615a10f9ca47ee85923
drivers: hwmon: rp1-adc: check conversion validity before supplying value

The SAR ADC architecture may complete a conversion but instability in the
comparator can corrupt the result. Such corruption is signalled in the CS
ERR bit, asserted alongside each conversion result.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
drivers/hwmon/rp1-adc.c