Re: [PATCH v2] gpio: mt7621: fix interrupt banks mapping on gpio chips

From: Bartosz Golaszewski

Date: Mon Jun 08 2026 - 12:13:30 EST


On Mon, 8 Jun 2026 16:27:35 +0200, Sergio Paracuellos
<sergio.paracuellos@xxxxxxxxx> said:
> On Mon, Jun 8, 2026 at 4:02 PM Bartosz Golaszewski <brgl@xxxxxxxxxx> wrote:
> >>
>> >> Hi!
>> >>
>> >> Can you look at the sashiko review? Especially the bit about tracking the
>> >> GPIOD_FLAG_IRQ_IS_ENABLED flag looks correct.
>> >
>> > I got rid of those two calls (gpiochip_enable_irq() and
>> > gpiochip_disable_irq()) because the driver "gpio-brcmstb" which is the
>> > one I based my changes on was not used them at all. We have not found
>> > anything weird related with that on testing. I do believe that since
>> > we are using our own callbacks for 'irq_request_resources()' and
>> > 'irq_release_resources()' we are safe here. Regarding the others I am
>> > not sure, but the introduction of the remove stuff for the irq domain
>> > is because there are no devm_* functions for that. Other resources in
>> > driver are using devm versions so I think the changes are ok as they
>> > are...
>> >
>>
>> It's about GPIO core: a GPIO that appears as "free" (users can request it) but
>> was earlier enabled for interrupts cannot be requested in output mode - only
>> input works. Without this flag set, gpiod_direction_output_nonotify() will allow
>> you to set direction to output.
>
> I see. I need Vicente to re-test without removing
> gpiochip_enable_irq() and gpiochip_disable_irq() to see if everything
> is still ok.
>
> Vicente, would you mind to test the following change on top of this v2 PATCH?

Thanks, sorry for the late notice but I was travelling last week. If this
misses v7.1, it will go in during the merge window and can be backported

Bart