lkml.org 
[lkml]   [2009]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [PATCH] gpiolib: introduce for_each_gpio_in_chip macro
Date
From
On Tuesday, August 04, 2009 2:14 PM, David Brownell wrote:
> On Friday 31 July 2009, H Hartley Sweeten wrote:
>> gpiolib: introduce for_each_gpio_in_chip macro
>>
>> There are a number of places in gpiolib where all the gpio's handled by a
>> chip are walked thru using a for() loop. This introduces a for_each_*
>> macro to clarify the code.
>
> I'd rather not. There are four such loops, and these are
> really simple iterators. Such a macro IMO just obfuscates,
> when it's just hiding such trivial index ops.
>
> NAK.

Ok.

For the record. The reason I sent this is I'm trying to work out an
extension to gpiolib that adds gpio_port_* access to the API. Most
of the gpiolib drivers already the necessary logic since the raw I/O
is performed on the entire 'chip'. The API just needs the extensions
added to request/free the port, set the direction and get/set the value.

Is this a worthwhile addition?

Regards,
Hartley


\
 
 \ /
  Last update: 2009-08-05 02:51    [W:0.047 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site