All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alistair Francis <alistair@alistair23.me>
To: dmitry.torokhov@gmail.com, shawnguo@kernel.org, s.hauer@pengutronix.de
Cc: linux-imx@nxp.com, jikos@kernel.org,
	benjamin.tissoires@redhat.com, linux-input@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, alistair23@gmail.com,
	Alistair Francis <alistair@alistair23.me>
Subject: [PATCH v11 2/4] HID: wacom: Add support for the AG14 Wacom device
Date: Sat,  9 Oct 2021 21:43:11 +1000	[thread overview]
Message-ID: <20211009114313.17967-2-alistair@alistair23.me> (raw)
In-Reply-To: <20211009114313.17967-1-alistair@alistair23.me>

Add support for the AG14 Wacom digitiser connected via I2C. This is used
on the reMarkable2 tablet.

The vendor ID is different then the usual Wacom vendor ID, and I'm not
sure why. Otherwise we can just use the generic HID type.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
 drivers/hid/hid-core.c  | 1 +
 drivers/hid/hid-ids.h   | 1 +
 drivers/hid/wacom_wac.c | 8 ++++++++
 3 files changed, 10 insertions(+)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index dbed2524fd47..724bec1754bd 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -904,6 +904,7 @@ static int hid_scan_report(struct hid_device *hid)
 	 * Vendor specific handlings
 	 */
 	switch (hid->vendor) {
+	case USB_VENDOR_ID_I2C_WACOM:
 	case USB_VENDOR_ID_WACOM:
 		hid->group = HID_GROUP_WACOM;
 		break;
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 29564b370341..daa0197445e7 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -1260,6 +1260,7 @@
 #define USB_DEVICE_ID_VTL_MULTITOUCH_FF3F	0xff3f
 
 #define USB_VENDOR_ID_WACOM		0x056a
+#define USB_VENDOR_ID_I2C_WACOM		0x2D1F
 #define USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH	0x81
 #define USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH   0x00BD
 
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index c01f683e23fa..6a800150933a 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -4814,6 +4814,9 @@ static const struct wacom_features wacom_features_0x3c8 =
 	{ "Wacom Intuos BT M", 21600, 13500, 4095, 63,
 	  INTUOSHT3_BT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4 };
 
+static const struct wacom_features wacom_features_0x95 =
+	{ "Wacom AG14", .type = HID_GENERIC, .oVid = 0x2D1F, .oPid = 149 };
+
 static const struct wacom_features wacom_features_HID_ANY_ID =
 	{ "Wacom HID", .type = HID_GENERIC, .oVid = HID_ANY_ID, .oPid = HID_ANY_ID };
 
@@ -4829,6 +4832,10 @@ static const struct wacom_features wacom_features_HID_ANY_ID =
 	HID_DEVICE(BUS_I2C, HID_GROUP_WACOM, USB_VENDOR_ID_WACOM, prod),\
 	.driver_data = (kernel_ulong_t)&wacom_features_##prod
 
+#define I2C_AG14_DEVICE_WACOM(prod)					    \
+	HID_DEVICE(BUS_I2C, HID_GROUP_WACOM, USB_VENDOR_ID_I2C_WACOM, prod),\
+	.driver_data = (kernel_ulong_t)&wacom_features_##prod
+
 #define USB_DEVICE_LENOVO(prod)					\
 	HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, prod),			\
 	.driver_data = (kernel_ulong_t)&wacom_features_##prod
