gpio: add driver for Mellanox BlueField GPIO controller
v4 cover gpio: add driver for Mellanox BlueField GPIO controller
Changes since v3
- the naming scheme has been fixed to remove double underscores and use
standard variable names
- the locking has been updated to protect the entire read/modify
operations.
Regarding the suggested use of the generic MMIO library, I noticed that bgpio_init only allows for either dirin or dirout to be set, never both. But since our controller has 2 separate registers, using bgpio_init might not be possible here.
Shravan Kumar Ramani (1):
gpio: add driver for Mellanox BlueField GPIO controller
drivers/gpio/Kconfig | 6 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-mlxbf.c | 222 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 229 insertions(+) create mode 100644 drivers/gpio/gpio-mlxbf.c
Signature · 1 line
2.1.2
PATCH v4 1/1 gpio: add driver for Mellanox BlueField GPIO controller
This patch adds support for the GPIO controller used by Mellanox BlueField SOCs.
--- drivers/gpio/Kconfig | 6 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-mlxbf.c | 222 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 229 insertions(+) create mode 100644 drivers/gpio/gpio-mlxbf.c
drivers/gpio/Kconfig +6 -0
@@ -1292,6 +1292,12 @@ config GPIO_MERRIFIELD help Say Y here to support Intel Merrifield GPIO. +config GPIO_MLXBF + tristate "Mellanox BlueField SoC GPIO" + depends on (MELLANOX_PLATFORM && ARM64 && ACPI) || COMPILE_TEST + help + Say Y here if you want GPIO support on Mellanox BlueField SoC. + config GPIO_ML_IOH tristate "OKI SEMICONDUCTOR ML7213 IOH GPIO support" depends on X86 || COMPILE_TEST
drivers/gpio/Makefile +1 -0
@@ -83,6 +83,7 @@ obj-$(CONFIG_GPIO_MENZ127) += gpio-menz127.o obj-$(CONFIG_GPIO_MERRIFIELD) += gpio-merrifield.o obj-$(CONFIG_GPIO_MC33880) += gpio-mc33880.o obj-$(CONFIG_GPIO_MC9S08DZ60) += gpio-mc9s08dz60.o +obj-$(CONFIG_GPIO_MLXBF) += gpio-mlxbf.o obj-$(CONFIG_GPIO_ML_IOH) += gpio-ml-ioh.o obj-$(CONFIG_GPIO_MM_LANTIQ) += gpio-mm-lantiq.o obj-$(CONFIG_GPIO_MOCKUP) += gpio-mockup.o
drivers/gpio/gpio-mlxbf.c new file +222 -0
222 lines not on this page · raw message
Signature · 1 line
2.1.2
Quoted 4 lines · Shravan Kumar Ramani
Regarding the suggested use of the generic MMIO library, I noticed that
bgpio_initonly allows for either dirin or dirout to be set, never both. But since our controller has 2 separate registers, usingbgpio_initmight not be possible here.
OK let's just fix that instead of working around it, I will send a patch.
Yours,
Linus Walleij