[U-Boot] [PATCH v3] M28: Added pin name support in GPIO driver
Mike Frysinger
vapier at gentoo.org
Thu Nov 24 18:38:23 CET 2011
On Wednesday 23 November 2011 17:33:02 Mike Frysinger wrote:
> On Wednesday 23 November 2011 16:10:49 Robert Deliën wrote:
> > -#ifndef name_to_gpio
> > -#define name_to_gpio(name) simple_strtoul(name, NULL, 10)
> > +#ifndef gpio_name_to_pin
> > +#define gpio_name_to_pin(name) simple_strtoul(name, NULL, 10)
> >
> > #endif
>
> as for the underlying reason, i don't have a problem with renaming things.
> but the reason i picked "name_to_gpio" instead of "gpio_to_name" was that
> this is not part of the Linux GPIO API. i didn't want to use a name
> that'd end up clashing. but i guess the naming convention didn't
> translate well and it just confuses people.
actually, i lied. it's called "name_to_gpio" because it's converting from a
name to a gpio. which is i why i guess you had "pin" in there.
the framework doesn't require everything start with "gpio". the Linux API
already uses "irq_to_gpio" and "gpio_to_irq". so let's keep it "name_to_gpio"
as it's more straightforward imo.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111124/e11957a0/attachment.pgp>
More information about the U-Boot
mailing list