]> www.infradead.org Git - users/hch/xfs.git/commitdiff
pinctrl: starfive: jh7110: Correct the level trigger configuration of iev register
authorHal Feng <hal.feng@starfivetech.com>
Mon, 12 Aug 2024 07:01:08 +0000 (15:01 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 23 Aug 2024 16:14:45 +0000 (18:14 +0200)
A mistake was made in level trigger register configuration. Correct it.

Fixes: 447976ab62c5 ("pinctrl: starfive: Add StarFive JH7110 sys controller driver")
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Link: https://lore.kernel.org/20240812070108.100923-1-hal.feng@starfivetech.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c

index 4ce080caa2338e9c5cef9d1aa2bac313cafe214d..1d0d6c224c104e7e970d5e31e52b2fe3b19e2cad 100644 (file)
@@ -793,12 +793,12 @@ static int jh7110_irq_set_type(struct irq_data *d, unsigned int trigger)
        case IRQ_TYPE_LEVEL_HIGH:
                irq_type  = 0;    /* 0: level triggered */
                edge_both = 0;    /* 0: ignored */
-               polarity  = mask; /* 1: high level */
+               polarity  = 0;    /* 0: high level */
                break;
        case IRQ_TYPE_LEVEL_LOW:
                irq_type  = 0;    /* 0: level triggered */
                edge_both = 0;    /* 0: ignored */
-               polarity  = 0;    /* 0: low level */
+               polarity  = mask; /* 1: low level */
                break;
        default:
                return -EINVAL;