kernel-fxtec-pro1x/drivers/pinctrl
Linus Walleij 1a78958dc2 pinctrl: reserve pins when states are activated
This switches the way that pins are reserved for multiplexing:

We used to do this when the map was parsed, at the creation of
the settings inside the pinctrl handle, in pinmux_map_to_setting().

However this does not work for us, because we want to use the
same set of pins with different devices at different times: the
current code assumes that the pin groups in a pinmux state will
only be used with one single device, albeit different groups can
be active at different times. For example if a single I2C driver
block is used to drive two different busses located on two
pin groups A and B, then the pins for all possible states of a
function are reserved when fetching the pinctrl handle: the
I2C bus can choose either set A or set B by a mux state at
runtime, but all pins in both group A and B (the superset) are
effectively reserved for that I2C function and mapped to the
device. Another device can never get in and use the pins in
group A, even if the device/function is using group B at the
moment.

Instead: let use reserve the pins when the state is activated
and drop them when the state is disabled, i.e. when we move to
another state. This way different devices/functions can use the
same pins at different times.

We know that this is an odd way of doing things, but we really
need to switch e.g. an SD-card slot to become a tracing output
sink at runtime: we plug in a special "tracing card" then mux
the pins that used to be an SD slot around to the tracing
unit and push out tracing data there instead of SD-card
traffic.

