mbox series

[v3,0/2] gpio-mmio: Extend to handle pinctrl back-ends

Message ID 20250219-vf610-mmio-v3-0-588b64f0b689@linaro.org (mailing list archive)
Headers show
Series gpio-mmio: Extend to handle pinctrl back-ends | expand

Message

Linus Walleij Feb. 19, 2025, 9:04 p.m. UTC
If we're using gpio-mmio with a pinctrl backend the
direction callbacks need to finalize their work by
calling into the pin control back-end.

As I was made aware that the vf610 driver was missing
only that to use gpio-mmio instead of custom code,
I took a stab at it.

This patch is made on top of Johan Korsnes bug fix (v3),
so it needs to be applied after that is in, if this
works.

Plese try it out on vf610!

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Changes in v3:
- Use the port->gpio_base for accessing GPIO registers.
- Specify only GPOR for setting/clearing/reading the
  output, hoping a RMW on that register works with MMIO.
- Rebased on the applied v3 version of Johan's fix patch.
- Link to v2: https://lore.kernel.org/r/20250215-vf610-mmio-v2-0-4a91f8c8e8d5@linaro.org

Changes in v2:
- Use the dual input/output set/clear registers for output.
- Provide the BGPIOF_READ_OUTPUT_REG_SET flag so the driver
  behaves as described in the commit message...
- Drop the now unused spinlock (gpio-mmio has its own).
- Fix a speling mistake.
- Link to v1: https://lore.kernel.org/r/20250214-vf610-mmio-v1-0-6cccd0292e84@linaro.org

---
Linus Walleij (2):
      gpio: mmio: Add flag for calling pinctrl back-end
      gpio: vf610: Switch to gpio-mmio

 drivers/gpio/Kconfig        |   1 +
 drivers/gpio/gpio-mmio.c    |  36 +++++++++++----
 drivers/gpio/gpio-vf610.c   | 105 +++++++-------------------------------------
 include/linux/gpio/driver.h |   3 ++
 4 files changed, 49 insertions(+), 96 deletions(-)
---
base-commit: f751bf0670cbb166c58e99d57373765405178426
change-id: 20250213-vf610-mmio-eddfaeb6b197

Best regards,

Comments

Bartosz Golaszewski Feb. 24, 2025, 7:50 p.m. UTC | #1
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Wed, 19 Feb 2025 22:04:32 +0100, Linus Walleij wrote:
> If we're using gpio-mmio with a pinctrl backend the
> direction callbacks need to finalize their work by
> calling into the pin control back-end.
> 
> As I was made aware that the vf610 driver was missing
> only that to use gpio-mmio instead of custom code,
> I took a stab at it.
> 
> [...]

Applied, thanks!

[1/2] gpio: mmio: Add flag for calling pinctrl back-end
      commit: 2145ba374069ee8edc9d29c2a6b56fe4a28a6e2d
[2/2] gpio: vf610: Switch to gpio-mmio
      commit: da5dd31efd2465ccc9a70a85bdc325e394256689

Best regards,