Re: [PATCH] gpiolib: fix chip->base handling in of_gpio_simple_xlate()

2012-07-24 Thread Daniel Mack
On 24.07.2012 16:08, Arnd Bergmann wrote: > On Tuesday 24 July 2012, Daniel Mack wrote: > diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c > index d18068a..51bc232 100644 > --- a/drivers/gpio/gpiolib-of.c > +++ b/drivers/gpio/gpiolib-of.c > @@ -147,13 +147,13

Re: [PATCH] gpiolib: fix chip->base handling in of_gpio_simple_xlate()

2012-07-24 Thread Arnd Bergmann
On Tuesday 24 July 2012, Daniel Mack wrote: > > But why would you do that? Both the "gpiochip" and its DT representation > > attempt to represent the hardware structure. If they don't match, then > > I'd assume one of them is wrong ;-) > > Well, have a look at what's currently there in drivers/gpi

Re: [PATCH] gpiolib: fix chip->base handling in of_gpio_simple_xlate()

2012-07-24 Thread Daniel Mack
Hi Arnd, On 24.07.2012 14:56, Arnd Bergmann wrote: > On Monday 23 July 2012, Daniel Mack wrote: >> (Cc: Arnd) >> >> On 22.07.2012 19:10, Daniel Mack wrote: >>> of_gpio_simple_xlate() is called for each chip when a GPIO is looked up. >>> When registering several chips off the same DT node (with dif

Re: [PATCH] gpiolib: fix chip->base handling in of_gpio_simple_xlate()

2012-07-24 Thread Arnd Bergmann
On Monday 23 July 2012, Daniel Mack wrote: > (Cc: Arnd) > > On 22.07.2012 19:10, Daniel Mack wrote: > > of_gpio_simple_xlate() is called for each chip when a GPIO is looked up. > > When registering several chips off the same DT node (with different pin > > offsets) however, the lookup fails as the

Re: [PATCH] gpiolib: fix chip->base handling in of_gpio_simple_xlate()

2012-07-23 Thread Daniel Mack
(Cc: Arnd) On 22.07.2012 19:10, Daniel Mack wrote: > of_gpio_simple_xlate() is called for each chip when a GPIO is looked up. > When registering several chips off the same DT node (with different pin > offsets) however, the lookup fails as the GPIO number passed in to > of_gpio_simple_xlate() is l

[PATCH] gpiolib: fix chip->base handling in of_gpio_simple_xlate()

2012-07-22 Thread Daniel Mack
of_gpio_simple_xlate() is called for each chip when a GPIO is looked up. When registering several chips off the same DT node (with different pin offsets) however, the lookup fails as the GPIO number passed in to of_gpio_simple_xlate() is likely higher than the chip's ->ngpio value. Fix that by tak