linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] Fix Nvidia BlueField-3 GPIO access
@ 2023-08-18 16:43 Asmaa Mnebhi
  2023-08-18 16:43 ` [PATCH v5 1/2] pinctrl: mlxbf3: Remove gpio_disable_free() Asmaa Mnebhi
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Asmaa Mnebhi @ 2023-08-18 16:43 UTC (permalink / raw)
  To: andy.shevchenko, linux-gpio, linus.walleij, bgolaszewski, brgl,
	linux-kernel
  Cc: Asmaa Mnebhi

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(-)

-- 
2.30.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-23 21:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 16:43 [PATCH v5 0/2] Fix Nvidia BlueField-3 GPIO access Asmaa Mnebhi
2023-08-18 16:43 ` [PATCH v5 1/2] pinctrl: mlxbf3: Remove gpio_disable_free() Asmaa Mnebhi
2023-08-18 16:43 ` [PATCH v5 2/2] gpio: mlxbf3: Support add_pin_ranges() Asmaa Mnebhi
2023-08-21 12:38   ` Bartosz Golaszewski
2023-08-21 12:55     ` Asmaa Mnebhi
2023-08-21 15:04       ` Bartosz Golaszewski
2023-08-23 21:37         ` Linus Walleij
2023-08-21  7:31 ` [PATCH v5 0/2] Fix Nvidia BlueField-3 GPIO access Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).