[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BD79186B4FD85F4B8E60E381CAEE190901B7783E@mi8nycmail19.Mi8.com>
Date: Tue, 4 Aug 2009 20:48:49 -0400
From: "H Hartley Sweeten" <hartleys@...ionengravers.com>
To: "David Brownell" <david-b@...bell.net>
Cc: "Linux Kernel" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] gpiolib: introduce for_each_gpio_in_chip macro
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists