Re: [PATCH 1/6] gpiolib: Allow GPIO chips to request their own GPIOs

2014-03-05 Thread Alexandre Courbot
On Wed, Mar 5, 2014 at 11:49 AM, Linus Walleij wrote: > On Tue, Feb 25, 2014 at 12:00 AM, Mika Westerberg > wrote: > >> Sometimes it is useful to allow GPIO chips themselves to request GPIOs they >> own through gpiolib API. One usecase is ACPI ASL code that should be able >> to toggle GPIOs throu

Re: [PATCH 1/6] gpiolib: Allow GPIO chips to request their own GPIOs

2014-03-05 Thread Rafael J. Wysocki
On Wednesday, March 05, 2014 02:05:50 PM Mika Westerberg wrote: > On Wed, Mar 05, 2014 at 10:49:41AM +0800, Linus Walleij wrote: > > On Tue, Feb 25, 2014 at 12:00 AM, Mika Westerberg > > wrote: > > > > > Sometimes it is useful to allow GPIO chips themselves to request GPIOs > > > they > > > own

Re: [PATCH 1/6] gpiolib: Allow GPIO chips to request their own GPIOs

2014-03-05 Thread Mika Westerberg
On Wed, Mar 05, 2014 at 10:49:41AM +0800, Linus Walleij wrote: > On Tue, Feb 25, 2014 at 12:00 AM, Mika Westerberg > wrote: > > > Sometimes it is useful to allow GPIO chips themselves to request GPIOs they > > own through gpiolib API. One usecase is ACPI ASL code that should be able > > to toggle

Re: [PATCH 1/6] gpiolib: Allow GPIO chips to request their own GPIOs

2014-03-04 Thread Linus Walleij
On Tue, Feb 25, 2014 at 12:00 AM, Mika Westerberg wrote: > Sometimes it is useful to allow GPIO chips themselves to request GPIOs they > own through gpiolib API. One usecase is ACPI ASL code that should be able > to toggle GPIOs through GPIO operation regions. > > We can't really use gpio_request

Re: [PATCH 1/6] gpiolib: Allow GPIO chips to request their own GPIOs

2014-02-27 Thread Mika Westerberg
On Wed, Feb 26, 2014 at 02:47:58PM +0100, Rafael J. Wysocki wrote: > > Sounds good. Only thing I'm not sure about is the fact that > > __gpiod_request() releases the lock when it calls chip driver callbacks > > (and takes it back of course). Is that acceptable practice to take the lock > > outside

Re: [PATCH 1/6] gpiolib: Allow GPIO chips to request their own GPIOs

2014-02-26 Thread Rafael J. Wysocki
On Wednesday, February 26, 2014 11:05:42 AM Mika Westerberg wrote: > On Tue, Feb 25, 2014 at 03:10:24PM +0100, Rafael J. Wysocki wrote: > > On Monday, February 24, 2014 06:00:06 PM Mika Westerberg wrote: > > > Sometimes it is useful to allow GPIO chips themselves to request GPIOs > > > they > > >

Re: [PATCH 1/6] gpiolib: Allow GPIO chips to request their own GPIOs

2014-02-26 Thread Mika Westerberg
On Tue, Feb 25, 2014 at 03:10:24PM +0100, Rafael J. Wysocki wrote: > On Monday, February 24, 2014 06:00:06 PM Mika Westerberg wrote: > > Sometimes it is useful to allow GPIO chips themselves to request GPIOs they > > own through gpiolib API. One usecase is ACPI ASL code that should be able > > to t

Re: [PATCH 1/6] gpiolib: Allow GPIO chips to request their own GPIOs

2014-02-25 Thread Rafael J. Wysocki
On Monday, February 24, 2014 06:00:06 PM Mika Westerberg wrote: > Sometimes it is useful to allow GPIO chips themselves to request GPIOs they > own through gpiolib API. One usecase is ACPI ASL code that should be able > to toggle GPIOs through GPIO operation regions. > > We can't really use gpio_r

[PATCH 1/6] gpiolib: Allow GPIO chips to request their own GPIOs

2014-02-24 Thread Mika Westerberg
Sometimes it is useful to allow GPIO chips themselves to request GPIOs they own through gpiolib API. One usecase is ACPI ASL code that should be able to toggle GPIOs through GPIO operation regions. We can't really use gpio_request() and its counterparts because it will pin the module to the kernel