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

Kevin Hilman
2011-06-16T17:00:41Z

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.

Kevin