public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Kevin Smith <kevin.smith@elecsyscorp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] gpio: mvebu_gpio: Add missing out value set to gpio_direction_output()
Date: Fri, 8 Apr 2016 14:54:03 +0000	[thread overview]
Message-ID: <5707C609.6050109@elecsyscorp.com> (raw)
In-Reply-To: <1460007660-11740-1-git-send-email-sr@denx.de>

On 04/07/2016 12:41 AM, Stefan Roese wrote:
> This patch adds the missing configuration of the output value to the
> gpio_direction_output() function. Without this, calling
> gpio_direction_output() does not set the out-value at all and only
> configures the gpio as output.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
> ---
>   drivers/gpio/mvebu_gpio.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
> index 9564ce2..75dc73e 100644
> --- a/drivers/gpio/mvebu_gpio.c
> +++ b/drivers/gpio/mvebu_gpio.c
> @@ -43,6 +43,10 @@ static int mvebu_gpio_direction_output(struct udevice *dev, unsigned gpio,
>   	struct mvebu_gpio_priv *priv = dev_get_priv(dev);
>   	struct mvebu_gpio_regs *regs = priv->regs;
>   
> +	if (value)
> +		setbits_le32(&regs->data_out, BIT(gpio));
> +	else
> +		clrbits_le32(&regs->data_out, BIT(gpio));
>   	clrbits_le32(&regs->io_conf, BIT(gpio));
>   
>   	return 0;
Reviewed-by: Kevin Smith <kevin.smith@elecsyscorp.com>

      reply	other threads:[~2016-04-08 14:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07  5:41 [U-Boot] [PATCH] gpio: mvebu_gpio: Add missing out value set to gpio_direction_output() Stefan Roese
2016-04-08 14:54 ` Kevin Smith [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=5707C609.6050109@elecsyscorp.com \
    --to=kevin.smith@elecsyscorp.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