hwmon: (lm90) Don't override interrupt trigger type
authorDmitry Osipenko <digetx@gmail.com>
Fri, 18 Jun 2021 21:54:52 +0000 (00:54 +0300)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 19 Jun 2021 11:09:49 +0000 (04:09 -0700)
The lm90 driver sets interrupt trigger type to level-low. This type is
not suitable for sensors like NCT1008 that don't deassert interrupt line
until temperature is back to normal, resulting in interrupt storm. The
appropriate trigger type should come from OF device description and
currently it's overridden by the driver's trigger type. Don't specify
the trigger type in the driver code, letting interrupt core to use the
device-specific trigger type.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm90.c

index ebbfd5f..2e057fa 100644 (file)
@@ -1908,8 +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,
-                                               "lm90", client);
+                                               IRQF_ONESHOT, "lm90", client);
                if (err < 0) {
                        dev_err(dev, "cannot request IRQ %d\n", client->irq);
                        return err;