Skip to contentSkip to conversation

gpio: Drop long unused DB8500 GPIO driver

PATCH In review Stephan Gerhold 3 participants 6 messages Jul 2, 2021 – Jul 14, 2021 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gpio: Drop long unused DB8500 GPIO driver

The original U-Boot port for the ST-Ericsson U8500 SoC was dropped in commit 68282f55b846 ("arm: Remove unused ST-Ericsson u8500 arch"). Most of the drivers related to the old port were removed, but the db8500_gpio.c driver was forgotten for some reason. There is no way to select it and it does not compile anymore because of missing headers, so let's just remove it.

The new port for U8500 introduced in commit 689088f9dae8 ("arm: Add support for ST-Ericsson U8500 SoC") fully embraces the new Driver Model and device trees where possible, so this is preparation to add a new, simplified GPIO driver based on DM_GPIO.

---

 drivers/gpio/Makefile      |   1 -
 drivers/gpio/db8500_gpio.c | 221 -------------------------------------
 2 files changed, 222 deletions(-)
 delete mode 100644 drivers/gpio/db8500_gpio.c
drivers/gpio/Makefile +0 -1
index 8541ba0b0a..3da0d2eb33 100644
@@ -44,7 +44,6 @@ obj-$(CONFIG_MPC8XXX_GPIO)	+= mpc8xxx_gpio.o
 obj-$(CONFIG_MPC83XX_SPISEL_BOOT)	+= mpc83xx_spisel_boot.o
 obj-$(CONFIG_SH_GPIO_PFC)	+= sh_pfc.o
 obj-$(CONFIG_OMAP_GPIO)	+= omap_gpio.o
-obj-$(CONFIG_DB8500_GPIO)	+= db8500_gpio.o
 obj-$(CONFIG_BCM2835_GPIO)	+= bcm2835_gpio.o
 obj-$(CONFIG_XILINX_GPIO)	+= xilinx_gpio.o
 obj-$(CONFIG_ADI_GPIO2)	+= adi_gpio2.o
drivers/gpio/db8500_gpio.c deleted +0 -221

221 lines not on this page · raw message

Signature · 1 line
2.32.0
#1 lore raw

PATCH 2/2 gpio: Add driver for Nomadik GPIO

Nomadik GPIO is a fairly simple GPIO module used in the ST-Ericsson Ux500 SoCs (and some older Nomadik SoCs). It uses registers where each GPIO is represented as a single bit, plus "set" and "clear" registers that allow updating the state without having to read the existing state.

The driver implements support for it for use together with DM_GPIO and the existing ste-dbx5x0.dtsi device tree.

---

 drivers/gpio/Kconfig    |   8 +++
 drivers/gpio/Makefile   |   1 +
 drivers/gpio/nmk_gpio.c | 125 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 134 insertions(+)
 create mode 100644 drivers/gpio/nmk_gpio.c
drivers/gpio/Kconfig +8 -0
index de4dc51d4b..0817b12c5f 100644
@@ -495,4 +495,12 @@ config NX_GPIO
 	  The GPIOs for a device are defined in the device tree with one node
 	  for each bank.
 
+config NOMADIK_GPIO
+	bool "Nomadik GPIO driver"
+	depends on DM_GPIO
+	help
+	  Support GPIO access on ST-Ericsson Ux500 SoCs. The GPIOs are arranged
+	  into a number of banks each with 32 GPIOs. The GPIOs for a device are
+	  defined in the device tree with one node for each bank.
+
 endmenu
drivers/gpio/Makefile +1 -0
index 3da0d2eb33..3de9734724 100644
@@ -68,3 +68,4 @@ obj-$(CONFIG_MT7621_GPIO)	+= mt7621_gpio.o
 obj-$(CONFIG_MSCC_SGPIO)	+= mscc_sgpio.o
 obj-$(CONFIG_NX_GPIO)		+= nx_gpio.o
 obj-$(CONFIG_SIFIVE_GPIO)	+= sifive-gpio.o
+obj-$(CONFIG_NOMADIK_GPIO)	+= nmk_gpio.o
drivers/gpio/nmk_gpio.c new file +125 -0

125 lines not on this page · raw message

Signature · 1 line
2.32.0
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] gpio: Add driver for Nomadik GPIO

Quoted 11 lines · Stephan Gerhold

Nomadik GPIO is a fairly simple GPIO module used in the ST-Ericsson Ux500 SoCs (and some older Nomadik SoCs). It uses registers where each GPIO is represented as a single bit, plus "set" and "clear" registers that allow updating the state without having to read the existing state.

The driver implements support for it for use together with DM_GPIO and the existing ste-dbx5x0.dtsi device tree.

Yours,
Linus Walleij

#3 lore raw

Re: [PATCH 2/2] gpio: Add driver for Nomadik GPIO

In reply to Stephan Gerhold
Quoted 6 lines · Stephan Gerhold

Nomadik GPIO is a fairly simple GPIO module used in the ST-Ericsson Ux500 SoCs (and some older Nomadik SoCs). It uses registers where each GPIO is represented as a single bit, plus "set" and "clear" registers that allow updating the state without having to read the existing state.

Quoted 6 lines

The driver implements support for it for use together with DM_GPIO and the existing ste-dbx5x0.dtsi device tree.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
Reviewed-by on v1 1/2
#4 lore raw
In reply to Stephan Gerhold
Quoted 7 lines · Stephan Gerhold

The original U-Boot port for the ST-Ericsson U8500 SoC was dropped in commit 68282f55b846 ("arm: Remove unused ST-Ericsson u8500 arch"). Most of the drivers related to the old port were removed, but the db8500_gpio.c driver was forgotten for some reason. There is no way to select it and it does not compile anymore because of missing headers, so let's just remove it.

Quoted 6 lines

The new port for U8500 introduced in commit 689088f9dae8 ("arm: Add support for ST-Ericsson U8500 SoC") fully embraces the new Driver Model and device trees where possible, so this is preparation to add a new, simplified GPIO driver based on DM_GPIO.

Yours,
Linus Walleij

#5 lore raw
In reply to Stephan Gerhold
Quoted 7 lines · Stephan Gerhold

The original U-Boot port for the ST-Ericsson U8500 SoC was dropped in commit 68282f55b846 ("arm: Remove unused ST-Ericsson u8500 arch"). Most of the drivers related to the old port were removed, but the db8500_gpio.c driver was forgotten for some reason. There is no way to select it and it does not compile anymore because of missing headers, so let's just remove it.

Quoted 7 lines

The new port for U8500 introduced in commit 689088f9dae8 ("arm: Add support for ST-Ericsson U8500 SoC") fully embraces the new Driver Model and device trees where possible, so this is preparation to add a new, simplified GPIO driver based on DM_GPIO.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom