Message ID | 20220830120914.2329522-3-patrice.chotard@foss.st.com |
---|---|
State | Accepted |
Commit | a32920897a205c53717d864ae6c44fb6703094c9 |
Delegated to: | Tom Rini |
Headers | show |
Series | gpio: update gpio_get_status() | expand |
Hi Patrice, On 8/30/22 14:09, Patrice Chotard wrote: > Even pin with GPIOF_UNUSED function can have a label. > The criteria to add or not a space character is linked to label not to > the used/unused status. > > Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> > Reviewed-by: Simon Glass <sjg@chromium.org> > --- > > Changes in v3: > - add lost Simon Glass's reviewed-by during v1 review > > drivers/gpio/gpio-uclass.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Thanks Patrick
On Tue, Aug 30, 2022 at 02:09:12PM +0200, Patrice Chotard wrote: > Even pin with GPIOF_UNUSED function can have a label. > The criteria to add or not a space character is linked to label not to > the used/unused status. > > Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> > Reviewed-by: Simon Glass <sjg@chromium.org> > Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Applied to u-boot/next, thanks!
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index d60e46159a..a00880e446 100644 --- a/drivers/gpio/gpio-uclass.c +++ b/drivers/gpio/gpio-uclass.c @@ -916,7 +916,7 @@ int gpio_get_status(struct udevice *dev, int offset, char *buf, int buffsize) snprintf(str + len, buffsize - len, ": %d [%c]%s%s", ret, used ? 'x' : ' ', - used ? " " : "", + label ? " " : "", label ? label : ""); break; }