As a side effect pinmux_free_setting() is unused but the stubs
are kept for future additions of code.

Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Loic Pallardy <loic.pallardy@st.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Jean Nicolas Graux <jean-nicolas.graux@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-11-11 19:05:56 +01:00
..
spear pinctrl: SPEAr1340: Add clcd sleep mode pin configuration 2012-11-05 12:34:32 +01:00
core.c pinctrl: reserve pins when states are activated 2012-11-11 19:05:56 +01:00
core.h pinctrl: reserve pins when states are activated 2012-11-11 19:05:56 +01:00
devicetree.c pinctrl: implement pinctrl deferred probing 2012-04-18 13:53:11 +02:00
devicetree.h pinctrl: core device tree mapping table parsing support 2012-04-18 13:53:10 +02:00
Kconfig pinctrl: samsung and exynos need to depend on OF && GPIOLIB 2012-11-06 10:02:14 +01:00
Makefile Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-10-09 16:08:04 +09:00
pinconf-generic.c pinctrl: introduce generic pin config 2012-03-12 22:49:02 +01:00
pinconf.c pinctrl: remove mutex lock in groups show 2012-10-18 20:27:31 +02:00
pinconf.h pinctrl: pinconf: fix compilation error if PINCONF is not selected 2012-04-18 13:53:12 +02:00
pinctrl-armada-370.c pinctrl: mvebu: add pinctrl driver for Armada 370 2012-09-22 14:50:19 +00:00
pinctrl-armada-xp.c pinctrl: mvebu: add pinctrl driver for Armada XP 2012-09-22 14:50:20 +00:00
pinctrl-bcm2835.c pinctrl: fix return value in bcm2835_pinctrl_probe() 2012-10-15 09:09:27 +02:00
pinctrl-coh901.c pinctrl/coh901: move header to platform data dir 2012-08-13 13:53:05 +02:00
pinctrl-coh901.h pinctrl: support pinconfig on the U300 2012-03-12 22:49:03 +01:00
pinctrl-dove.c pinctrl: mvebu: dove pinctrl driver 2012-09-22 14:50:16 +00:00
pinctrl-exynos.c pinctrl: exynos: Fix wakeup IRQ domain registration check 2012-09-21 07:34:07 +09:00
pinctrl-exynos.h pinctrl: exynos: Set pin function to EINT in irq_set_type of GPIO EINTa 2012-09-21 07:33:48 +09:00
pinctrl-falcon.c OF: pinctrl: MIPS: lantiq: adds support for FALCON SoC 2012-09-13 10:30:58 +02:00
pinctrl-imx.c pinctrl: imx: remove duplicated const 2012-09-18 15:19:13 +02:00
pinctrl-imx.h pinctrl: pinctrl-imx: add imx pinctrl core driver 2012-05-02 01:14:40 +02:00
pinctrl-imx6q.c pinctrl: pinctrl-imx6q: add missed mux function for USBOTG_ID 2012-07-14 22:32:10 +02:00
pinctrl-imx23.c pinctrl: mxs: register driver at postcore_initcall time 2012-08-05 00:24:15 +02:00
pinctrl-imx28.c pinctrl: mxs: register driver at postcore_initcall time 2012-08-05 00:24:15 +02:00
pinctrl-imx35.c pinctrl: pinctrl-imx: add imx35 pinctrl driver 2012-09-03 13:21:37 +02:00
pinctrl-imx51.c pinctrl: imx5: start numbering pad from 0 2012-09-03 13:21:37 +02:00
pinctrl-imx53.c pinctrl: imx5: start numbering pad from 0 2012-09-03 13:21:37 +02:00
pinctrl-kirkwood.c pinctrl: mvebu: kirkwood pinctrl driver 2012-09-22 14:50:17 +00:00
pinctrl-lantiq.c OF: pinctrl: MIPS: lantiq: implement lantiq/xway pinctrl support 2012-09-13 10:30:49 +02:00
pinctrl-lantiq.h OF: pinctrl: MIPS: lantiq: implement lantiq/xway pinctrl support 2012-09-13 10:30:49 +02:00
pinctrl-mmp2.c pinctrl: enable pinmux for mmp series 2012-02-01 19:42:35 +01:00
pinctrl-mvebu.c pinctrl: mvebu: pinctrl driver core 2012-09-22 14:50:14 +00:00
pinctrl-mvebu.h pinctrl: mvebu: pinctrl driver core 2012-09-22 14:50:14 +00:00
pinctrl-mxs.c pinctrl: mxs: Use kfree to fix build error 2012-06-17 19:44:44 +02:00
pinctrl-mxs.h pinctrl: add pinctrl-mxs support 2012-05-02 01:18:27 +02:00
pinctrl-nomadik-db8500.c pinctrl/nomadik: support other alternate-C functions 2012-10-10 08:36:59 +02:00
pinctrl-nomadik-db8540.c pinctrl/nomadik: support other alternate-C functions 2012-10-10 08:36:59 +02:00
pinctrl-nomadik-stn8815.c pinctrl/nomadik: add STn8815 ASIC support 2012-09-03 13:21:37 +02:00
pinctrl-nomadik.c pinctrl/nomadik: pass DT node to the irqdomain 2012-10-23 11:52:25 +02:00
pinctrl-nomadik.h pinctrl/nomadik: support other alternate-C functions 2012-10-10 08:36:59 +02:00
pinctrl-pxa3xx.c pinctrl: pinctrl-pxa3xx: remove empty pinmux disable function 2012-05-15 09:59:50 +02:00
pinctrl-pxa3xx.h pinctrl: enable pinmux for mmp series 2012-02-01 19:42:35 +01:00
pinctrl-pxa168.c pinctrl: enable pinmux for mmp series 2012-02-01 19:42:35 +01:00
pinctrl-pxa910.c pinctrl: enable pinmux for mmp series 2012-02-01 19:42:35 +01:00
pinctrl-samsung.c pinctrl: samsung: use __devinit section for init code 2012-10-15 09:09:27 +02:00
pinctrl-samsung.h pinctrl: add samsung pinctrl and gpiolib driver 2012-09-07 06:07:19 +09:00
pinctrl-single.c pinctrl: pinctrl-single: add debugfs pin h/w state info 2012-09-28 09:12:53 +02:00
pinctrl-sirf.c pinctrl: sirf: remove sirfsoc_gpio_set_pull function 2012-10-15 09:09:27 +02:00
pinctrl-tegra.c pinctrl: tegra: set low power mode bank width to 2 2012-10-17 19:47:06 +02:00
pinctrl-tegra.h pinctrl: tegra: move pinconf-tegra.h content into drivers/pinctrl 2012-09-14 11:35:37 -06:00
pinctrl-tegra20.c pinctrl: tegra: refactor probe handling 2012-04-18 10:26:40 -06:00
pinctrl-tegra30.c pinctrl: tegra: correct bank for pingroup and drv pingroup 2012-10-17 19:49:28 +02:00
pinctrl-u300.c pinctrl/pinctrl-u300: remove unneeded devm_kfree call 2012-08-05 00:24:15 +02:00
pinctrl-xway.c pinctrl: remove duplicated include from pinctrl-xway.c 2012-10-15 09:09:27 +02:00
pinmux.c pinctrl: reserve pins when states are activated 2012-11-11 19:05:56 +01:00
pinmux.h pinctrl: ifdef CONFIG_DEBUG_FS cleanup 2012-04-18 13:53:12 +02:00