]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
regulator: stm32-vrefbuf: fix a possible overshoot when re-enabling
authorFabrice Gasnier <fabrice.gasnier@st.com>
Wed, 4 Mar 2020 08:55:32 +0000 (09:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 06:18:44 +0000 (07:18 +0100)
commit04199190760dc273025fd81891b57fbd2a276f9b
treed1f7d5787ae80f542970df99432a44852fe23d84
parent4ed9e8e4267f74c88c568669e0b47f78655dc3cf
regulator: stm32-vrefbuf: fix a possible overshoot when re-enabling

commit 02fbabd5f4ed182d2c616e49309f5a3efd9ec671 upstream.

There maybe an overshoot, when disabling, then re-enabling vrefbuf
too quickly. VREFBUF is used by ADC/DAC on some boards. When re-enabling
too quickly, an overshoot on the reference voltage make the conversions
inaccurate for a short period of time.
- Don't put the VREFBUF in HiZ when disabling, to force an active
discharge.
- Enforce a 1ms OFF/ON delay

Fixes: 0cdbf481e927 ("regulator: Add support for stm32-vrefbuf")
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Message-Id: <1583312132-20932-1-git-send-email-fabrice.gasnier@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/regulator/stm32-vrefbuf.c