Commit 04c1188
committed
iio: adc: at91-sama5d2_adc: ensure backward compatibility with previous devices
Thermal management code might run on device with no OTP data (old
device). To ensure ADC is still probed in case no OTP data is found or
in case other failures appears when reading OTP data do not return error
codes on ADC probing from at91_adc_temp_sensor_init() but print an error
message and initialize accordingly st->temp_st.init. Also, to be sure no
clients of ADC temperature channel is succeding in requesting the
temperature channel take into account the initialization status of
temperature channel in channel request function (at91_adc_chan_xlate()).
Fixes: 3e87d89 ("iio: adc: at91-sama5d2_adc: add support for temperature sensor")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>1 parent 916db27 commit 04c1188
1 file changed
Lines changed: 26 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| 449 | + | |
449 | 450 | | |
450 | 451 | | |
451 | 452 | | |
| |||
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
| 465 | + | |
464 | 466 | | |
465 | 467 | | |
466 | 468 | | |
| |||
743 | 745 | | |
744 | 746 | | |
745 | 747 | | |
| 748 | + | |
746 | 749 | | |
747 | 750 | | |
748 | 751 | | |
749 | 752 | | |
| 753 | + | |
750 | 754 | | |
751 | 755 | | |
752 | 756 | | |
753 | | - | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
754 | 763 | | |
| 764 | + | |
755 | 765 | | |
756 | 766 | | |
757 | 767 | | |
| |||
2183 | 2193 | | |
2184 | 2194 | | |
2185 | 2195 | | |
2186 | | - | |
| 2196 | + | |
| 2197 | + | |
2187 | 2198 | | |
2188 | | - | |
2189 | 2199 | | |
2190 | 2200 | | |
2191 | 2201 | | |
2192 | 2202 | | |
2193 | | - | |
2194 | 2203 | | |
2195 | 2204 | | |
2196 | | - | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
2197 | 2208 | | |
2198 | 2209 | | |
2199 | | - | |
2200 | | - | |
| 2210 | + | |
2201 | 2211 | | |
2202 | | - | |
2203 | | - | |
2204 | | - | |
2205 | | - | |
2206 | | - | |
2207 | | - | |
2208 | | - | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
2209 | 2215 | | |
2210 | 2216 | | |
2211 | 2217 | | |
2212 | | - | |
2213 | | - | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
2214 | 2222 | | |
2215 | | - | |
| 2223 | + | |
2216 | 2224 | | |
2217 | 2225 | | |
2218 | 2226 | | |
| |||
2226 | 2234 | | |
2227 | 2235 | | |
2228 | 2236 | | |
2229 | | - | |
2230 | 2237 | | |
2231 | 2238 | | |
2232 | 2239 | | |
| |||
2362 | 2369 | | |
2363 | 2370 | | |
2364 | 2371 | | |
2365 | | - | |
2366 | | - | |
2367 | | - | |
| 2372 | + | |
2368 | 2373 | | |
2369 | 2374 | | |
2370 | 2375 | | |
| |||
0 commit comments