[PATCH v2 0/3] gpio: bcm-kona: Various GPIO fixups

Artur Weber posted 3 patches 10 months, 1 week ago
drivers/gpio/gpio-bcm-kona.c | 71 ++++++++++++++++++++++++++++++++++++--------
1 file changed, 58 insertions(+), 13 deletions(-)
[PATCH v2 0/3] gpio: bcm-kona: Various GPIO fixups
Posted by Artur Weber 10 months, 1 week ago
Fixes two issues that were preventing GPIO from working correctly:

- Lock/unlock functions tried to write the wrong bit to the unlock
  registers for GPIOs with numbers larger than 32

- GPIOs only initialized as IRQs did not unlock the configuration
  registers, causing IRQ-related configuration (e.g. setting the IRQ
  type) to fail.

Also includes a minor fix to add a missing newline to an error message.

Tested on a Samsung Galaxy Grand Neo (baffinlite rev02) with a BCM23550
(DTS not yet in mainline).

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
Changes in v2:
- Made the unlock count code cleaner by using increment/decrement
  operators (-- / ++)
- Added extra comment to relres function to match the one in reqres
- Link to v1: https://lore.kernel.org/r/20250130-kona-gpio-fixes-v1-0-dd61e0c0a9e7@gmail.com

---
Artur Weber (3):
      gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0
      gpio: bcm-kona: Make sure GPIO bits are unlocked when requesting IRQ
      gpio: bcm-kona: Add missing newline to dev_err format string

 drivers/gpio/gpio-bcm-kona.c | 71 ++++++++++++++++++++++++++++++++++++--------
 1 file changed, 58 insertions(+), 13 deletions(-)
---
base-commit: ffd294d346d185b70e28b1a28abe367bbfe53c04
change-id: 20250130-kona-gpio-fixes-6e74595e69f2

Best regards,
-- 
Artur Weber <aweber.kernel@gmail.com>
Re: [PATCH v2 0/3] gpio: bcm-kona: Various GPIO fixups
Posted by Bartosz Golaszewski 10 months, 1 week ago
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Thu, 06 Feb 2025 18:45:59 +0100, Artur Weber wrote:
> Fixes two issues that were preventing GPIO from working correctly:
> 
> - Lock/unlock functions tried to write the wrong bit to the unlock
>   registers for GPIOs with numbers larger than 32
> 
> - GPIOs only initialized as IRQs did not unlock the configuration
>   registers, causing IRQ-related configuration (e.g. setting the IRQ
>   type) to fail.
> 
> [...]

Applied, thanks!

[1/3] gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0
      commit: de1d0d160f64ee76df1d364d521b2faf465a091c
[2/3] gpio: bcm-kona: Make sure GPIO bits are unlocked when requesting IRQ
      commit: 57f5db77a915cc29461a679a6bcae7097967be1a
[3/3] gpio: bcm-kona: Add missing newline to dev_err format string
      commit: 615279db222c3ac56d5c93716efd72b843295c1f

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Re: [PATCH v2 0/3] gpio: bcm-kona: Various GPIO fixups
Posted by Linus Walleij 10 months, 1 week ago
On Thu, Feb 6, 2025 at 6:46 PM Artur Weber <aweber.kernel@gmail.com> wrote:

> Fixes two issues that were preventing GPIO from working correctly:
>
> - Lock/unlock functions tried to write the wrong bit to the unlock
>   registers for GPIOs with numbers larger than 32
>
> - GPIOs only initialized as IRQs did not unlock the configuration
>   registers, causing IRQ-related configuration (e.g. setting the IRQ
>   type) to fail.
>
> Also includes a minor fix to add a missing newline to an error message.
>
> Tested on a Samsung Galaxy Grand Neo (baffinlite rev02) with a BCM23550
> (DTS not yet in mainline).
>
> Signed-off-by: Artur Weber <aweber.kernel@gmail.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij