linux/drivers/pinctrl
Sonic Zhang e9a03add0c pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x.
The new ADI GPIO2 controller was introduced since the BF548 and BF60x
processors. It differs a lot from the old one on BF5xx processors. So,
create a pinctrl driver under the pinctrl framework.

- Define gpio ports and pin interrupt controllers as individual platform
  devices.
- Register a pinctrl driver for the whole GPIO ports and pin interrupt
  devices.
- Probe pint devices before port devices. Put device instances into
  the global gpio and pint lists.
- Define peripheral, irq and gpio reservation bit masks for each gpio
  port as runtime resources.
- Save and restore gpio port and pint status MMRs in syscore PM functions.
- Create the plug-in subdrivers to hold the pinctrl soc data for bf54x
  and bf60x. Add soc data into struct adi_pinctrl. Initialize the soc data
  in pin controller probe function. Get the pin groups and functions via
  the soc data reference.
- Call gpiochip_add_pin_range() in gpio device probe function to register
  range cross reference between gpio device and pin control device.
- Get range by pinctrl_find_gpio_range_from_pin(), find gpio_port object
  by container_of() and find adi_pinctrl by pin control device name.
- Handle peripheral and gpio requests in pinctrl operation functions.
- Demux gpio IRQs via the irq_domain created by each GPIO port.

v2-changes:
- Remove unlinke() directive.

v3-changes:
- Rename struct adi_pmx to adi_pinctrl.
- Fix the comments of struct gpio_pint.
- Remove unused pin_base in struct gpio_port.
- Change pint_assign into bool type.
- Add comments about the relationship between pint device and port device
to the driver header.
- Use BIT macro to shift bit.
- Remove all bitmap reservation help functions. Inline reservation functions
into the actual code.
- Remove gpio and offset mutual reference help functions.
- Remove all help functions to find gpio_port and adi_pinctrl structs. Get
range by pinctrl_find_gpio_range_from_pin(), find gpio_port object by
container_of() and find adi_pinctrl by pin control device name.
- Pass bool type usage variable to port_setup help function.
- Separate long bit operations into several lines and add comments.
- Use debugfs to output all GPIO request information.
- Avoid to set drvdata to NULL
- Add explanation to function adi_gpio_init_int()
- Call gpiochip_add_pin_range() in gpio device probe function to register
range cross reference between gpio device and pin control device.
- Remove the reference to pin control device from the gpio_port struct.
Remove the reference list to gpio device from the adi_pinctrl struct.
Replace the global adi_pinctrl list with adi_gpio_port_list. Walk through
the gpio list to do power suspend and resume operations.
- Remove the global GPIO base from struct adi_pinctrl, define pin base in
the platform data for each GPIO port device.
- Initialize adi_pinctrl_setup in arch_initcall().
- print the status of triggers, whether it is in GPIO mode, if it is
flagged to be used as IRQ, etc in adi_pin_dbg_show().
- Create the plug-in subdrivers to hold the pinctrl soc data for bf54x
and bf60x. Add soc data into struct adi_pinctrl. Initialize the soc data
in pin controller probe function. Get the pin groups and functions via
the soc data reference.

v4-changes:
- remove useless system_state checking.
- replace dev_err with dev_warn in both irq and gpio pin cases.
- comment on relationship between irq type and invert operation.
- It is not necessary to check the reservation mode of the requested
pin in IRQ chip operation. Remove the reservation map.
- Use existing gpio/pinctrl subsystem debugfs files. Remove pinctrl-adi2
driver specific debugfs output.
- Add linkport group and function information for bf60x.
- Separate uart and ctsrts pins into 2 groups.
- Separate APAPI and alternative ATAPI pins into 2 groups.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-09-19 14:37:27 +02:00
..
mvebu PTR_RET() is a weird name, and led to some confusing usage. We ended 2013-09-04 17:31:11 -07:00
sh-pfc Linux 3.11-rc7 2013-08-29 09:46:30 +02:00
sirf Linux 3.11-rc7 2013-08-29 09:46:30 +02:00
spear pinctrl: spear: Convert to devm_ioremap_resource 2013-08-28 13:34:18 +02:00
vt8500 pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
core.c Linux 3.11-rc7 2013-08-29 09:46:30 +02:00
core.h pinctrl: move subsystem mutex to pinctrl_dev struct 2013-04-26 17:01:35 +02:00
devicetree.c pinctrl: move subsystem mutex to pinctrl_dev struct 2013-04-26 17:01:35 +02:00
devicetree.h pinctrl: core device tree mapping table parsing support 2012-04-18 13:53:10 +02:00
Kconfig pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x. 2013-09-19 14:37:27 +02:00
Makefile pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x. 2013-09-19 14:37:27 +02:00
pinconf-generic.c pinctrl: pinconf-generic: Remove ti prefix in dev_err messages 2013-08-29 09:48:13 +02:00
pinconf.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinconf.h pinctrl: add function to parse generic pinconfig properties from a dt node 2013-06-16 11:57:32 +02:00
pinctrl-ab8500.c pinctrl: ab8500: Staticize some symbols 2013-04-09 09:54:00 +02:00
pinctrl-ab8505.c pinctrl: ab8505: Staticize some symbols 2013-04-09 09:59:42 +02:00
pinctrl-ab8540.c pinctrl: ab8540: Staticize some symbols 2013-04-09 09:58:02 +02:00
pinctrl-ab9540.c pinctrl: ab9540: Staticize some symbols 2013-04-09 09:55:59 +02:00
pinctrl-abx500.c pinctrl: abx500: fix bitwise AND test 2013-08-28 14:32:06 +02:00
pinctrl-abx500.h pinctrl/abx500: replace IRQ offsets with table read-in values 2013-02-10 15:44:33 +01:00
pinctrl-adi2-bf54x.c pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x. 2013-09-19 14:37:27 +02:00
pinctrl-adi2-bf60x.c pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x. 2013-09-19 14:37:27 +02:00
pinctrl-adi2.c pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x. 2013-09-19 14:37:27 +02:00
pinctrl-adi2.h pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x. 2013-09-19 14:37:27 +02:00
pinctrl-at91.c pinctrl: at91: fix get_pullup/down function return 2013-08-28 21:21:42 +02:00
pinctrl-baytrail.c pinctrl-baytrail: fix to avoid sparse warnings 2013-07-23 01:23:27 +02:00
pinctrl-bcm2835.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-coh901.c Pin control changes for the v3.11 kernel cycle: 2013-07-03 11:48:03 -07:00
pinctrl-coh901.h pinctrl: support pinconfig on the U300 2012-03-12 22:49:03 +01:00
pinctrl-exynos5440.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-exynos.c pinctrl: Add s5pv210 support to pinctrl-exynos 2013-08-28 15:56:06 +02:00
pinctrl-exynos.h pinctrl: exynos: Handle suspend/resume of GPIO EINT registers 2013-05-27 15:37:09 +02:00
pinctrl-falcon.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-imx6dl.c pinctrl: add pinctrl driver for imx6dl 2013-04-09 22:53:38 +08:00
pinctrl-imx6q.c pinctrl: imx: move hard-coding data into device tree 2013-04-09 22:52:50 +08:00
pinctrl-imx6sl.c pinctrl: add pinctrl driver for imx6sl 2013-04-09 22:53:38 +08:00
pinctrl-imx23.c Drivers: pinctrl: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
pinctrl-imx28.c Drivers: pinctrl: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
pinctrl-imx35.c pinctrl: imx: move hard-coding data into device tree 2013-04-09 22:52:50 +08:00
pinctrl-imx51.c pinctrl: imx: move hard-coding data into device tree 2013-04-09 22:52:50 +08:00
pinctrl-imx53.c pinctrl: imx: move hard-coding data into device tree 2013-04-09 22:52:50 +08:00
pinctrl-imx.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-imx.h pinctrl: imx: Use struct type for pins 2013-08-16 14:43:56 +02:00
pinctrl-lantiq.c pinctrl/lantiq: Free mapping configs for both pin and groups 2013-05-15 13:28:46 +02:00
pinctrl-lantiq.h pinctrl/lantiq: add output pinconf parameter 2013-02-05 16:17:22 +01:00
pinctrl-mxs.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-mxs.h pinctrl: add pinctrl-mxs support 2012-05-02 01:18:27 +02:00
pinctrl-nomadik-db8500.c pinctrl/nomadik-db8500: Fix checkpatch errors 2013-03-27 22:21:32 +01:00
pinctrl-nomadik-db8540.c Drivers: pinctrl: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
pinctrl-nomadik-stn8815.c pinctrl: pinctrl-nomadik-stn8815: Fix checkpatch error 2013-03-13 19:50:20 +01:00
pinctrl-nomadik.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-nomadik.h pinctrl/nomadik: move the platform data header 2012-11-05 09:55:27 +01:00
pinctrl-palmas.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-rockchip.c pinctrl: rockchip: Implement .request() and .free() callbacks 2013-08-29 09:11:00 +02:00
pinctrl-s3c24xx.c pinctrl: s3c24xx: off by one in s3c24xx_eint_init() 2013-08-28 14:44:25 +02:00
pinctrl-s3c64xx.c pinctrl: s3c64xx: Fix build error caused by undefined chained_irq_enter 2013-04-23 13:59:45 +02:00
pinctrl-samsung.c pinctrl: Add s5pv210 support to pinctrl-exynos 2013-08-28 15:56:06 +02:00
pinctrl-samsung.h pinctrl: Add s5pv210 support to pinctrl-exynos 2013-08-28 15:56:06 +02:00
pinctrl-single.c Linux 3.11-rc7 2013-08-29 09:46:30 +02:00
pinctrl-st.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-sunxi-pins.h pinctrl: sunxi: Add Allwinner A20 pins set 2013-08-23 08:56:30 +02:00
pinctrl-sunxi.c pinctrl: sunxi: Fix off-by-one for valid offset range checking 2013-08-30 10:37:36 +02:00
pinctrl-sunxi.h pinctrl: sunxi: Add spinlocks 2013-08-07 21:57:17 +02:00
pinctrl-tegra20.c pinctrl: tegra: add support for rcv-sel and drive type 2013-01-18 16:13:52 +01:00
pinctrl-tegra30.c pinctrl: tegra: add support for rcv-sel and drive type 2013-01-18 16:13:52 +01:00
pinctrl-tegra114.c pinctrl: tegra: add clfvs function to Tegra114 support 2013-02-15 20:22:39 +01:00
pinctrl-tegra.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-tegra.h pinctrl: tegra: add support for rcv-sel and drive type 2013-01-18 16:13:52 +01:00
pinctrl-tz1090-pdc.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-tz1090.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-u300.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-utils.c pinctrl: utils: include export.h to avoid warnings 2013-08-28 15:50:33 +02:00
pinctrl-utils.h pinctrl: add utility functions for add map/configs 2013-08-14 21:00:41 +02:00
pinctrl-vf610.c pinctrl: add VF610 pinctrl driver 2013-06-16 11:56:51 +02:00
pinctrl-xway.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinmux.c pinctrl: improve warning messages 2013-08-14 22:49:14 +02:00
pinmux.h pinctrl: ifdef CONFIG_DEBUG_FS cleanup 2012-04-18 13:53:12 +02:00