|
|
Subscribe / Log in / New account

Support Nvidia BlueField-3 GPIO driver and pin controller

From:  Asmaa Mnebhi <asmaa-AT-nvidia.com>
To:  <andy.shevchenko-AT-gmail.com>, <linus.walleij-AT-linaro.org>, <bgolaszewski-AT-baylibre.com>, <linux-gpio-AT-vger.kernel.org>, <linux-kernel-AT-vger.kernel.org>, <linux-acpi-AT-vger.kernel.org>
Subject:  [PATCH v4 0/2] Support Nvidia BlueField-3 GPIO driver and pin controller
Date:  Fri, 17 Feb 2023 16:26:49 -0500
Message-ID:  <cover.1676668853.git.asmaa@nvidia.com>
Cc:  Asmaa Mnebhi <asmaa-AT-nvidia.com>
Archive-link:  Article

Support the BlueField-3 SoC GPIO driver for handling interrupts and
providing the option to change the direction and value of a GPIO.
Support the BlueField-3 SoC pin controller driver for allowing a
select number of GPIO pins to be manipulated from userspace or
the kernel.

The gpio-mlxbf3.c driver handles hardware registers and logic
that are different from gpio-mlxbf.c and gpio-mlxbf2.c.
For that reason, we have separate drivers for each generation.

Changes from v3->v4:
gpio-mlxbf3.c:
- Update the Kconfig file so that it is conform with checkpatch
- Remove unncessary headers and add missing header inclusions
- Make irq_chip struct static and const
- Replace generic_handle_irq(irq_find_mapping) with
  generic_handle_domain_irq
- Simplify logic in irq_set_type
- Replace valid_mask with gpio-reserved-ranges
- Cleanup code

pinctrl-mlxbf.c:
- Cleanup code
- Update the Kconfig file so that it is conform with checkpatch
- Remove unncessary headers and add missing header inclusions

Asmaa Mnebhi (2):
  gpio: gpio-mlxbf3: Add gpio driver support
  pinctrl: pinctrl-mlxbf: Add pinctrl driver support

 drivers/gpio/Kconfig            |  12 ++
 drivers/gpio/Makefile           |   1 +
 drivers/gpio/gpio-mlxbf3.c      | 230 ++++++++++++++++++++++
 drivers/pinctrl/Kconfig         |  14 ++
 drivers/pinctrl/Makefile        |   1 +
 drivers/pinctrl/pinctrl-mlxbf.c | 338 ++++++++++++++++++++++++++++++++
 6 files changed, 596 insertions(+)
 create mode 100644 drivers/gpio/gpio-mlxbf3.c
 create mode 100644 drivers/pinctrl/pinctrl-mlxbf.c

-- 
2.30.1



Copyright © 2023, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds