drivers/gpio/gpio-bcm-kona.c | 73 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 13 deletions(-)
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>
---
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 | 73 ++++++++++++++++++++++++++++++++++++--------
1 file changed, 60 insertions(+), 13 deletions(-)
---
base-commit: ffd294d346d185b70e28b1a28abe367bbfe53c04
change-id: 20250130-kona-gpio-fixes-6e74595e69f2
Best regards,
--
Artur Weber <aweber.kernel@gmail.com>
Hi Artur, On Thu, Jan 30, 2025 at 6:10 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> Looks good to me, do you want to resend the patches picking up the Acks or do you want me to apply as-is? Should this go in as urgent fixes (-rcN) or as nonurgent? The DTS not being mainline suggests nonurgent but are there other systems suffering? Yours, Linus Walleij
On 6.02.2025 10:34, Linus Walleij wrote: > Hi Artur, > > On Thu, Jan 30, 2025 at 6:10 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> > > Looks good to me, do you want to resend the patches picking up the > Acks or do you want me to apply as-is? I'll send a v2 in a second with the style fixes suggested by Markus[1]. After that, it should be good to go. > Should this go in as urgent fixes (-rcN) or as nonurgent? > > The DTS not being mainline suggests nonurgent but are there > other systems suffering? Non-urgent is fine. AFAICT the only upstream-supported Broadcom Kona devices at the moment are old Broadcom dev boards; while they technically are also affected by the bug, I doubt anyone's actively using them. As for the devices I'm testing with, there's still quite a few fixups I plan to make before I consider them ready to upstream. Best regards Artur [1] https://lore.kernel.org/lkml/CAGt4E5sqd_Aojk+boD5K5EiRfOsiU+jYY5EV0DP6TFut291HnQ@mail.gmail.com/
On 6.02.2025 16:37, Artur Weber wrote: > On 6.02.2025 10:34, Linus Walleij wrote: >> Hi Artur, >> >> On Thu, Jan 30, 2025 at 6:10 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> >> >> Looks good to me, do you want to resend the patches picking up the >> Acks or do you want me to apply as-is? > > I'll send a v2 in a second with the style fixes suggested by Markus[1]. > After that, it should be good to go. > >> Should this go in as urgent fixes (-rcN) or as nonurgent? >> >> The DTS not being mainline suggests nonurgent but are there >> other systems suffering? > > Non-urgent is fine. AFAICT the only upstream-supported Broadcom Kona > devices at the moment are old Broadcom dev boards; while they > technically are also affected by the bug, I doubt anyone's actively > using them. As for the devices I'm testing with, there's still quite > a few fixups I plan to make before I consider them ready to upstream. > > Best regards > Artur > > [1] https://lore.kernel.org/lkml/ > CAGt4E5sqd_Aojk+boD5K5EiRfOsiU+jYY5EV0DP6TFut291HnQ@mail.gmail.com/ v2 sent: https://lore.kernel.org/lkml/20250206-kona-gpio-fixes-v2-0-409135eab780@gmail.com/T/#t Best regards Artur
On Thu, Feb 6, 2025 at 10:34 AM Linus Walleij <linus.walleij@linaro.org> wrote: > On Thu, Jan 30, 2025 at 6:10 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> > > Looks good to me, do you want to resend the patches picking up the > Acks or do you want me to apply as-is? Actually it's Bartosz applying, heh confused this for pinctrl. But most comments go anyway I think. Yours, Linus Walleij
© 2016 - 2026 Red Hat, Inc.