linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Sander Vanheule <sander@svanheule.net>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: Re: [PATCH] gpio: realtek-otto: fix GPIO line IRQ offset
Date: Sat, 30 Oct 2021 16:59:47 +0200	[thread overview]
Message-ID: <CAMRc=Mc-HYaw3OMiYr3Wd-LUTnpMB_D6QhCQjKi3xKeQLdeYzw@mail.gmail.com> (raw)
In-Reply-To: <20211028085243.34360-1-sander@svanheule.net>

On Thu, Oct 28, 2021 at 10:52 AM Sander Vanheule <sander@svanheule.net> wrote:
>
> The irqchip uses one domain for all GPIO lines, so the line offset
> should be determined w.r.t. the first line of the first port, not the
> first line of the triggered port.
>
> Fixes: 0d82fb1127fb ("gpio: Add Realtek Otto GPIO support")
> Signed-off-by: Sander Vanheule <sander@svanheule.net>
> ---
>  drivers/gpio/gpio-realtek-otto.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-realtek-otto.c b/drivers/gpio/gpio-realtek-otto.c
> index eeeb39bc171d..bd75401b549d 100644
> --- a/drivers/gpio/gpio-realtek-otto.c
> +++ b/drivers/gpio/gpio-realtek-otto.c
> @@ -205,7 +205,7 @@ static void realtek_gpio_irq_handler(struct irq_desc *desc)
>                 status = realtek_gpio_read_isr(ctrl, lines_done / 8);
>                 port_pin_count = min(gc->ngpio - lines_done, 8U);
>                 for_each_set_bit(offset, &status, port_pin_count)
> -                       generic_handle_domain_irq(gc->irq.domain, offset);
> +                       generic_handle_domain_irq(gc->irq.domain, offset + lines_done);
>         }
>
>         chained_irq_exit(irq_chip, desc);
> --
> 2.31.1
>

I already sent my last fixes PR to Linus yesterday, so I queued it
with other patches for next. It'll get backported anyway to stable
branches.

Bart

      parent reply	other threads:[~2021-10-30 15:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28  8:52 [PATCH] gpio: realtek-otto: fix GPIO line IRQ offset Sander Vanheule
2021-10-28 10:23 ` Andy Shevchenko
2021-10-28 11:52   ` Sander Vanheule
2021-10-30 14:59 ` Bartosz Golaszewski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMRc=Mc-HYaw3OMiYr3Wd-LUTnpMB_D6QhCQjKi3xKeQLdeYzw@mail.gmail.com' \
    --to=brgl@bgdev.pl \
    --cc=andy.shevchenko@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=sander@svanheule.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).