mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] gpio: bcm-kona: Various GPIO fixups
@ 2025-02-06 17:45 Artur Weber
  2025-02-06 17:46 ` [PATCH v2 1/3] gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0 Artur Weber
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Artur Weber @ 2025-02-06 17:45 UTC (permalink / raw)
  To: Ray Jui, Broadcom internal kernel review list, Linus Walleij,
	Bartosz Golaszewski, Florian Fainelli, Scott Branden,
	Markus Mayer
  Cc: linux-gpio, linux-kernel, ~postmarketos/upstreaming, Artur Weber

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>


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

end of thread, other threads:[~2025-02-11  8:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-06 17:45 [PATCH v2 0/3] gpio: bcm-kona: Various GPIO fixups Artur Weber
2025-02-06 17:46 ` [PATCH v2 1/3] gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0 Artur Weber
2025-02-06 17:46 ` [PATCH v2 2/3] gpio: bcm-kona: Make sure GPIO bits are unlocked when requesting IRQ Artur Weber
2025-02-06 17:46 ` [PATCH v2 3/3] gpio: bcm-kona: Add missing newline to dev_err format string Artur Weber
2025-02-06 18:13 ` [PATCH v2 0/3] gpio: bcm-kona: Various GPIO fixups Linus Walleij
2025-02-11  8:47 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®