[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20231215155643.705116-1-tomas.mudrunka@gmail.com>
Date: Fri, 15 Dec 2023 16:56:43 +0100
From: Tomas Mudrunka <tomas.mudrunka@...il.com>
To: jeff@...undy.com
Cc: dmitry.torokhov@...il.com,
linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org,
tomas.mudrunka@...il.com
Subject: [PATCH v7] Fix freeze in lm8333 i2c keyboard driver
LM8333 uses gpio interrupt line which is active-low.
When interrupt is set to FALLING edge and button is pressed
before driver loads, driver will miss the edge and never respond.
To fix this we should handle ONESHOT LOW interrupt rather than edge.
Rather than hardcoding this, we simply remove the override from
driver by calling request_threaded_irq() without specifying trigger.
This will keep interrupt trigger configuration as per devicetree. eg.:
lm8333@51 {
compatible = "ti,lm8333";
interrupt-parent = <&gpio1>;
interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
...
}
Signed-off-by: Tomas Mudrunka <tomas.mudrunka@...il.com>
Reviewed-by: Jeff LaBundy <jeff@...undy.com>
---
drivers/input/keyboard/lm8333.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/lm8333.c b/drivers/input/keyboard/lm8333.c
index 7457c3220..c5770ebb2 100644
--- a/drivers/input/keyboard/lm8333.c
+++ b/drivers/input/keyboard/lm8333.c
@@ -179,7 +179,7 @@ static int lm8333_probe(struct i2c_client *client)
}
err = request_threaded_irq(client->irq, NULL, lm8333_irq_thread,
- IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
+ IRQF_ONESHOT,
"lm8333", lm8333);
if (err)
goto free_mem;
--
2.40.0
Powered by blists - more mailing lists