All of lore.kernel.org
 help / color / mirror / Atom feed
From: Walter Lozano <walter.lozano@collabora.com>
To: u-boot@lists.denx.de
Subject: [PATCH v6 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor
Date: Tue, 30 Jun 2020 13:19:52 -0300	[thread overview]
Message-ID: <fb56beba-4c46-0543-28ec-d0b33e7f0861@collabora.com> (raw)
In-Reply-To: <20200522090858.2569904-2-hs@denx.de>

Hi Heiko

On 22/5/20 06:08, Heiko Schocher wrote:
> save the GPIOD_ flags also in the gpio descriptor.
>
> Signed-off-by: Heiko Schocher <hs@denx.de>
> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
> Fixes: 788ea834124b ("gpio: add function _dm_gpio_set_dir_flags")

Thanks for this fix, without it the MMC driver of my iMX6 Hummingboard 
produces "Card did not respond to voltage select!" and does not work.


> ---
>
> Changes in v6:
> - add reviewed by from Patrick and Fixes tag
>
> Changes in v5:
> - add comment from patrick, update the descriptor flags
>    in _dm_gpio_set_dir_flags() if setting direction was OK.
>
> Changes in v4:
> - new in version 4
>
> Changes in v3: None
> Changes in v2: None
>
>   drivers/gpio/gpio-uclass.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
> index 9eeab22eef..f016532354 100644
> --- a/drivers/gpio/gpio-uclass.c
> +++ b/drivers/gpio/gpio-uclass.c
> @@ -600,6 +600,10 @@ static int _dm_gpio_set_dir_flags(struct gpio_desc *desc, ulong flags)
>   		}
>   	}
>   
> +	/* save the flags also in descriptor */
> +	if (!ret)
> +		desc->flags = flags;
> +
>   	return ret;
>   }
>   
> @@ -615,10 +619,6 @@ int dm_gpio_set_dir_flags(struct gpio_desc *desc, ulong flags)
>   	flags |= desc->flags;
>   	ret = _dm_gpio_set_dir_flags(desc, flags);
>   
> -	/* update the descriptor flags */
> -	if (ret)
> -		desc->flags = flags;
> -
>   	return ret;
>   }
>   


Regards,

Walter

  parent reply	other threads:[~2020-06-30 16:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  9:08 [PATCH v6 0/3] gpio: add possibility to search for gpio label name Heiko Schocher
2020-05-22  9:08 ` [PATCH v6 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor Heiko Schocher
2020-05-22 23:13   ` Simon Glass
2020-06-30 16:19   ` Walter Lozano [this message]
2020-07-01 15:24     ` Walter Lozano
2020-07-05 21:58   ` Tom Rini
2020-05-22  9:08 ` [PATCH v6 2/3] sandbox, test: add test for GPIO_HOG function Heiko Schocher
2020-07-05 21:58   ` Tom Rini
2020-05-22  9:08 ` [PATCH v6 3/3] gpio: search for gpio label if gpio is not found through bank name Heiko Schocher
2020-07-08  3:03   ` Tom Rini
2020-07-20  8:30   ` Michal Simek
2020-07-21  6:40     ` Heiko Schocher
2020-07-21 13:18       ` Michal Simek

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=fb56beba-4c46-0543-28ec-d0b33e7f0861@collabora.com \
    --to=walter.lozano@collabora.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 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.