[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210829091925.190-5-alistair@alistair23.me>
Date: Sun, 29 Aug 2021 19:19:16 +1000
From: Alistair Francis <alistair@...stair23.me>
To: dmitry.torokhov@...il.com, linux-input@...r.kernel.org,
linux-imx@....com, kernel@...gutronix.de, pinglinux@...il.com,
tatsunosuke.tobita@...om.com, junkpainting@...il.com,
ping.cheng@...om.com
Cc: linux-kernel@...r.kernel.org, alistair23@...il.com,
robh+dt@...nel.org, devicetree@...r.kernel.org,
Alistair Francis <alistair@...stair23.me>
Subject: [PATCH v10 03/12] Input: wacom_i2c - Add device tree support to wacom_i2c
Allow the wacom-i2c device to be exposed via device tree.
Signed-off-by: Alistair Francis <alistair@...stair23.me>
---
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 22826c387da5..6053595f2b30 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
@@ -241,10 +242,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[] = {
+ { .compatible = "wacom,i2c-30" },
+ {}
+};
+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 = wacom_i2c_of_match_table,
},
.probe = wacom_i2c_probe,
--
2.31.1
Powered by blists - more mailing lists