Thread (14 messages) 14 messages, 2 authors, 2021-03-21
STALE1932d
Revisions (8)
  1. v2 [diff vs current]
  2. v3 current
  3. v6 [diff vs current]
  4. v7 [diff vs current]
  5. v9 [diff vs current]
  6. v10 [diff vs current]
  7. v15 [diff vs current]
  8. v16 [diff vs current]

[PATCH v3 3/9] Input: wacom_i2c - Add device tree support to wacom_i2c

From: Alistair Francis <hidden>
Date: 2021-03-21 14:11:52
Also in: lkml
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

Allow the wacom-i2c device to be exposed via device tree.

Signed-off-by: Alistair Francis <redacted>
---
 drivers/input/touchscreen/wacom_i2c.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/drivers/input/touchscreen/wacom_i2c.c b/drivers/input/touchscreen/wacom_i2c.c
index 1afc6bde2891..fc0bf583d33b 100644
--- a/drivers/input/touchscreen/wacom_i2c.c
+++ b/drivers/input/touchscreen/wacom_i2c.c
@@ -12,6 +12,7 @@
 #include <linux/slab.h>
 #include <linux/irq.h>
 #include <linux/interrupt.h>
+#include <linux/of.h>
 #include <asm/unaligned.h>
 
 #define WACOM_CMD_QUERY0	0x04
@@ -262,10 +263,17 @@ static const struct i2c_device_id wacom_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, wacom_i2c_id);
 
+static const struct of_device_id wacom_i2c_of_match_table[] __maybe_unused = {
+	{ .compatible = "wacom,generic" },
+	{}
+};
+MODULE_DEVICE_TABLE(of, wacom_i2c_of_match_table);
+
 static struct i2c_driver wacom_i2c_driver = {
 	.driver	= {
 		.name	= "wacom_i2c",
 		.pm	= &wacom_i2c_pm,
+		.of_match_table = of_match_ptr(wacom_i2c_of_match_table),
 	},
 
 	.probe		= wacom_i2c_probe,
-- 
2.30.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help