Skip to content

Fix Nvidia BlueField-3 GPIO access

Asmaa Mnebhi linux-gpio lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 5 repliesIn review
  2. v42 patches 2 repliesSuperseded
  3. v32 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches4 repliesSuperseded
v12 patches1 replySuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2pinctrl: mlxbf3: Remove gpio_disable_free()drivers/pinctrl/pinctrl-mlxbf3.c+0 -140 replies
2/2gpio: mlxbf3: Support add_pin_ranges()drivers/gpio/gpio-mlxbf3.c+24 -04 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndy ShevchenkoLinus Walleij
SeriesR-b
1/2
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/2] Fix Nvidia BlueField-3 GPIO access

Fix Nvidia BlueField-3 GPIO access via libgpiod gpioset tool. gpioset tool fails to modify the GPIO value due to the following:
1) the pinctrl-mlxbf3 driver defines mlxbf3_gpio_request_enable() to enable software to take control over a gpio. Only then can the gpio-mlxbf3 driver modify the direction and value of the gpio. mlxbf3_gpio_disable_free() gives control back to hardware and is called when the "gpioset" command is invoked. This cancels out the effort to change the GPIO value and direction. So mlxbf3_gpio_disable_free() needs to be removed.
2) the gpio-mlxbf3 driver calls gpiochip_generic_request() which calls mlxbf3_gpio_request_enable(). "pin_ranges" needs not to be empty for mlxbf3_gpio_request_enable() to be invoked. So gpio-mlxbf3 needs to populate "pin_ranges".

Asmaa Mnebhi (2):
pinctrl: mlxbf3: Remove gpio_disable_free()
gpio: mlxbf3: Support add_pin_ranges()

 drivers/gpio/gpio-mlxbf3.c       | 24 ++++++++++++++++++++++++
 drivers/pinctrl/pinctrl-mlxbf3.c | 14 --------------
 2 files changed, 24 insertions(+), 14 deletions(-)
Signature · 1 line
2.30.1