Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3205290pxb; Sat, 9 Oct 2021 04:45:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWf7lv+vc8KNzhJYZYU86x/Fr72JDF9s3Q3C9myS0wu+5lb3b/HsZSEIPSYsOhS3drBfic X-Received: by 2002:a05:6a00:1a08:b0:44c:c52a:c2de with SMTP id g8-20020a056a001a0800b0044cc52ac2demr13398148pfv.78.1633779951452; Sat, 09 Oct 2021 04:45:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633779951; cv=none; d=google.com; s=arc-20160816; b=JXXWo+6tXgzmdeF9XIqXSynQ45vMx8V3lncJFmS8tvvCcOuRFz2ritc5AbqPsl3zx7 zbeZWYc76FWk/EZzGrvOZGwG/S0GkmCXj4MzUbJ0tXPQKZMcrsaEsUVdZHrJBDntENx3 urRRUE0dWGfYqjRnhWgW0Aelgb/QdcGj0NnyOChIAxWVpPDKlpxv/UrzeC0PeLGmnVeW u5dfHwGNaNhuQaCPR0+jTjhMum3ijG99GbEPbbBPrv8ocm9vBt7joTrXYZ84PYFAuKZk LlY62GtonH2lohyP+ev8qA+2G37xlDqQMabwrrTslGnDRAWexozSc+CLPfGocj36e8oS kWzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=vG4rDoxLOurcRPRUON9TUlIYZV6lZNVLV2WNHonc82s=; b=uFqgLGajZBW7nbFgmaS/c2lOruoPtkQwU+Oe8hjCT7fmWIZw2m8nkDwdqqQeUkWHzQ jVeDjeW6bAfsxRlgz5CnP2FrDm4aUkUHi1opNVAGavyVaUpY2sQkgWtT2qhXJdOckeRa NzimMZ6r1KVgcQPvJT7KgoToD7Yf+NPuKIyHw1WcsPi0D+mDnMPEqfTiJXFl6kglEy/m A5lxF+tl8pfV5RFeavdREHWUrGtNUbU5ginyxBJVO/z4sFxe5AIFXyBy3ae8ifeqzJlo oOK9bPR5UkkC0Wo+1d66+FMPxm92dvqFQ4r8arrElmSqrbstPDB83f5hjjsw+U42Hc0o jLrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alistair23.me header.s=fm2 header.b=eKaj2URk; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=DHJ0C9OG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si2169055plc.80.2021.10.09.04.45.36; Sat, 09 Oct 2021 04:45:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alistair23.me header.s=fm2 header.b=eKaj2URk; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=DHJ0C9OG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244492AbhJILpb (ORCPT + 99 others); Sat, 9 Oct 2021 07:45:31 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:35625 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232933AbhJILpa (ORCPT ); Sat, 9 Oct 2021 07:45:30 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id A623658055B; Sat, 9 Oct 2021 07:43:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 09 Oct 2021 07:43:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=vG4rDoxLOurcR PRUON9TUlIYZV6lZNVLV2WNHonc82s=; b=eKaj2URk2c+EQHsDlAljxcUztVVub Mb4p0qdp0TLw+vdlRzjJPWwp48W5bGRqIfVv5imniJs63lbThxjzgoyk+UWY7P2C WXo+OEBand4QoJdaJKinAG++4zrNXOLByIFrlhgJaIrrmCN2X9CFKmUVmSti70Sy L63tJxmvc65I02ebGhMqqnIEr01xfnKK6WH9A++rFRsaccymfVzaF7Ks3Fu0f4jD dKGrQFDaBbTEwj7Tj3vheNUzpuh2F1Jp/d4j1mZizeN0zFkVhKlC6EIb1AaZdvNo KJNU46YeRvWzXEFsz+x3Ey/SCrdJ0SHYmHj3Ec2k6S6UFXR7xlfXjBoMg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=vG4rDoxLOurcRPRUON9TUlIYZV6lZNVLV2WNHonc82s=; b=DHJ0C9OG Ae1+P2ahV3880eSdcL5TZ0H7M3p2dLKupdRdOwd1NlIBaD/FhrC67hlDZQQjRBkl KRbsdjhBTR+66AYex7+V6/t30ZThrss7646FREfQnRIFOSeeCfSWPiKdg2kULoFj 02c4LYf1HxZhythi5Zav8X5vaVewurnjmn9pHcBhusGZ7VDeKzG9Ybqgkfti5gYi jGci0hcQSaackMX+plUv4oeb4eQ95GseJna76yK9TljgxpO6OTdybuo/lRynHWYn h+TT/QoaBv/dIehk4r4z4qe0JjXdEcQQuQp28ya8TMjKLxQ01mGD/urVkGwI02aY TjQpziKTgmaWhw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddtvddggedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 9 Oct 2021 07:43:29 -0400 (EDT) From: Alistair Francis 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 Subject: [PATCH v11 2/4] HID: wacom: Add support for the AG14 Wacom device Date: Sat, 9 Oct 2021 21:43:11 +1000 Message-Id: <20211009114313.17967-2-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211009114313.17967-1-alistair@alistair23.me> References: <20211009114313.17967-1-alistair@alistair23.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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