Re: [PATCH v6 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor

2020-07-05 Thread Tom Rini
On Fri, May 22, 2020 at 11:08:56AM +0200, Heiko Schocher wrote:

> save the GPIOD_ flags also in the gpio descriptor.
> 
> Signed-off-by: Heiko Schocher 
> Reviewed-by: Patrick Delaunay 
> Fixes: 788ea834124b ("gpio: add function _dm_gpio_set_dir_flags")
> Reviewed-by: Simon Glass 
> Tested-by: Walter Lozano 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v6 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor

2020-07-02 Thread Walter Lozano



On 30/6/20 13:19, Walter Lozano wrote:

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 
Reviewed-by: Patrick Delaunay 
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.



Tested-by: Walter Lozano 

Regards,

Walter




---

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



Re: [PATCH v6 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor

2020-06-30 Thread Walter Lozano

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 
Reviewed-by: Patrick Delaunay 
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



Re: [PATCH v6 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor

2020-05-22 Thread Simon Glass
On Fri, 22 May 2020 at 03:09, Heiko Schocher  wrote:
>
> save the GPIOD_ flags also in the gpio descriptor.
>
> Signed-off-by: Heiko Schocher 
> Reviewed-by: Patrick Delaunay 
> Fixes: 788ea834124b ("gpio: add function _dm_gpio_set_dir_flags")
>
> ---
>
> 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(-)

Reviewed-by: Simon Glass 


[PATCH v6 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor

2020-05-22 Thread Heiko Schocher
save the GPIOD_ flags also in the gpio descriptor.

Signed-off-by: Heiko Schocher 
Reviewed-by: Patrick Delaunay 
Fixes: 788ea834124b ("gpio: add function _dm_gpio_set_dir_flags")

---

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;
 }
 
-- 
2.24.1