linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Timur Tabi <timur@codeaurora.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Ning Li <ning.li@intel.com>, Alan Cox <alan@linux.intel.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 0/2] pinctrl: Intel Cherryview/Braswell support
Date: Tue, 4 Nov 2014 21:04:51 +0200	[thread overview]
Message-ID: <20141104190451.GS1618@lahna.fi.intel.com> (raw)
In-Reply-To: <545912D2.5090708@codeaurora.org>

On Tue, Nov 04, 2014 at 11:54:26AM -0600, Timur Tabi wrote:
> On 11/04/2014 02:20 AM, Mika Westerberg wrote:
> >There is nothing like that yet in ACPI world but with the ACPI _DSD
> >patches we are getting properties similar to DT which means that we can
> >provide pinctrl bindings from ACPI systems as well.
> 
> Do you know if anyone has signed up to actually do the work of defining how
> pinctrl will look in ACPI?

No, not yet.

> I'm guessing the simplest approach would be to:
> 
> 1) Modify pinctrl_dt_to_map() so that it uses functions like
> device_read_property() instead of of_find_property() (i.e. use
> ACPI/DT-agnostic calls instead of DT-specific calls).
> 
> 2) Define all of the DSD property in ASL so that pinctrl_dt_to_map() works
> as-is.
> 
> 3) Possibly rename pinctrl_dt_to_map() to something like
> pinctrl_prop_to_map() or whatever.

Yes, something like that.

We still need to account the fact that BIOS is supposed to configure the
pins in advance. The pinctrl mappings are just for refining that, like
muxing out the SPI pins instead of GPIOs and so on.

> > Typically it has
> >been the BIOS that configures things but it cannot get everything 100%
> >right.
> 
> True, but this assumes that the BIOS can already talk to the pin control
> device without using the Linux driver.  If we use DSD properties to describe
> the pin control functions, then we're actually using the Linux driver to do
> pin control, albeit indirectly.

Right.

> >Currently I've been testing the muxing functionality so that I have a
> >small board file that sets mappings and the driver core handles
> >everything from there. For example I have development board where SPI
> >pins are muxed as GPIOs by the BIOS and with the mappings when the SPI
> >device appears the core will mux SPI out of those pins.
> 
> How do you actually get the kernel to call into your pinctrl driver, without
> using any device tree properties or DSD properties?

I'm using a small board file (which is not included in this patch set)
that lives in arch/x86/platform/*.

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

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03 11:01 [PATCH v2 0/2] pinctrl: Intel Cherryview/Braswell support Mika Westerberg
2014-11-03 11:01 ` [PATCH v2 1/2] gpio / ACPI: Add knowledge about pin controllers to acpi_get_gpiod() Mika Westerberg
2014-11-04 10:18   ` Linus Walleij
2014-11-03 11:01 ` [PATCH v2 2/2] pinctrl: Add Intel Cherryview/Braswell pin controller support Mika Westerberg
2014-11-04 10:23   ` Linus Walleij
2014-11-03 23:24 ` [PATCH v2 0/2] pinctrl: Intel Cherryview/Braswell support Timur Tabi
2014-11-04  8:20   ` Mika Westerberg
2014-11-04  9:39     ` Mika Westerberg
2014-11-04 13:31       ` Rafael J. Wysocki
2014-11-04 13:48         ` Linus Walleij
2014-11-04 14:16           ` Rafael J. Wysocki
2014-11-04 14:12             ` Mika Westerberg
2014-11-04 16:37           ` Timur Tabi
2014-11-04 21:51         ` Timur Tabi
2014-11-04 22:47           ` Rafael J. Wysocki
2014-11-04 22:32             ` Timur Tabi
2014-11-04 22:39               ` Timur Tabi
2014-11-04 23:13                 ` Rafael J. Wysocki
2014-11-04 22:56                   ` Timur Tabi
2014-11-04 23:18                     ` Timur Tabi
2014-11-05 21:04                       ` Rafael J. Wysocki
2014-11-05 21:19                     ` Rafael J. Wysocki
2014-11-04 23:00               ` Rafael J. Wysocki
2014-11-04 17:54     ` Timur Tabi
2014-11-04 19:04       ` Mika Westerberg [this message]
2014-11-06 19:30         ` Linus Walleij
2014-11-05 21:46       ` Grant Likely
2014-11-05 21:59         ` Timur Tabi
2014-11-05 22:15         ` Rafael J. Wysocki
2014-11-06 17:37           ` Grant Likely
2014-11-06 18:01             ` Timur Tabi
2014-11-07 23:12             ` Timur Tabi
2014-11-06 19:28       ` Linus Walleij
2014-11-05 21:44 ` Olof Johansson
2014-11-06  6:07   ` 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=20141104190451.GS1618@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=alan@linux.intel.com \
    --cc=gnurou@gmail.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    --cc=ning.li@intel.com \
    --cc=rjw@rjwysocki.net \
    --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;
as well as URLs for NNTP newsgroup(s).