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")
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Walter Lozano <walter.lozano@collabora.com>
}
}
+ /* save the flags also in descriptor */
+ if (!ret)
+ desc->flags = flags;
+
return ret;
}
flags |= desc->flags;
ret = _dm_gpio_set_dir_flags(desc, flags);
- /* update the descriptor flags */
- if (ret)
- desc->flags = flags;
-
return ret;
}