linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "Zheng, Lv" <lv.zheng@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	"Wysocki, Rafael J" <rafael.j.wysocki@intel.com>,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 2/2] gpio / ACPI: add support for GPIO operation regions
Date: Mon, 16 Sep 2013 11:10:48 +0300	[thread overview]
Message-ID: <20130916081048.GM7393@intel.com> (raw)
In-Reply-To: <1AE640813FDE7649BE1B193DEA596E8802463A46@SHSMSX101.ccr.corp.intel.com>

On Mon, Sep 16, 2013 at 01:21:53AM +0000, Zheng, Lv wrote:
> > A pseudo device may be created to access the GPIO operation region fields provided by one GPIO device.
> > The pseudo device may have other functions to access other GPIO operation region fields provided by other GPIO devices, or even worse to
> > access other ACPI provided value-adds.
> > So hierarchically the pseudo device only requires CPU, thus should not be under the GPIO device, which means the GPIO operation regions
> > have nothing to do with the GPIO devices' ACPI handle.
> 
> Sorry for the wording.
> It's better to say the GPIO operation region users haven't strict
> relationship to the GPIO operation region providers.
> As the installation is to provide GPIO operation regions to the users, it
> shouldn't relate to the providers' ACPI handle.

If I understand you correctly you mean that there might be multiple users
(different devices) for the same GPIO operation region, right?

That shouldn't be a problem as far as I can tell.

What comes to the hierarchy you refer, I'm not sure if that is a problem
either (unless I'm missing something). The GPIO can be used anywhere in the
ASL, it doesn't have to be descendant of the GPIO device. You only need to
do something like this:

	// Assert the GPIO
	Store(1, \_SB.PCI0.SHD3)

In other words, use the fully qualified name.

Typically when the GPIO device _REG() is called it sets some variable like
AVBL to true which is then checked in the code that uses the GPIO:

	If (LEqual (\_SB.PCI0.GPO0.AVBL, One))
	{
		Store (Zero, \_SB.PCI0..SHD3)
	}

So if there is no driver, this part of the code is never called.

  reply	other threads:[~2013-09-16  8:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 15:14 [PATCH 1/2] gpio / ACPI: register to ACPI events automatically Mika Westerberg
2013-09-13 15:14 ` [PATCH 2/2] gpio / ACPI: add support for GPIO operation regions Mika Westerberg
2013-09-13 15:55   ` Andy Shevchenko
2013-09-13 17:36     ` Mika Westerberg
2013-09-14  0:10   ` Zheng, Lv
2013-09-15  6:51     ` Mika Westerberg
2013-09-16  0:46       ` Zheng, Lv
2013-09-16  1:21         ` Zheng, Lv
2013-09-16  8:10           ` Mika Westerberg [this message]
2013-09-16 23:35             ` Zheng, Lv
2013-09-17  8:37               ` Mika Westerberg
2013-09-24  0:47                 ` Zheng, Lv
2013-09-24  4:59                   ` Mika Westerberg
2013-09-20 19:21   ` Linus Walleij
2013-09-23 10:48     ` Mika Westerberg
2013-09-20 19:08 ` [PATCH 1/2] gpio / ACPI: register to ACPI events automatically Linus Walleij
2013-09-23 10:52   ` Mika Westerberg

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=20130916081048.GM7393@intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=mathias.nyman@linux.intel.com \
    --cc=rafael.j.wysocki@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).