gpio: mt7621: add OF_GPIO dependency
Subsystems (3)
PATCH 1/2 gpio: mt7621: add OF_GPIO dependency
Compile-testing the driver fails unless OF_GPIO is enabled:
drivers/gpio/gpio-mt7621.c: In function 'mediatek_gpio_bank_probe':drivers/gpio/gpio-mt7621.c:228:10: error: 'struct gpio_chip' has no member named 'of_node'
--- drivers/gpio/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpio/Kconfig +1 -0
@@ -362,6 +362,7 @@ config GPIO_MPC8XXX config GPIO_MT7621 bool "Mediatek MT7621 GPIO Support" depends on SOC_MT7620 || SOC_MT7621 || COMPILE_TEST + depends on OF_GPIO select GPIO_GENERIC select GPIOLIB_IRQCHIP help
Signature · 1 line
2.9.0
PATCH 2/2 staging: mt7621-gpio: remove driver
The gpio-mt7621 driver has graduated out of staging and got accepted into the gpio tree. Since they both use the same Kconfig symbol, we could run into conflicts, e.g. I got this failure when the staging driver got enabled with the other one being unavailable but using the same Kconfig symbol:
drivers/gpio/gpio-mt7621.c: In function 'mediatek_gpio_bank_probe':drivers/gpio/gpio-mt7621.c:228:10: error: 'struct gpio_chip' has no member named 'of_node'
rg->chip.of_node = node;
^
drivers/gpio/gpio-mt7621.c:243:10: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
rg->chip.of_gpio_n_cells = 2;
^drivers/gpio/gpio-mt7621.c:244:10: error: 'struct gpio_chip' has no member named 'of_xlate'
rg->chip.of_xlate = mediatek_gpio_xlate;
It would be trivial to rename the Kconfig symbol to avoid that problem, but there is also seems to be little value in keeping the staging driver around now.
--- drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/mt7621-gpio/Kconfig | 8 - drivers/staging/mt7621-gpio/Makefile | 3 - drivers/staging/mt7621-gpio/TODO | 3 - drivers/staging/mt7621-gpio/gpio-mt7621.c | 331 --------------------- .../staging/mt7621-gpio/mediatek,mt7621-gpio.txt | 35 --- 7 files changed, 383 deletions(-) delete mode 100644 drivers/staging/mt7621-gpio/Kconfig delete mode 100644 drivers/staging/mt7621-gpio/Makefile delete mode 100644 drivers/staging/mt7621-gpio/TODO delete mode 100644 drivers/staging/mt7621-gpio/gpio-mt7621.c delete mode 100644 drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt
drivers/staging/Kconfig +0 -2
@@ -110,8 +110,6 @@ source "drivers/staging/pi433/Kconfig" source "drivers/staging/mt7621-pinctrl/Kconfig" -source "drivers/staging/mt7621-gpio/Kconfig" - source "drivers/staging/mt7621-spi/Kconfig" source "drivers/staging/mt7621-dma/Kconfig"
drivers/staging/Makefile +0 -1
@@ -46,7 +46,6 @@ obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/ obj-$(CONFIG_PI433) += pi433/ obj-$(CONFIG_SOC_MT7621) += mt7621-pci/ obj-$(CONFIG_SOC_MT7621) += mt7621-pinctrl/ -obj-$(CONFIG_SOC_MT7621) += mt7621-gpio/ obj-$(CONFIG_SOC_MT7621) += mt7621-spi/ obj-$(CONFIG_SOC_MT7621) += mt7621-dma/ obj-$(CONFIG_SOC_MT7621) += mt7621-mmc/
drivers/staging/mt7621-gpio/Kconfig deleted +0 -8
@@ -1,8 +0,0 @@ -config GPIO_MT7621 - bool "Mediatek MT7621 GPIO Support" - depends on SOC_MT7620 || SOC_MT7621 || COMPILE_TEST - select GPIO_GENERIC - select GPIOLIB_IRQCHIP - select ARCH_REQUIRE_GPIOLIB - help - Say yes here to support the Mediatek MT7621 SoC GPIO device
drivers/staging/mt7621-gpio/Makefile deleted +0 -3
@@ -1,3 +0,0 @@ -obj-$(CONFIG_GPIO_MT7621) += gpio-mt7621.o - -ccflags-y += -I$(srctree)/$(src)/include
drivers/staging/mt7621-gpio/TODO deleted +0 -3
@@ -1,3 +0,0 @@ -- general code review and clean up - -Cc: NeilBrown <[email protected]>
drivers/staging/mt7621-gpio/gpio-mt7621.c deleted +0 -331
331 lines not on this page · raw message
drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt deleted +0 -35
@@ -1,35 +0,0 @@ -Mediatek MT7621 SoC GPIO controller bindings - -The IP core used inside these SoCs has 3 banks of 32 GPIOs each. -The registers of all the banks are interwoven inside one single IO range. -We load one GPIO controller instance per bank. Also the GPIO controller can receive -interrupts on any of the GPIOs, either edge or level. It then interrupts the CPU -using GIC INT12. - -Required properties for the top level node: -- #gpio-cells : Should be two. The first cell is the GPIO pin number and the - second cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. - Only the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. -- #interrupt-cells : Specifies the number of cells needed to encode an - interrupt. Should be 2. The first cell defines the interrupt number, - the second encodes the triger flags encoded as described in - Documentation/devicetree/bindings/interrupt-controller/interrupts.txt -- compatible: - - "mediatek,mt7621-gpio" for Mediatek controllers -- reg : Physical base address and length of the controller's registers -- interrupt-parent : phandle of the parent interrupt controller. -- interrupts : Interrupt specifier for the controllers interrupt. -- interrupt-controller : Mark the device node as an interrupt controller. -- gpio-controller : Marks the device node as a GPIO controller. - -Example: - gpio at 600 { - #gpio-cells = <2>; - #interrupt-cells = <2>; - compatible = "mediatek,mt7621-gpio"; - gpio-controller; - interrupt-controller; - reg = <0x600 0x100>; - interrupt-parent = <&gic>; - interrupts = <GIC_SHARED 12 IRQ_TYPE_LEVEL_HIGH>; - };
Signature · 1 line
2.9.0
Greg Kroah-Hartman
maintainerRe: [PATCH 2/2] staging: mt7621-gpio: remove driver
Quoted 16 lines · Arnd Bergmann
The gpio-mt7621 driver has graduated out of staging and got accepted into the gpio tree. Since they both use the same
Kconfigsymbol, we could run into conflicts, e.g. I got this failure when the staging driver got enabled with the other one being unavailable but using the sameKconfigsymbol:
drivers/gpio/gpio-mt7621.c: In function 'mediatek_gpio_bank_probe':drivers/gpio/gpio-mt7621.c:228:10: error: 'structgpio_chip' has no member named 'of_node'rg->chip.of_node = node; ^ drivers/gpio/gpio-mt7621.c:243:10: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells' rg->chip.of_gpio_n_cells = 2; ^
drivers/gpio/gpio-mt7621.c:244:10: error: 'structgpio_chip' has no member named 'of_xlate'
rg->chip.of_xlate=mediatek_gpio_xlate;
Quoted 6 lines
It would be trivial to rename the
Kconfigsymbol to avoid that problem, but there is also seems to be little value in keeping the staging driver around now.Fixes 4ba9c3afda41 ("gpio: mt7621: Add a driver for MT7621")Signed-off-by Arnd Bergmann <[email protected]>
This is already removed in my staging-next tree and will be in the next linux-next.
thanks,
greg k-h
Quoted 7 lines · Arnd Bergmann
Compile-testing the driver fails unless
OF_GPIOis enabled:
drivers/gpio/gpio-mt7621.c: In function 'mediatek_gpio_bank_probe':drivers/gpio/gpio-mt7621.c:228:10: error: 'structgpio_chip' has no member named 'of_node'Fixes 4ba9c3afda41 ("gpio: mt7621: Add a driver for MT7621")Signed-off-by Arnd Bergmann <[email protected]>
Patch applied. Sorry for taking some days.
Yours,
Linus Walleij