Re: [PATCH] gpio: expose gpio_to_chip()

From: Linus Walleij
Date: Tue Jun 07 2011 - 09:46:59 EST


2011/4/14 Grant Likely <grant.likely@xxxxxxxxxxxx>:
> On Thu, Apr 14, 2011 at 1:20 PM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
>> This makes the gpio_to_chip() function available to drivers. The
>> usecase is when you want to add a few chip-specific operations
>> apart from the ones exposed in struct gpio_chip.
>
> Similar to interrupt handling, it probably isn't a good idea to expose
> the gpio_chip directly.  Go ahead and add the ops you need and see
> what it looks like.

So have we come to a conclusion about what mechanism we shall use
for the custom GPIO ops? I need this to migrate the U300 and Nomadik
GPIO drivers to struct gpio_chip.

I suspect this patch will apply right off if you prefer this solution with
specific functions for specific stuff above the generic scheme of extending
the struct gpio_chip with a ioctl()-like vtable member that I and
Alan Cox came up with as a response to the above.

I'm happy to implement either, or even both if you like :-D

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/