diff mbox series

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

Message ID 20200512130208.3010303-2-hs@denx.de
State New
Headers show
Series gpio: add possibility to search for gpio label name | expand

Commit Message

Heiko Schocher May 12, 2020, 1:02 p.m. UTC
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 mbox series

Patch

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);