linux/drivers/pinctrl
Douglas Anderson ef0eebc051 drivers/pinctrl: Add the concept of an "init" state
For pinctrl the "default" state is applied to pins before the driver's
probe function is called.  This is normally a sensible thing to do,
but in some cases can cause problems.  That's because the pins will
change state before the driver is given a chance to program how those
pins should behave.

As an example you might have a regulator that is controlled by a PWM
(output high = high voltage, output low = low voltage).  The firmware
might leave this pin as driven high.  If we allow the driver core to
reconfigure this pin as a PWM pin before the PWM's probe function runs
then you might end up running at too low of a voltage while we probe.

Let's introudce a new "init" state.  If this is defined we'll set
pinctrl to this state before probe and then "default" after probe
(unless the driver explicitly changed states already).

An alternative idea that was thought of was to use the pre-existing
"sleep" or "idle" states and add a boolean property that we should
start in that mode.  This was not done because the "init" state is
needed for correctness and those other states are only present (and
only transitioned in to and out of) when (optional) power management
is enabled.

Changes in v3:
- Moved declarations to pinctrl/devinfo.h
- Fixed author/SoB

Changes in v2:
- Added comment to pinctrl_init_done() as per Linus W.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-10-27 11:24:23 +01:00
..
bcm pinctrl: cygnus: Remove GPIO to Pinctrl pin mapping from driver 2015-10-27 10:44:57 +01:00
berlin pinctrl: berlin: fix BG2CD field widths 2015-10-16 16:42:48 +02:00
freescale pinctrl: freescale: imx7d: support iomux lpsr controller 2015-10-02 14:43:44 -07:00
intel pinctrl: baytrail: Fix compilation warnings when !CONFIG_PM 2015-10-16 22:54:33 +02:00
mediatek pinctrl: mediatek: Remove unneded semicolon 2015-10-02 04:06:47 -07:00
meson Here is the bulk of pin control changes for the v4.2 series: 2015-06-24 19:21:02 -07:00
mvebu Here is the bulk of pin control changes for the v4.2 series: 2015-06-24 19:21:02 -07:00
nomadik genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
qcom pinctrl: qcom: ssbi: fix compilation with DEBUG_FS=n 2015-10-16 22:35:52 +02:00
samsung pinctrl: samsung: Remove unneded semicolon 2015-10-02 04:06:48 -07:00
sh-pfc pinctrl: sh-pfc: Remove obsolete r8a7778 platform_device_id entry 2015-10-20 16:11:27 +02:00
sirf pinctrl: atlas7: support atlas7 step B changes 2015-10-16 21:56:07 +02:00
spear genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
sunxi pinctrl: sunxi: Add irq pinmuxing to sun6i "r" pincontroller 2015-10-23 10:13:30 +02:00
uniphier pinctrl: uniphier: set input-enable before pin-muxing 2015-10-27 11:07:49 +01:00
vt8500 pinctrl: make pinctrl_register() return proper error code 2015-06-10 14:49:52 +02:00
core.c drivers/pinctrl: Add the concept of an "init" state 2015-10-27 11:24:23 +01:00
core.h pinctrl: Don't just pretend to protect pinctrl_maps, do it for real 2015-05-06 16:24:28 +02:00
devicetree.c pinctrl: simplify of_pinctrl_get() 2015-07-16 09:39:03 +02:00
devicetree.h
Kconfig pinctrl: introduce driver for Atmel PIO4 controller 2015-09-21 11:21:33 -07:00
Makefile pinctrl: introduce driver for Atmel PIO4 controller 2015-09-21 11:21:33 -07:00
pinconf-generic.c pinctrl: pinconf-generic: add "input-schmitt" DT property 2015-10-02 15:09:11 -07:00
pinconf.c pinctrl: join dev_dbg strings into a single line 2015-08-03 10:13:00 +02:00
pinconf.h pinctrl: pinconf-generic: Allow driver to specify DT params 2015-01-11 22:32:19 +01:00
pinctrl-adi2-bf54x.c pinctrl: pinctrl-adi: combine multiple groups of one function together 2014-02-25 10:49:13 +01:00
pinctrl-adi2-bf60x.c added tabs instead of spaces 2015-07-16 09:39:01 +02:00
pinctrl-adi2.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
pinctrl-adi2.h pinctrl: pinctrl-adi: combine multiple groups of one function together 2014-02-25 10:49:13 +01:00
pinctrl-amd.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
pinctrl-amd.h Fix inconsistent spinlock of AMD GPIO driver which can be 2015-04-07 11:36:49 +02:00
pinctrl-as3722.c pinctrl: make pinctrl_register() return proper error code 2015-06-10 14:49:52 +02:00
pinctrl-at91-pio4.c pinctrl: at91-pio4: irq argument as been removed from irq flow handlers 2015-10-02 14:52:20 -07:00
pinctrl-at91.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
pinctrl-at91.h pinctrl: at91: use own header 2014-10-29 09:28:35 +01:00
pinctrl-coh901.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
pinctrl-coh901.h
pinctrl-digicolor.c pinctrl: digicolor: convert null test to IS_ERR test 2015-09-14 09:13:43 +02:00
pinctrl-falcon.c staging: drivers: pinctrl: Fixed checkpatch.pl warnings 2015-01-21 11:02:26 +01:00
pinctrl-lantiq.c pinctrl: make pinctrl_register() return proper error code 2015-06-10 14:49:52 +02:00
pinctrl-lantiq.h pinctrl: lantiq: fix include guard #endif comment 2015-03-09 18:10:57 +01:00
pinctrl-lpc18xx.c This is the bulk of pin control changes for the v4.3 development 2015-09-04 10:22:09 -07:00
pinctrl-palmas.c pinctrl: make pinctrl_register() return proper error code 2015-06-10 14:49:52 +02:00
pinctrl-pistachio.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
pinctrl-rockchip.c pinctrl: rockchip: add support for the rk3036 2015-09-25 09:22:55 -07:00
pinctrl-single.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
pinctrl-st.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
pinctrl-tb10x.c pinctrl: make pinctrl_register() return proper error code 2015-06-10 14:49:52 +02:00
pinctrl-tegra20.c pinctrl: tegra: some bits move between registers 2015-03-09 18:10:58 +01:00
pinctrl-tegra30.c pinctrl: tegra: some bits move between registers 2015-03-09 18:10:58 +01:00
pinctrl-tegra114.c pinctrl: tegra: some bits move between registers 2015-03-09 18:10:58 +01:00
pinctrl-tegra124.c pinctrl: tegra: some bits move between registers 2015-03-09 18:10:58 +01:00
pinctrl-tegra210.c pinctrl: tegra: add a driver for Tegra210 2015-03-09 18:10:59 +01:00
pinctrl-tegra-xusb.c pinctrl: make pinctrl_register() return proper error code 2015-06-10 14:49:52 +02:00
pinctrl-tegra.c pinctrl: tegra: Only set the gpio range if needed 2015-08-13 16:24:33 +02:00
pinctrl-tegra.h pinctrl: tegra: use signed bitfields for optional fields 2015-03-19 09:20:17 +01:00
pinctrl-tz1090-pdc.c pinctrl: tz1090-pdc: Remove unneded semicolons 2015-10-02 04:06:46 -07:00
pinctrl-tz1090.c pinctrl: tz1090: Remove unneded semicolons 2015-10-02 04:06:46 -07:00
pinctrl-u300.c pinctrl: make pinctrl_register() return proper error code 2015-06-10 14:49:52 +02:00
pinctrl-utils.c
pinctrl-utils.h
pinctrl-xway.c pinctrl: lantiq: remove bogus of_gpio_chip_add 2015-01-14 14:20:46 +01:00
pinctrl-zynq.c pinctrl: zynq: Fix typos in smc0_nand_grp and smc0_nor_grp 2015-08-25 16:21:31 +02:00
pinmux.c pinctrl: join lines that can be a single line within 80 columns 2015-09-14 09:13:43 +02:00
pinmux.h