RE: [PATCH v2 09/18] GPIO: OMAP: Use level/edge detect reg offsets

DebBarma, Tarun Kanti
2011-06-17T05:26:40Z

> -----Original Message-----
> From: Hilman, Kevin
> Sent: Thursday, June 16, 2011 10:31 PM
> To: DebBarma, Tarun Kanti
> Cc: linux-omap@vger.kernel.org; Shilimkar, Santosh; tony@atomide.com
> Subject: Re: [PATCH v2 09/18] GPIO: OMAP: Use level/edge detect reg
> offsets
>
> Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
>
> > By adding level and edge detection register offsets and then
> initializing them
> > correctly according to OMAP versions during device registrations we can
> now remove
> > lot of revision checks in these functions.
> >
> > Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
> > Signed-off-by: Charulatha V <charu@ti.com>
>
> Looks mostly good, but...
>
> [...]
>
> > @@ -661,9 +655,8 @@ static void gpio_irq_handler(unsigned int irq,
> struct irq_desc *desc)
> > if (cpu_is_omap15xx() && (bank->method == METHOD_MPUIO))
> > isr &= 0x0000ffff;
> >
> > - if (cpu_class_is_omap2()) {
> > + if (bank->regs->leveldetect0)
>
> Rather than checking for the presence of the register, this should just
> be 'if (bank->level_mask)'. bank->level_mask will should already be
> zero on platforms without the register.
Ok. I will make the change.
--
Tarun

>
> Kevin