public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Patrice CHOTARD <patrice.chotard@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] regulator: fixed: Modify enable-active-high behavior
Date: Tue, 10 Sep 2019 09:54:05 +0000	[thread overview]
Message-ID: <e239a68f-4dee-e9cf-84df-13185c13ab64@st.com> (raw)
In-Reply-To: <20190725071239.31398-1-patrice.chotard@st.com>

Hi,

It's a gentle reminder to not forgot this patch

Thanks

Patrice

On 7/25/19 9:12 AM, Patrice Chotard wrote:
> Regulator should not be enabled at probe time if regulator-boot-on
> property is not in the dt node.
>
> "enable-active-high" property is only used to indicate the GPIO
> polarity.
>
> See kernel documentation :
>  - Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
>  - Documentation/devicetree/bindings/regulator/gpio-regulator.yaml
>
> Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
>
>  drivers/power/regulator/regulator_common.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/power/regulator/regulator_common.c b/drivers/power/regulator/regulator_common.c
> index 3dabbe2a85..2e8a083c75 100644
> --- a/drivers/power/regulator/regulator_common.c
> +++ b/drivers/power/regulator/regulator_common.c
> @@ -15,7 +15,9 @@ int regulator_common_ofdata_to_platdata(struct udevice *dev,
>  	int flags = GPIOD_IS_OUT;
>  	int ret;
>  
> -	if (dev_read_bool(dev, "enable-active-high"))
> +	if (!dev_read_bool(dev, "enable-active-high"))
> +		flags |= GPIOD_ACTIVE_LOW;
> +	if (uc_pdata->boot_on)
>  		flags |= GPIOD_IS_OUT_ACTIVE;
>  
>  	/* Get optional enable GPIO desc */

  parent reply	other threads:[~2019-09-10  9:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25  7:12 [U-Boot] [PATCH] regulator: fixed: Modify enable-active-high behavior Patrice Chotard
2019-08-07 17:20 ` Tom Rini
2019-09-10  9:54 ` Patrice CHOTARD [this message]
2019-09-10 11:37   ` Patrice CHOTARD

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=e239a68f-4dee-e9cf-84df-13185c13ab64@st.com \
    --to=patrice.chotard@st.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox