Commit bc05f30
iio: adc: stm32: fix vrefint wrong calibration value handling
If the vrefint calibration is zero, the vrefint channel output value
cannot be computed. Currently, in such case, the raw conversion value
is returned, which is not relevant.
Do not expose the vrefint channel when the output value cannot be
computed, instead.
Fixes: 0e346b2 ("iio: adc: stm32-adc: add vrefint calibration support")
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20220609095856.376961-1-olivier.moysan@foss.st.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>1 parent 106b391 commit bc05f30
1 file changed
Lines changed: 17 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1365 | 1365 | | |
1366 | 1366 | | |
1367 | 1367 | | |
1368 | | - | |
| 1368 | + | |
1369 | 1369 | | |
1370 | 1370 | | |
1371 | 1371 | | |
| |||
1969 | 1969 | | |
1970 | 1970 | | |
1971 | 1971 | | |
1972 | | - | |
1973 | | - | |
1974 | | - | |
1975 | | - | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
1976 | 1976 | | |
1977 | 1977 | | |
1978 | 1978 | | |
1979 | 1979 | | |
1980 | 1980 | | |
1981 | 1981 | | |
1982 | 1982 | | |
1983 | | - | |
1984 | | - | |
1985 | | - | |
1986 | | - | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
1987 | 1992 | | |
1988 | 1993 | | |
1989 | 1994 | | |
| |||
2020 | 2025 | | |
2021 | 2026 | | |
2022 | 2027 | | |
2023 | | - | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
2024 | 2031 | | |
2025 | 2032 | | |
2026 | 2033 | | |
| |||
0 commit comments