lkml.org 
[lkml]   [2015]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] IIO: Adds ACPI support for ST gyroscopes
On Wed, Mar 25, 2015 at 09:44:34AM +0100, Linus Walleij wrote:
> On Tue, Mar 24, 2015 at 4:06 PM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
>
> > This has few problems that I have not yet figured out. Maybe someone
> > here can suggest what to do:
> >
> > 1) Who is responsible in releasing the GPIO?
> > 2) What if the driver wants to use that pin as a GPIO instead? The GPIO
> > is already requested by the I2C core.
>
> In the DT usecase we actually specify that in the DTS file
> so we don't have the problem. Either the consumer accesses
> the irqchip API with:
>
> interrupts = <nn nn>;
>
> or it accesses the GPIO API with:
>
> gpios = <nn nn>;

OK, I see.

> so in that sense it is clear what is requested. Then the core
> of course uses gpiochip_lock/unlock_as_irq() to handle the
> case where bugs make a collision (like if both were specified
> and both APIs tries to access the same resource).

Where in the core code gpiochip_lock/unlock_as_irq() is called for
these? At least of_irq_get() doesn't seem to be doing that. Maybe I'm
looking at the wrong place.

> But as long as the DTS file is consistent there is no problem.
>
> So it seems the ACPI tables are lacking this semantic
> information?

I think the GpioIo/GpioInt separation serves the same purpose. Of course
both refer to GPIO controller instead of interrupt controller.


\
 
 \ /
  Last update: 2015-03-25 11:01    [W:0.071 / U:1.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site