[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdbGOc4Rh4KUY5Z7cavE1QkdvFxkM7Q+oE5OXQdWPx9cmg@mail.gmail.com>
Date: Thu, 26 Mar 2015 10:29:34 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Alexey Brodkin <Alexey.Brodkin@...opsys.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Vineet.Gupta1@...opsys.com" <Vineet.Gupta1@...opsys.com>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"gnurou@...il.com" <gnurou@...il.com>
Subject: Re: [PATCH] gpio-dwapb: reset mask register on probe
On Thu, Mar 19, 2015 at 9:44 AM, Alexey Brodkin
<Alexey.Brodkin@...opsys.com> wrote:
> So IMHO we need to update "gpio-dwapb" driver in the following manner:
>
> [1] In dwapb_configure_irqs() in accordance to "snps,nr-gpios" in the
> first bank set a value in GPIO_INTEN. This way we turn N pins in that
> port/bank in "interrupt" mode from their default gpio mode.
>
> [2] Don't expose dwapb_irq_enable()/dwapb_irq_disable() through
> ct->chip.irq_enable/ct->chip.irq_disable. Because we don't want to
> toggle modes of pins, right?
>
> [3] Use ct->chip.irq_mask/ct->chip.irq_unmask for purpose of real
> enabling/disabling interrupts.
>
> If I'm not missing something that would be implementation that matches
> real device specification.
>
> If we do these changes then indeed we'll want to make sure GPIO_INTMASK
> is initialized with all interrupts masked out:
> --->8---
> dwapb_write(gpio, GPIO_INTMASK, 0xffffffff);
> --->8---
>
> Let me know if my proposal makes sense and then I'll send patch that
> implements it.
Sure as long as you can test it and it works, I'm fine with this.
I might be looking at migrating this quite popular driver to
GPIOLIB_IRQCHIP so would be happy if you can help out
testing it if I do this later.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists