Re: [PATCH] gpio: add flags to export GPIOs when requesting

From: Wolfram Sang
Date: Wed Nov 16 2011 - 04:10:37 EST


Hi,

> >> #define GPIOF_EXPORT (1 << 2)
> >> #define GPIOF_EXPORT_DIR_CHANGEABLE (3 << 2)
> >
> > Then you won't have a single flag to check if the dir is changeable.

I played with both versions you mentioned and came to like this one
better, for this reason...

> > direction; just get rid of the two _DIR_ flags. That said, Wolfram's
> > patch seems to follow the conventions already in the file.
>
> Your truth.

...and this reason :)

> > Dong Aisheng posted patch "gpio: introduce gpio_export_array to ease
> > export for gpio arrays". Which should we pick; it doesn't seem like we
> > need both mechanisms.
>
> I vote for GPIOF_* variant (this one) since it can deal with different
> settings for each gpio pin in array.

Huh? I really missed Aisheng's one, otherwise I would have responded to
that. I also think my version is less intrusive and I surely need the
option that some pins may change directions and others may not.

BTW I didn't CC Grant, because he is on sabbatical right now, so Stephen
you are taking care of GPIO?

Thanks,

Wolfram

--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Attachment: signature.asc
Description: Digital signature