@@ -4890,6 +4897,7 @@ const struct hid_device_id wacom_ids[] = {
 	{ USB_DEVICE_WACOM(0x84) },
 	{ USB_DEVICE_WACOM(0x90) },
 	{ USB_DEVICE_WACOM(0x93) },
+	{ I2C_AG14_DEVICE_WACOM(0x95) },
 	{ USB_DEVICE_WACOM(0x97) },
 	{ USB_DEVICE_WACOM(0x9A) },
 	{ USB_DEVICE_WACOM(0x9F) },
-- 
2.31.1


WARNING: multiple messages have this Message-ID (diff)
From: Alistair Francis <alistair@alistair23.me>
To: dmitry.torokhov@gmail.com, shawnguo@kernel.org, s.hauer@pengutronix.de
Cc: linux-imx@nxp.com, jikos@kernel.org,
	benjamin.tissoires@redhat.com, linux-input@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, alistair23@gmail.com,
	Alistair Francis <alistair@alistair23.me>
Subject: [PATCH v11 2/4] HID: wacom: Add support for the AG14 Wacom device
Date: Sat,  9 Oct 2021 21:43:11 +1000	[thread overview]
Message-ID: <20211009114313.17967-2-alistair@alistair23.me> (raw)
In-Reply-To: <20211009114313.17967-1-alistair@alistair23.me>

Add support for the AG14 Wacom digitiser connected via I2C. This is used
on the reMarkable2 tablet.

The vendor ID is different then the usual Wacom vendor ID, and I'm not
sure why. Otherwise we can just use the generic HID type.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
 drivers/hid/hid-core.c  | 1 +
 drivers/hid/hid-ids.h   | 1 +
 drivers/hid/wacom_wac.c | 8 ++++++++
 3 files changed, 10 insertions(+)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index dbed2524fd47..724bec1754bd 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -904,6 +904,7 @@ static int hid_scan_report(struct hid_device *hid)
 	 * Vendor specific handlings
 	 */
 	switch (hid->vendor) {
+	case USB_VENDOR_ID_I2C_WACOM:
 	case USB_VENDOR_ID_WACOM:
 		hid->group = HID_GROUP_WACOM;
 		break;
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 29564b370341..daa0197445e7 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -1260,6 +1260,7 @@
 #define USB_DEVICE_ID_VTL_MULTITOUCH_FF3F	0xff3f
 
 #define USB_VENDOR_ID_WACOM		0x056a
+#define USB_VENDOR_ID_I2C_WACOM		0x2D1F
 #define USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH	0x81
 #define USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH   0x00BD
 
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index c01f683e23fa..6a800150933a 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -4814,6 +4814,9 @@ static const struct wacom_features wacom_features_0x3c8 =
 	{ "Wacom Intuos BT M", 21600, 13500, 4095, 63,
 	  INTUOSHT3_BT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4 };
 
+static const struct wacom_features wacom_features_0x95 =
+	{ "Wacom AG14", .type = HID_GENERIC, .oVid = 0x2D1F, .oPid = 149 };
+
 static const struct wacom_features wacom_features_HID_ANY_ID =
 	{ "Wacom HID", .type = HID_GENERIC, .oVid = HID_ANY_ID, .oPid = HID_ANY_ID };
 
@@ -4829,6 +4832,10 @@ static const struct wacom_features wacom_features_HID_ANY_ID =
 	HID_DEVICE(BUS_I2C, HID_GROUP_WACOM, USB_VENDOR_ID_WACOM, prod),\
 	.driver_data = (kernel_ulong_t)&wacom_features_##prod
 
+#define I2C_AG14_DEVICE_WACOM(prod)					    \
+	HID_DEVICE(BUS_I2C, HID_GROUP_WACOM, USB_VENDOR_ID_I2C_WACOM, prod),\
+	.driver_data = (kernel_ulong_t)&wacom_features_##prod
+
 #define USB_DEVICE_LENOVO(prod)					\
 	HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, prod),			\
 	.driver_data = (kernel_ulong_t)&wacom_features_##prod
@@ -4890,6 +4897,7 @@ const struct hid_device_id wacom_ids[] = {
 	{ USB_DEVICE_WACOM(0x84) },
 	{ USB_DEVICE_WACOM(0x90) },
 	{ USB_DEVICE_WACOM(0x93) },
+	{ I2C_AG14_DEVICE_WACOM(0x95) },
 	{ USB_DEVICE_WACOM(0x97) },
 	{ USB_DEVICE_WACOM(0x9A) },
 	{ USB_DEVICE_WACOM(0x9F) },
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-10-09 11:43 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09 11:43 [PATCH v11 1/4] HID: wacom_sys: Add support for flipping the data values Alistair Francis
2021-10-09 11:43 ` Alistair Francis
2021-10-09 11:43 ` Alistair Francis [this message]
2021-10-09 11:43   ` [PATCH v11 2/4] HID: wacom: Add support for the AG14 Wacom device Alistair Francis
2021-10-09 13:41   ` kernel test robot
2021-10-09 13:41     ` kernel test robot
2021-10-09 13:41     ` kernel test robot
2021-10-09 14:32   ` kernel test robot
2021-10-09 14:32     ` kernel test robot
2021-10-09 14:32     ` kernel test robot
2021-10-09 11:43 ` [PATCH v11 3/4] ARM: imx_v6_v7_defconfig: Enable HID I2C Alistair Francis
2021-10-09 11:43   ` Alistair Francis
2021-10-15  2:50   ` Shawn Guo
2021-10-15  2:50     ` Shawn Guo
2021-10-09 11:43 ` [PATCH v11 4/4] ARM: dts: imx7d: remarkable2: add wacom digitizer device Alistair Francis
2021-10-09 11:43   ` Alistair Francis
2021-10-10  8:24   ` kernel test robot
2021-10-10  8:24     ` kernel test robot
2021-10-10  8:24     ` kernel test robot
2021-10-16 14:34 ` [PATCH v11 1/4] HID: wacom_sys: Add support for flipping the data values Rob Herring
2021-10-16 14:34   ` Rob Herring
     [not found] ` <CAF8JNh+OUzvAHA9tBrH2d_WxWPXRgiunhGO5KV4-fqVG+tUOyQ@mail.gmail.com>
2021-10-18 21:54   ` Alistair Francis
2021-10-18 21:54     ` Alistair Francis
2021-10-19  1:50   ` Dmitry Torokhov
2021-10-19  1:50     ` Dmitry Torokhov
2021-10-19 22:57     ` Tobita, Tatsunosuke
2021-10-19 22:57       ` Tobita, Tatsunosuke
2021-10-19 23:33     ` Alistair Francis
2021-10-19 23:33       ` Alistair Francis
2021-10-20  1:05       ` Dmitry Torokhov
2021-10-20  1:05         ` Dmitry Torokhov
2021-10-20  1:44         ` Alistair Francis
2021-10-20  1:44           ` Alistair Francis
2021-10-20  2:14           ` Dmitry Torokhov
2021-10-20  2:14             ` Dmitry Torokhov
2021-10-20  7:40             ` Benjamin Tissoires
2021-10-20  7:40               ` Benjamin Tissoires
2021-10-20 11:34               ` Alistair Francis
2021-10-20 11:34                 ` Alistair Francis
2021-10-20 12:04                 ` Benjamin Tissoires
2021-10-20 12:04                   ` Benjamin Tissoires
2021-10-21  9:27                   ` Alistair Francis
2021-10-21  9:27                     ` Alistair Francis
2021-10-20 11:28             ` Alistair Francis
2021-10-20 11:28               ` Alistair Francis
2021-10-20 11:46               ` Benjamin Tissoires
2021-10-20 11:46                 ` Benjamin Tissoires

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211009114313.17967-2-alistair@alistair23.me \
    --to=alistair@alistair23.me \
    --cc=alistair23@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.