From deda8287e1a602393b052c80b815b3706987b3da Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Wed, 28 Mar 2012 22:27:07 +0530 Subject: pinctrl: Add SPEAr pinctrl drivers This adds pinctrl driver for SPEAr platform. It also updates MAINTAINERS file for SPEAr pinctrl drivers. Signed-off-by: Viresh Kumar Acked-by: Linus Walleij Reviewed-by: Stephen Warren --- drivers/pinctrl/Kconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/pinctrl/Kconfig') diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index abfb96408779..b25ac41f7939 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -84,6 +84,8 @@ config PINCTRL_COH901 COH 901 335 and COH 901 571/3. They contain 3, 5 or 7 ports of 8 GPIO pins each. +source "drivers/pinctrl/spear/Kconfig" + endmenu endif -- cgit v1.2.3 From e98ea774c8d210364379329f042e7596f83ecc58 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 26 Apr 2012 23:57:25 +0200 Subject: pinctrl/nomadik: basic Nomadik pinctrl interface This adds a scratch pin control interface to the Nomadik pinctrl driver, and defines the pins and groups in the DB8500 ASIC. We define GPIO ranges to cover the pins exposed. The DB8500 has more pins than this but we restrict the driver to the pins that can be controlled from the combined GPIO and pin control hardware to begin with. ChangeLog v1->v2: - Base on the latest pinctrl development from pinctrl-mergebase-20120418 so we can get rid of legacy group count mechanism. Also drop the range checks for group index, this is handled by the core now. Acked-by: Stephen Warren Signed-off-by: Linus Walleij --- drivers/pinctrl/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/pinctrl/Kconfig') diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index f73a5ea89754..5e718201b88f 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -36,6 +36,14 @@ config PINCTRL_MMP2 select PINCTRL_PXA3xx select PINCONF +config PINCTRL_NOMADIK + bool "Nomadik pin controller driver" + depends on ARCH_U8500 + +config PINCTRL_DB8500 + bool "DB8500 pin controller driver" + depends on PINCTRL_NOMADIK && ARCH_U8500 + config PINCTRL_PXA168 bool "PXA168 pin controller driver" depends on ARCH_MMP -- cgit v1.2.3 From dbfe8ca259e1f899ca02ea33d903fa21bbea67c5 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Wed, 2 May 2012 22:56:47 +0200 Subject: pinctrl/nomadik: implement pin multiplexing Implements basic pinmux for the Nomadik pin controller. The plan is to split the existing singular pin config interface nmk_config_pin(), nmk_config_pins(), that will configure muxing and other settings at the same time, into two interfaces by splitting the code in pinmux and pinctrl and eventually deleting the old interface and its helper functions when all users are gone. nmk_gpio_set_mode() and nmk_gpio_get_mode() are two older interfaces for just configuring muxing/altfunctions that will also be replaced in the end. We take some extra care to handle the glitch-avoidance here, but it is simpler now since there is only one altsetting per pingroup so we know immediately if we need to avoid altfunc C glitches for a certain group. As part of the makeover implement the .request() and .free() calls on the GPIO chips and have them call back into the pinctrl layer to reserve GPIOs. ChangeLog v1->v2: - Rebased on pinctrl-mergebase-20120418 so we get the latest driver infrastructure where function count is done by a fixed value and we can drop a few range checks since this is now handled by the core. - Include a GPIO muxing hunk erroneously part of the pin config patch. Acked-by: Stephen Warren Signed-off-by: Linus Walleij --- drivers/pinctrl/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/pinctrl/Kconfig') diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 5e718201b88f..bbf14dc67ad2 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -39,6 +39,7 @@ config PINCTRL_MMP2 config PINCTRL_NOMADIK bool "Nomadik pin controller driver" depends on ARCH_U8500 + select PINMUX config PINCTRL_DB8500 bool "DB8500 pin controller driver" -- cgit v1.2.3 From d41af627638a0e1e964d546e385b20650e769ce5 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 3 May 2012 15:58:12 +0200 Subject: pinctrl/nomadik: implement pin configuration This implements the pin configuration interface for the Nomadik pin controller. As part of the exercise we add a bit in the pin_cfg_t for the Nomadik pinctrl driver that indicates if the pin should be forced into GPIO mode. This is not done to go behind the back of the GPIO subsystem, but to ensure that default modes can be set by hogs on boot and system suspend/resume states. It was used implicitly by the old code defining all config settings and modes in a single config word but we now have a split between pinmux and pinconf leading to the need to have this. We also add a bit for explicitly setting sleepmode of the pin. This was previously handled by custom calls with the _sleep() suffix, but we now have one single interface into the configuration so we replace this with a bit indicating that the pin shall be configured into sleep mode. Some of the configuration can be refactored later to use less custom fields on the pin_cfg_t but we are currently leaving the old function calls in place so we stay compatible. ChangeLog v1->v2: - Drop a hunk changing pinmuxing for GPIO and move it over to the preceding pinmux patch. Acked-by: Stephen Warren Signed-off-by: Linus Walleij --- drivers/pinctrl/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/pinctrl/Kconfig') diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index bbf14dc67ad2..81b19671d193 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -40,6 +40,7 @@ config PINCTRL_NOMADIK bool "Nomadik pin controller driver" depends on ARCH_U8500 select PINMUX + select PINCONF config PINCTRL_DB8500 bool "DB8500 pin controller driver" -- cgit v1.2.3 From 0fa7be407dc101afe2d3dc99ded99de34c967a52 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 15 May 2012 11:24:34 +0000 Subject: ARM: nomadik: enable PINCTRL_NOMADIK where needed The nomadik gpio code has been converted to pinctrl, but the nomadik platform still expects the old code to be present. Change it to use the new one instead. Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij --- drivers/pinctrl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/pinctrl/Kconfig') diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index cc01c758bbfc..ce2e756b19ad 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -66,7 +66,7 @@ config PINCTRL_IMX28 config PINCTRL_NOMADIK bool "Nomadik pin controller driver" - depends on ARCH_U8500 + depends on ARCH_U8500 || ARCH_NOMADIK select PINMUX select PINCONF -- cgit v1.2.3