Commit 64e6a22
iio: adc: stm32: fix pcsel before disabling adc vdda supply
Some I/Os are connected to ADC input channels, when the corresponding bit
in PCSEL register are set on STM32H7 and STM32MP15. This is done in the
prepare routine of stm32-adc driver.
There are constraints here, as PCSEL shouldn't be set when VDDA supply
is disabled. Enabling/disabling of VDDA supply in done via stm32-adc-core
runtime PM routines (before/after ADC is enabled/disabled).
Currently, PCSEL remains set when disabling ADC. Later on, PM runtime
can disable the VDDA supply. This creates some conditions on I/Os that
can start to leak current.
So PCSEL needs to be cleared when disabling the ADC.
Fixes: 95e339b ("iio: adc: stm32: add support for STM32H7")
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: I8fcc94255380866a9b27f16925206d39a8bcd6d9
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/224865
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Olivier MOYSAN <olivier.moysan@foss.st.com>
Tested-by: Olivier MOYSAN <olivier.moysan@foss.st.com>1 parent 453d395 commit 64e6a22
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1107 | 1107 | | |
1108 | 1108 | | |
1109 | 1109 | | |
| 1110 | + | |
1110 | 1111 | | |
1111 | 1112 | | |
1112 | 1113 | | |
| |||
0 commit comments