* [PATCH 00/12] pinctrl for Ux500 and Nomadik family @ 2012-05-08 9:43 Linus Walleij 2012-05-15 11:24 ` Arnd Bergmann 0 siblings, 1 reply; 6+ messages in thread From: Linus Walleij @ 2012-05-08 9:43 UTC (permalink / raw) To: linux-kernel, linux-arm-kernel Cc: Stephen Warren, Shawn Guo, Thomas Abraham, Dong Aisheng, Rajendra Nayak, Haojian Zhuang, Linus Walleij From: Linus Walleij <linus.walleij@linaro.org> This moves the Nomadik "GPIO" driver to the pinctrl subsystem and adds the interfaces needed to provide a pinctrl driver for the DB8500 ASIC. It further switches Ux500 over to using it with a combination of hogs and runtime controls. The ux500 portions were developed on top of the gpio and pins branch earlier sent for integration in the ARM SoC tree. Linus Walleij (12): gpio: move the Nomadik GPIO driver to pinctrl pinctrl: basic Nomadik pinctrl interface pinctrl/nomadik: break out single GPIO debug function pinctrl/nomadik: reuse GPIO debug function for pins pinctrl/nomadik: implement pin multiplexing pinctrl/nomadik: implement pin configuration pinctrl: add sleep state definition ARM: ux500: switch over to Nomadik pinctrl driver ARM: ux500: delete custom pin control system ARM: ux500: switch to using pinctrl for uart0 ARM: ux500: alter MSP registration to return a device pointer ARM: ux500: switch MSP to using pinctrl for pins arch/arm/mach-ux500/Kconfig | 3 + arch/arm/mach-ux500/board-mop500-msp.c | 85 +- arch/arm/mach-ux500/board-mop500-pins.c | 855 ++++++------- arch/arm/mach-ux500/board-mop500.c | 83 +- arch/arm/mach-ux500/board-mop500.h | 6 +- arch/arm/mach-ux500/cpu-db8500.c | 1 + arch/arm/mach-ux500/devices-common.h | 12 + arch/arm/mach-ux500/pins.c | 88 -- arch/arm/mach-ux500/pins.h | 46 - arch/arm/plat-nomadik/include/plat/pincfg.h | 13 + drivers/gpio/Makefile | 1 - drivers/gpio/gpio-nomadik.c | 1306 ------------------- drivers/pinctrl/Kconfig | 10 + drivers/pinctrl/Makefile | 2 + drivers/pinctrl/pinctrl-nomadik-db8500.c | 857 +++++++++++++ drivers/pinctrl/pinctrl-nomadik.c | 1800 +++++++++++++++++++++++++++ drivers/pinctrl/pinctrl-nomadik.h | 77 ++ include/linux/pinctrl/pinctrl-state.h | 13 + 18 files changed, 3326 insertions(+), 1932 deletions(-) delete mode 100644 arch/arm/mach-ux500/pins.c delete mode 100644 arch/arm/mach-ux500/pins.h delete mode 100644 drivers/gpio/gpio-nomadik.c create mode 100644 drivers/pinctrl/pinctrl-nomadik-db8500.c create mode 100644 drivers/pinctrl/pinctrl-nomadik.c create mode 100644 drivers/pinctrl/pinctrl-nomadik.h -- 1.7.9.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 00/12] pinctrl for Ux500 and Nomadik family 2012-05-08 9:43 [PATCH 00/12] pinctrl for Ux500 and Nomadik family Linus Walleij @ 2012-05-15 11:24 ` Arnd Bergmann 2012-05-15 12:26 ` Linus Walleij 0 siblings, 1 reply; 6+ messages in thread From: Arnd Bergmann @ 2012-05-15 11:24 UTC (permalink / raw) To: linux-arm-kernel Cc: Linus Walleij, linux-kernel, Stephen Warren, Linus Walleij, Haojian Zhuang, Thomas Abraham, Rajendra Nayak, Dong Aisheng, Shawn Guo On Tuesday 08 May 2012, Linus Walleij wrote: > From: Linus Walleij <linus.walleij@linaro.org> > > This moves the Nomadik "GPIO" driver to the pinctrl subsystem > and adds the interfaces needed to provide a pinctrl driver for > the DB8500 ASIC. > > It further switches Ux500 over to using it with a combination > of hogs and runtime controls. > > The ux500 portions were developed on top of the gpio and pins > branch earlier sent for integration in the ARM SoC tree. I get build errors with nhk8815_defconfig after this: arch/arm/mach-nomadik/built-in.o: In function `nhk8815_eth_init': /home/arnd/linux-arm/arch/arm/mach-nomadik/board-nhk8815.c:224: undefined reference to `nmk_gpio_set_mode' arch/arm/mach-nomadik/built-in.o: In function `nhk8815_i2c_init': /home/arnd/linux-arm/arch/arm/mach-nomadik/i2c-8815nhk.c:46: undefined reference to `nmk_gpio_set_mode' /home/arnd/linux-arm/arch/arm/mach-nomadik/i2c-8815nhk.c:47: undefined reference to `nmk_gpio_set_mode' /home/arnd/linux-arm/arch/arm/mach-nomadik/i2c-8815nhk.c:50: undefined reference to `nmk_gpio_set_mode' /home/arnd/linux-arm/arch/arm/mach-nomadik/i2c-8815nhk.c:51: undefined reference to `nmk_gpio_set_mode' Here is my suggested fix: 8<----- 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 <arnd@arndb.de> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5eae559..ce9d88a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -929,6 +929,7 @@ config ARCH_NOMADIK select CPU_ARM926T select CLKDEV_LOOKUP select GENERIC_CLOCKEVENTS + select PINCTRL select MIGHT_HAVE_CACHE_L2X0 select ARCH_REQUIRE_GPIOLIB help diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig index 37207d1..bf123c5 100644 --- a/arch/arm/configs/nhk8815_defconfig +++ b/arch/arm/configs/nhk8815_defconfig @@ -97,6 +97,7 @@ CONFIG_I2C=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_GPIO=y CONFIG_DEBUG_GPIO=y +CONFIG_PINCTRL_NOMADIK=y # CONFIG_HWMON is not set # CONFIG_VGA_CONSOLE is not set CONFIG_RTC_CLASS=y diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig index 3c5e0f5..365879b 100644 --- a/arch/arm/mach-nomadik/Kconfig +++ b/arch/arm/mach-nomadik/Kconfig @@ -15,6 +15,7 @@ config NOMADIK_8815 config I2C_BITBANG_8815NHK tristate "Driver for bit-bang busses found on the 8815 NHK" depends on I2C && MACH_NOMADIK_8815NHK + depends on PINCTRL_NOMADIK select I2C_ALGOBIT default y diff --git a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h index 3e8b7f1..826de74 100644 --- a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h +++ b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h @@ -62,7 +62,14 @@ enum nmk_gpio_slpm { extern int nmk_gpio_set_slpm(int gpio, enum nmk_gpio_slpm mode); extern int nmk_gpio_set_pull(int gpio, enum nmk_gpio_pull pull); +#ifdef CONFIG_PINCTRL_NOMADIK extern int nmk_gpio_set_mode(int gpio, int gpio_mode); +#else +static inline int nmk_gpio_set_mode(int gpio, int gpio_mode) +{ + return -ENODEV; +} +#endif extern int nmk_gpio_get_mode(int gpio); extern void nmk_gpio_wakeups_suspend(void); diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 848097e..3755c1d 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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 00/12] pinctrl for Ux500 and Nomadik family 2012-05-15 11:24 ` Arnd Bergmann @ 2012-05-15 12:26 ` Linus Walleij 2012-05-15 12:46 ` Arnd Bergmann 0 siblings, 1 reply; 6+ messages in thread From: Linus Walleij @ 2012-05-15 12:26 UTC (permalink / raw) To: Arnd Bergmann Cc: linux-arm-kernel, Linus Walleij, linux-kernel, Stephen Warren, Haojian Zhuang, Thomas Abraham, Rajendra Nayak, Dong Aisheng, Shawn Guo On Tue, May 15, 2012 at 1:24 PM, Arnd Bergmann <arnd@arndb.de> wrote: > I get build errors with nhk8815_defconfig after this: > > arch/arm/mach-nomadik/built-in.o: In function `nhk8815_eth_init': > /home/arnd/linux-arm/arch/arm/mach-nomadik/board-nhk8815.c:224: undefined reference to `nmk_gpio_set_mode' > arch/arm/mach-nomadik/built-in.o: In function `nhk8815_i2c_init': > /home/arnd/linux-arm/arch/arm/mach-nomadik/i2c-8815nhk.c:46: undefined reference to `nmk_gpio_set_mode' > /home/arnd/linux-arm/arch/arm/mach-nomadik/i2c-8815nhk.c:47: undefined reference to `nmk_gpio_set_mode' > /home/arnd/linux-arm/arch/arm/mach-nomadik/i2c-8815nhk.c:50: undefined reference to `nmk_gpio_set_mode' > /home/arnd/linux-arm/arch/arm/mach-nomadik/i2c-8815nhk.c:51: undefined reference to `nmk_gpio_set_mode' > > Here is my suggested fix: This looks perfect Arnd, thanks for fixing this! Reviewed-by: Linus Walleij <linus.walleij@linaro.org> I plan to migrate also the Nomadik to pinctrl and delete the old open-coded interfaces in the driver for the next kernel cycle. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 00/12] pinctrl for Ux500 and Nomadik family 2012-05-15 12:26 ` Linus Walleij @ 2012-05-15 12:46 ` Arnd Bergmann 2012-05-15 13:16 ` Linus Walleij 0 siblings, 1 reply; 6+ messages in thread From: Arnd Bergmann @ 2012-05-15 12:46 UTC (permalink / raw) To: Linus Walleij Cc: linux-arm-kernel, Linus Walleij, linux-kernel, Stephen Warren, Haojian Zhuang, Thomas Abraham, Rajendra Nayak, Dong Aisheng, Shawn Guo, Olof Johansson On Tuesday 15 May 2012, Linus Walleij wrote: > On Tue, May 15, 2012 at 1:24 PM, Arnd Bergmann <arnd@arndb.de> wrote: > > > I get build errors with nhk8815_defconfig after this: > > > > arch/arm/mach-nomadik/built-in.o: In function `nhk8815_eth_init': > > /home/arnd/linux-arm/arch/arm/mach-nomadik/board-nhk8815.c:224: undefined reference to `nmk_gpio_set_mode' > > arch/arm/mach-nomadik/built-in.o: In function `nhk8815_i2c_init': > > /home/arnd/linux-arm/arch/arm/mach-nomadik/i2c-8815nhk.c:46: undefined reference to `nmk_gpio_set_mode' > > /home/arnd/linux-arm/arch/arm/mach-nomadik/i2c-8815nhk.c:47: undefined reference to `nmk_gpio_set_mode' > > /home/arnd/linux-arm/arch/arm/mach-nomadik/i2c-8815nhk.c:50: undefined reference to `nmk_gpio_set_mode' > > /home/arnd/linux-arm/arch/arm/mach-nomadik/i2c-8815nhk.c:51: undefined reference to `nmk_gpio_set_mode' > > > > Here is my suggested fix: > > This looks perfect Arnd, thanks for fixing this! > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Ok, applied to next/pinctrl. On a more general note, how shall we go about merging pinctrl stuff in the upcoming merge window? We've got a bunch of changes in arm-soc now that depend on your pinctrl/devel branch, and I want to get as many of my own patches merged upstream early. One option would be that you just try to be very early with sending your branch and arm-soc goes directly after that, another option would be that we send a pull request for your tree along with the stuff that depends on it, with your permission. > I plan to migrate also the Nomadik to pinctrl and delete the old open-coded > interfaces in the driver for the next kernel cycle. Sounds good. Arnd ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 00/12] pinctrl for Ux500 and Nomadik family 2012-05-15 12:46 ` Arnd Bergmann @ 2012-05-15 13:16 ` Linus Walleij 2012-05-15 14:13 ` Arnd Bergmann 0 siblings, 1 reply; 6+ messages in thread From: Linus Walleij @ 2012-05-15 13:16 UTC (permalink / raw) To: Arnd Bergmann Cc: linux-arm-kernel, Linus Walleij, linux-kernel, Stephen Warren, Haojian Zhuang, Thomas Abraham, Rajendra Nayak, Dong Aisheng, Shawn Guo, Olof Johansson On Tue, May 15, 2012 at 2:46 PM, Arnd Bergmann <arnd@arndb.de> wrote: > One option would be that you just try to be very early with sending your > branch and arm-soc goes directly after that, another option would be that > we send a pull request for your tree along with the stuff that depends on > it, with your permission. Either way is fine with me, I was planning to send a pull request as soon as the merge window opens anyway. If you need it, I can lock down the pinctrl tree and prepare the pull tag. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 00/12] pinctrl for Ux500 and Nomadik family 2012-05-15 13:16 ` Linus Walleij @ 2012-05-15 14:13 ` Arnd Bergmann 0 siblings, 0 replies; 6+ messages in thread From: Arnd Bergmann @ 2012-05-15 14:13 UTC (permalink / raw) To: Linus Walleij Cc: linux-arm-kernel, Linus Walleij, linux-kernel, Stephen Warren, Haojian Zhuang, Thomas Abraham, Rajendra Nayak, Dong Aisheng, Shawn Guo, Olof Johansson On Tuesday 15 May 2012, Linus Walleij wrote: > On Tue, May 15, 2012 at 2:46 PM, Arnd Bergmann <arnd@arndb.de> wrote: > > > One option would be that you just try to be very early with sending your > > branch and arm-soc goes directly after that, another option would be that > > we send a pull request for your tree along with the stuff that depends on > > it, with your permission. > > Either way is fine with me, I was planning to send a pull request as soon > as the merge window opens anyway. If you need it, I can lock down the > pinctrl tree and prepare the pull tag. Ok, that's good then. I guess we can just wait until your pull request is out and put a note in the ones from arm-soc that depend on it. Arnd ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-05-15 14:13 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-08 9:43 [PATCH 00/12] pinctrl for Ux500 and Nomadik family Linus Walleij 2012-05-15 11:24 ` Arnd Bergmann 2012-05-15 12:26 ` Linus Walleij 2012-05-15 12:46 ` Arnd Bergmann 2012-05-15 13:16 ` Linus Walleij 2012-05-15 14:13 ` Arnd Bergmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox