lkml.org 
[lkml]   [2010]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] gpiolib: add gpio_lookup_chip() to get chip information for gpio
On Fri, Jan 08, 2010 at 03:30:36PM +0800, Eric Miao wrote:
> On Fri, Jan 8, 2010 at 2:32 PM, Ben Dooks <ben-linux@fluff.org> wrote:
> > Add a call to get the 'struct gpio_chip' pointer for a given gpio, so
> > that core implementations which want to use gpiolib gpio numbering for
> > things like mux configuration can get back to the gpio_chip that they
> > registered without having to have their own list of gpio.
> >
> > This is especially useful for the Samsung S3C64XX series where the GPIO
> > bank sizes can vary from 32 down to 3, making it difficult to store an
> > array to convert a number to chip.
> >
>
> I think this is generally a good idea. Will most likely be useful to
> pxa platforms as well. Not sure though if you want to export this
> symbol as well since we do allow gpio chip drivers to be modules.

Probably not, since all the gpio call methods pass gpio_chip as their
first parameter. This is only in the case we want to use gpios for
something other than in/out/irq.

--
Ben

Q: What's a light-year?
A: One-third less calories than a regular year.



\
 
 \ /
  Last update: 2010-01-08 09:31    [W:0.475 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site