diff mbox series

[v1] pinctrl: starfive: jh7110: Correct the level trigger configuration of iev register

Message ID 20240812070108.100923-1-hal.feng@starfivetech.com
State New
Headers show
Series [v1] pinctrl: starfive: jh7110: Correct the level trigger configuration of iev register | expand

Commit Message

Hal Feng Aug. 12, 2024, 7:01 a.m. UTC
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>
---

Hi,

When we tested some modules that use gpio level trigger, we found
the current level trigger register configuration was set wrong.
Submit this patch to correct.

Best regards,
Hal

---
 drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: 7c626ce4bae1ac14f60076d00eafe71af30450ba

Comments

Linus Walleij Aug. 23, 2024, 4:15 p.m. UTC | #1
On Mon, Aug 12, 2024 at 9:02 AM Hal Feng <hal.feng@starfivetech.com> wrote:

> 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>

Patch applied for fixes!

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
index 4ce080caa233..1d0d6c224c10 100644
--- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
+++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
@@ -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;