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

Heiko Schocher hs at denx.de
Tue May 12 15:02:06 CEST 2020


save the GPIOD_ flags also in the gpio descriptor.

Signed-off-by: Heiko Schocher <hs at denx.de>


---

Changes in v4:
- new in version 4

Changes in v3: None
Changes in v2: None

 drivers/gpio/gpio-uclass.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 757ab7106e..fc94334160 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -572,6 +572,9 @@ static int _dm_gpio_set_dir_flags(struct gpio_desc *desc, ulong flags)
 		return ret;
 	}
 
+	/* save the flags also in descriptor */
+	desc->flags = flags;
+
 	/* GPIOD_ are directly managed by driver in set_dir_flags*/
 	if (ops->set_dir_flags) {
 		ret = ops->set_dir_flags(dev, desc->offset, flags);
-- 
2.24.1



More information about the U-Boot mailing list