mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 07:04:28 +00:00
gpio-uclass.c: save the GPIOD flags also in the gpio descriptor
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: 788ea83412
("gpio: add function _dm_gpio_set_dir_flags")
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Walter Lozano <walter.lozano@collabora.com>
This commit is contained in:
parent
06e1321553
commit
cd2faeba1a
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue