|
@@ -27,6 +27,7 @@
|
|
|
#include <linux/module.h>
|
|
|
#include <linux/input.h>
|
|
|
#include <linux/interrupt.h>
|
|
|
+#include <linux/irq.h>
|
|
|
#include <linux/platform_device.h>
|
|
|
#include <linux/async.h>
|
|
|
#include <linux/i2c.h>
|
|
@@ -1261,10 +1262,13 @@ static int elants_i2c_probe(struct i2c_client *client,
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
- * Systems using device tree should set up interrupt via DTS,
|
|
|
- * the rest will use the default falling edge interrupts.
|
|
|
+ * Platform code (ACPI, DTS) should normally set up interrupt
|
|
|
+ * for us, but in case it did not let's fall back to using falling
|
|
|
+ * edge to be compatible with older Chromebooks.
|
|
|
*/
|
|
|
- irqflags = client->dev.of_node ? 0 : IRQF_TRIGGER_FALLING;
|
|
|
+ irqflags = irq_get_trigger_type(client->irq);
|
|
|
+ if (!irqflags)
|
|
|
+ irqflags = IRQF_TRIGGER_FALLING;
|
|
|
|
|
|
error = devm_request_threaded_irq(&client->dev, client->irq,
|
|
|
NULL, elants_i2c_irq,
|