All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Cc: stable@vger.kernel.org, sashal@kernel.org
Subject: Re: [PATCH 5.4] iio: adc: stm32: fix a current leak by resetting pcsel before disabling vdda
Date: Fri, 17 Dec 2021 14:43:38 +0100	[thread overview]
Message-ID: <YbyUCoCQaOThT9ff@kroah.com> (raw)
In-Reply-To: <1639738592-28572-1-git-send-email-fabrice.gasnier@foss.st.com>

On Fri, Dec 17, 2021 at 11:56:32AM +0100, Fabrice Gasnier wrote:
> commit f711f28e71e965c0d1141c830fa7131b41abbe75 upstream.
> 
> 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: 95e339b6e85d ("iio: adc: stm32: add support for STM32H7")
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
> Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com>
> Link: https://lore.kernel.org/r/1634905169-23762-1-git-send-email-fabrice.gasnier@foss.st.com
> Cc: <Stable@vger.kernel.org>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> Backport for 5.4-stable

Now queued up, thanks.

greg k-h

      reply	other threads:[~2021-12-17 13:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 10:56 [PATCH 5.4] iio: adc: stm32: fix a current leak by resetting pcsel before disabling vdda Fabrice Gasnier
2021-12-17 13:43 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YbyUCoCQaOThT9ff@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=fabrice.gasnier@foss.st.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.