mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Timur Tabi <timur@codeaurora.org>
Cc: Linus <linus.walleij@linaro.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	lkml <linux-kernel@vger.kernel.org>,
	"Westerberg, Mika" <mika.westerberg@intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH v3 1/1] pinctrl: add Intel BayTrail GPIO/pinctrl support
Date: Wed, 23 Apr 2014 14:46:19 +0300	[thread overview]
Message-ID: <5357A80B.8030701@linux.intel.com> (raw)
In-Reply-To: <535005BA.1040405@codeaurora.org>

On 04/17/2014 07:47 PM, Timur Tabi wrote:
> On 04/15/2014 05:01 AM, Mathias Nyman wrote:
>>>
>>> This device will only be used on an ACPI system, right?  And isn't ACPI
>>> supposed to hide all the pinctrl programming from the OS?  I thought
>>> that was the whole point behind ACPI and the reason why ARM64 isn't
>>> going to use device trees.
>>>
>>
>> This was my starting point as well, and the driver was initially
>> submitted as a GPIO driver. But Linus W. suggested pinctrl instead, and
>> as he's the maintainer of both those subsystem I trust his judgment.
>
> Do you think, for an ACPI pinctrl driver, that we will need to specify
> any function groups?  When I look at the ASL that configures GPIOs, I
> see only lines like this:
>
> GpioIo (Exclusive, PullDefault, , , , "\\GIO0") {0x1D, 0x1E}
>
> This tells me that ACPI will never use any of the names that are
> defined.  I see that .get_function_name is called on my ACPI system, but
> I don't see where it is used.
>
> The reason I ask is because I would like to make a "generic" ACPI
> pinctrl/gpio driver that doesn't specify any pin groups.  So if we use
> the same pinctrl/gpio hardware on multiple SOCs, the only thing that the
> driver needs from ACPI is the number of pins.
>

Mika, Rafael (and me) have done some effort already on supporting ACPI 
gpio resources.

ACPI code creates a platfrom device out of the GPIO device defined ACPI 
tables, with all the resources set, and a hook back to the ACPI node.

Helper functions to translate the ACPI GpioIO and GpioInt resources to 
linux gpio numbers can be found in gpio/gpiolib-acpi.c together with 
other ACPI and gpio related helper functions.

see also
Documentation/acpi/enumeration.txt for some GPIO and ACPI related info

-Mathias


  reply	other threads:[~2014-04-23 11:34 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18 11:33 [PATCH v3 0/1] Pinctrl/gpio driver for Intel Baytrail platforms Mathias Nyman
2013-06-18 11:33 ` [PATCH v3 1/1] pinctrl: add Intel BayTrail GPIO/pinctrl support Mathias Nyman
2013-06-18 15:17   ` Linus Walleij
2013-06-19 10:28     ` Mathias Nyman
2014-04-11 22:54   ` Timur Tabi
2014-04-14  7:52     ` Mathias Nyman
2014-04-14 15:11       ` Timur Tabi
2014-04-15 10:01         ` Mathias Nyman
2014-04-17 16:47           ` Timur Tabi
2014-04-23 11:46             ` Mathias Nyman [this message]
2014-04-23 12:07               ` Timur Tabi
2014-04-23 13:59                 ` Westerberg, Mika
2014-04-23 15:14                   ` Timur Tabi
2014-04-23 22:20                     ` Linus Walleij
2014-04-23 22:54                       ` Timur Tabi
2014-04-24  6:27                       ` Westerberg, Mika
2014-04-24 11:20                         ` Timur Tabi
2014-04-24 11:38                           ` Westerberg, Mika
2014-04-24  6:35                     ` Westerberg, Mika
2014-04-24 11:18                       ` Timur Tabi
2014-04-24 11:58                         ` Westerberg, Mika
2014-04-24 13:29                           ` Linus Walleij
2014-04-24 15:25                           ` Timur Tabi
2014-04-25  7:41                             ` Westerberg, Mika
2014-04-25 10:36                               ` Linus Walleij
2014-04-25 16:13                               ` Timur Tabi
2014-04-25 16:21                                 ` Rafael J. Wysocki
2014-04-25 16:31                                   ` Timur Tabi
2014-05-02 22:31                                     ` Linus Walleij
2014-04-23 22:17     ` Linus Walleij

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=5357A80B.8030701@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=timur@codeaurora.org \
    /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

Powered by JetHome