Re: [PATCH v2 0/2] pinctrl: Intel Cherryview/Braswell support

Timur Tabi
2014-11-04T17:54:31Z

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? 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.

> 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.

> 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?

--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.