Re: [PATCH V4] mfd: da9062: add support for interrupt polarity defined in device tree

From: Linus Walleij
Date: Fri Feb 14 2020 - 02:58:08 EST


Hi Shreyas,

thanks for your patch!

On Thu, Feb 13, 2020 at 6:40 AM Shreyas Joshi <shreyas.joshi@xxxxxxxxx> wrote:

> + switch (*trigger) {
> + case IRQ_TYPE_LEVEL_HIGH:
> + irq_type = 1;
> + break;
> + case IRQ_TYPE_LEVEL_LOW:
> + irq_type = 0;
> + break;

Please create #defines for the level indicator, like

#define DA9062_IRQ_HIGH 1
#define DA9062_IRQ_LOW 0

and use that.

With that change:
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij