All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] hwmon: (lm90) Use edge-triggered interrupt
@ 2021-06-16 19:07 Dmitry Osipenko
  2021-06-17  0:12 ` Guenter Roeck
  0 siblings, 1 reply; 11+ messages in thread
From: Dmitry Osipenko @ 2021-06-16 19:07 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck; +Cc: linux-kernel, linux-hwmon

The LM90 driver uses level-based interrupt triggering. The interrupt
handler prints a warning message about the breached temperature and
quits. There is no way to stop interrupt from re-triggering since it's
level-based, thus thousands of warning messages are printed per second
once interrupt is triggered. Use edge-triggered interrupt in order to
fix this trouble.

Fixes: 109b1283fb532 ("hwmon: (lm90) Add support to handle IRQ")
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/hwmon/lm90.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index ebbfd5f352c0..ce8ebe60fcdc 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -1908,7 +1908,7 @@ static int lm90_probe(struct i2c_client *client)
 		dev_dbg(dev, "IRQ: %d\n", client->irq);
 		err = devm_request_threaded_irq(dev, client->irq,
 						NULL, lm90_irq_thread,
-						IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+						IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
 						"lm90", client);
 		if (err < 0) {
 			dev_err(dev, "cannot request IRQ %d\n", client->irq);
-- 
2.30.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-06-18  8:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 19:07 [PATCH v1] hwmon: (lm90) Use edge-triggered interrupt Dmitry Osipenko
2021-06-17  0:12 ` Guenter Roeck
2021-06-17  7:11   ` Dmitry Osipenko
2021-06-17 13:12     ` Guenter Roeck
2021-06-17 13:48       ` Dmitry Osipenko
2021-06-17 14:13         ` Guenter Roeck
2021-06-17 14:46           ` Dmitry Osipenko
2021-06-17 15:12             ` Guenter Roeck
2021-06-17 15:27               ` Dmitry Osipenko
2021-06-17 21:42                 ` Guenter Roeck
2021-06-18  8:55                   ` Dmitry Osipenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.