linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Robert Dolca <robert.dolca@gmail.com>,
	Robert Dolca <robert.dolca@intel.com>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Denis CIOCCA <denis.ciocca@st.com>
Subject: Re: [PATCH] IIO: Adds ACPI support for ST gyroscopes
Date: Wed, 25 Mar 2015 11:43:27 +0200	[thread overview]
Message-ID: <20150325094327.GW1878@lahna.fi.intel.com> (raw)
In-Reply-To: <CACRpkdYmN5YnH5rcA13NerPKdx62TpQVi5Hwr1vchu13QUcaOw@mail.gmail.com>

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.

  reply	other threads:[~2015-03-25  9:45 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 13:40 [PATCH] IIO: Adds ACPI support for ST gyroscopes Robert Dolca
2015-03-23 13:40 ` [PATCH] IIO: Add support for L3GD20H gyroscope Robert Dolca
2015-03-24 10:29   ` Linus Walleij
2015-03-28 11:14     ` Jonathan Cameron
2015-03-23 15:18 ` [PATCH] IIO: Adds ACPI support for ST gyroscopes Mika Westerberg
2015-03-24 11:51   ` Daniel Baluta
2015-03-24 10:22 ` Linus Walleij
2015-03-24 10:37 ` Linus Walleij
2015-03-24 10:44 ` Linus Walleij
2015-03-24 12:17 ` Lars-Peter Clausen
2015-03-24 13:26   ` Robert Dolca
2015-03-24 13:38     ` Lars-Peter Clausen
2015-03-24 13:57       ` Linus Walleij
2015-03-24 15:06         ` Mika Westerberg
2015-03-24 15:22           ` Lars-Peter Clausen
2015-03-24 15:28             ` Daniel Baluta
2015-03-24 15:55             ` Mika Westerberg
2015-03-24 16:43               ` Lars-Peter Clausen
2015-03-24 16:55                 ` Mika Westerberg
2015-03-25  8:44           ` Linus Walleij
2015-03-25  9:43             ` Mika Westerberg [this message]
2015-03-25 12:25               ` Mika Westerberg
2015-03-25 13:21                 ` Mika Westerberg
2015-03-25 13:42                   ` Robert Dolca
2015-03-25 18:05                   ` sathyanarayanan kuppuswamy
2015-03-25 18:08                     ` Lars-Peter Clausen
2015-03-25 21:12                   ` Octavian Purdila
2015-03-26 10:06                     ` Robert Dolca
2015-03-26 10:36                       ` Mika Westerberg
2015-03-26 10:16                     ` Mika Westerberg
2015-03-26 12:04                       ` Octavian Purdila
2015-03-26 14:04                         ` Mika Westerberg
2015-03-26 14:37                           ` Octavian Purdila
2015-03-26 14:47                             ` Mika Westerberg
2015-03-26 15:00                               ` Octavian Purdila
2015-03-26 16:28                                 ` Octavian Purdila
2015-03-27 10:06                                   ` Mika Westerberg
2015-03-27 10:36                                     ` Linus Walleij
2015-03-30  9:52                                       ` Mika Westerberg
2015-03-30 12:55                                         ` Octavian Purdila
2015-03-30 13:33                                           ` Mika Westerberg
2015-03-30 13:52                                             ` Octavian Purdila
2015-03-30 14:18                                               ` Mika Westerberg
2015-04-07  9:35                                               ` Linus Walleij
2015-04-07  9:39                                                 ` Lars-Peter Clausen
2015-03-26 18:32                                 ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150325094327.GW1878@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=denis.ciocca@st.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=robert.dolca@gmail.com \
    --cc=robert.dolca@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).