From patchwork Mon Dec 26 12:54:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= X-Patchwork-Id: 36614 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp893376wrt; Mon, 26 Dec 2022 04:57:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXvHqrwpr4MT6WBH2PJIAiD1gN84gkK34r86/Jd0HGQJFgrxB4755UgDs7IPv2a87G0Ogfen X-Received: by 2002:a17:902:f112:b0:189:9ee0:cc8e with SMTP id e18-20020a170902f11200b001899ee0cc8emr18084285plb.57.1672059446043; Mon, 26 Dec 2022 04:57:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672059446; cv=none; d=google.com; s=arc-20160816; b=TkYcdBjtrk5808JxQJl1kwHaVzCv8iBoCU5BTsrAIbf5GZY5+OHoL2MUs+rGXP7mnS ymfBDcsdSPf3IX0F0aW++heNHb6Ckb3AZhlA+4x38CiiychvB3aBnHc9Ed/S2nzRs3IE SCJROZY7VeTu11sv5e66sjXH0toeUf3R+Y1UgOdf0Zrt8Bof9Qyya/zpZs0bynLvAM0K ffGwOc+4lDxCwWVdPGEG1Qg9vuBHWx6cL7et3EbjpyIuscR27LEQL6n8+vApGZ6rDS5+ BMmG9r/JKE+8C/LH/BaYC6SmyPTmAlNe4DGLO6OSml7BxCyw2yOy0Gwf5NSRrtn4SJIa 4kUQ== 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; bh=Eus7P8yeikk4wwlMHasaNl/bqp6teGVXQaOvLono3cc=; b=Jg+fYDgfASuvt9CGMvQ/qdVB/QC/5HJJ39JI4Rr5zBtE00y4n56KffMITqUZS83z1s 1vG1Jy6Hwca8jY2WP6Qec4aQ1Cs5o30sNMnISWsntTKoPetETo4qiKd+pRV0DCu6u0E3 Blqw3/RC+hFZm6BJ/Fa3b5cZX6NyqdK8DeyzFhgpvDzMfm0Rje0IfgzCW7XzXq4M3no0 jfDMc2ZbqozckN/uuj537qDnGxmfMHjf4LrYpKd3XHmlXhcA3/F2Xb+ztp50zYnp40rx wkdGvuU23xcKkf4KIa7Sff3xbsi8lHnSwtvbWoTvp7ysFFPpgeLqTdgBwf6aZGuSkwsJ CuXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cFkqhRsd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 10-20020a170902e9ca00b001869fd74e0csi3014116plk.311.2022.12.26.04.57.13; Mon, 26 Dec 2022 04:57:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cFkqhRsd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232103AbiLZMzh (ORCPT + 99 others); Mon, 26 Dec 2022 07:55:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232073AbiLZMzP (ORCPT ); Mon, 26 Dec 2022 07:55:15 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B762B61; Mon, 26 Dec 2022 04:55:14 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id p1-20020a05600c1d8100b003d8c9b191e0so7460040wms.4; Mon, 26 Dec 2022 04:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Eus7P8yeikk4wwlMHasaNl/bqp6teGVXQaOvLono3cc=; b=cFkqhRsdx4Ct059TDURmokgku6aJS+e9/6oDHYqnaqpdXyrmB/CL0ae+XD+1e7+E0G 5aiBlsveIM7L8iobuciqo+YSiaguuXbBrjRoSz06yeDvj/aQX9/YFXo6Jo8SzYDkMex9 FMKWrfiDYT4Sl5iUq2y9gS8uaIp3y8J+pdVOcTPivrLLddnZS0ypMRw/vnjsOO7JCC/L GX4PjD4a8xILmW6Yw2iWmi8dXwtsebx2U7tNOWb/5JlzqiT42SYdqsXzT9xDGqrpOYJf /GNGGoHriUFbVCyqQs+P8fobOye05F/qj8gkemQc4+RMULAdinDxZjl0jFTgC+FQsSyv xmyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Eus7P8yeikk4wwlMHasaNl/bqp6teGVXQaOvLono3cc=; b=WpKDSCqfbZs+COTfWnI0ODtFgTP7Qa2XYh7ZUc4hmzB/w3fPh6WE2Civ87kdZuNznM CrHXRWPUIwuMRzqhRGQpd0voPuJBGGcKLRwhOBB2J1C+bFCabCwdv6pDsUG4Q0fz70gy E4RaP08vtJIZjuXjBEqDlZfcNy8Zf2NgkNz+zAMyDSTyJJqKzEPvlNElegtr1pZHy2lc gQq/kd1KOEOfsRlPKT76pTFHfsRXTeDt+RruGuKt3vOczRs2Zgxxizmvpf3KumHultLe 4qeyQrkR/bY9STSEv9F3oXgDaNbki1gY80sDfu89Ac/GBHdJEXvbyBouStP4N/mhaVsz zvlw== X-Gm-Message-State: AFqh2kr9DE2q817UQn15q1Dive5ovo43/4bFZ+XvxplC0f8iVOMJ4/1d dcmD2NI56pijsXl+e3zOQgg= X-Received: by 2002:a05:600c:4fcf:b0:3cf:68f8:790b with SMTP id o15-20020a05600c4fcf00b003cf68f8790bmr13213891wmq.11.1672059313074; Mon, 26 Dec 2022 04:55:13 -0800 (PST) Received: from localhost.localdomain ([94.73.32.212]) by smtp.gmail.com with ESMTPSA id y24-20020a05600c365800b003cf894dbc4fsm13684497wmq.25.2022.12.26.04.55.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Dec 2022 04:55:12 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: jikos@kernel.org Cc: benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= , Andreas Grosse Subject: [PATCH 6/6] HID: uclogic: Add support for XP-PEN Deco Pro MW Date: Mon, 26 Dec 2022 13:54:54 +0100 Message-Id: <20221226125454.16106-7-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221226125454.16106-1-jose.exposito89@gmail.com> References: <20221226125454.16106-1-jose.exposito89@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753281405550214675?= X-GMAIL-MSGID: =?utf-8?q?1753281405550214675?= The XP-PEN Deco Pro MW is a UGEE v2 device with a frame with 8 buttons, a bitmap dial and a mouse. Its pen has 2 buttons, supports tilt and pressure. It can be connected using a USB cable or, to use it in wireless mode, using a USB Bluetooth dongle. When it is connected in wireless mode the device battery is used to power it. All the pieces to support it are already in place. Add its ID and quirks in order to support the device. Link: https://github.com/DIGImend/digimend-kernel-drivers/issues/622 Tested-by: Andreas Grosse Signed-off-by: José Expósito --- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ drivers/hid/hid-uclogic-core.c | 3 +++ drivers/hid/hid-uclogic-params.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index d8a8028761ed..5df7f4e4d610 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -1296,6 +1296,7 @@ #define USB_DEVICE_ID_UGEE_XPPEN_TABLET_G640 0x0094 #define USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO01 0x0042 #define USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_L 0x0935 +#define USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_MW 0x0934 #define USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_S 0x0909 #define USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_SW 0x0933 #define USB_DEVICE_ID_UGEE_XPPEN_TABLET_STAR06 0x0078 diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index c4d9a95774cc..4f6596febedf 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -376,6 +376,8 @@ static const struct hid_device_id hid_battery_quirks[] = { HID_BATTERY_QUIRK_IGNORE }, { HID_USB_DEVICE(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_L), HID_BATTERY_QUIRK_AVOID_QUERY }, + { HID_USB_DEVICE(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_MW), + HID_BATTERY_QUIRK_AVOID_QUERY }, { HID_USB_DEVICE(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_SW), HID_BATTERY_QUIRK_AVOID_QUERY }, { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15), diff --git a/drivers/hid/hid-uclogic-core.c b/drivers/hid/hid-uclogic-core.c index cfef6f9af62d..a31e06b38a67 100644 --- a/drivers/hid/hid-uclogic-core.c +++ b/drivers/hid/hid-uclogic-core.c @@ -540,6 +540,9 @@ static const struct hid_device_id uclogic_devices[] = { USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO01) }, { HID_USB_DEVICE(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_L) }, + { HID_USB_DEVICE(USB_VENDOR_ID_UGEE, + USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_MW), + .driver_data = UCLOGIC_MOUSE_FRAME_QUIRK | UCLOGIC_BATTERY_QUIRK }, { HID_USB_DEVICE(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_S) }, { HID_USB_DEVICE(USB_VENDOR_ID_UGEE, diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c index 39a9259aa447..7fdb87a2714b 100644 --- a/drivers/hid/hid-uclogic-params.c +++ b/drivers/hid/hid-uclogic-params.c @@ -1765,6 +1765,8 @@ int uclogic_params_init(struct uclogic_params *params, USB_DEVICE_ID_UGEE_PARBLO_A610_PRO): case VID_PID(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_L): + case VID_PID(USB_VENDOR_ID_UGEE, + USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_MW): case VID_PID(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_S): case VID_PID(USB_VENDOR_ID_UGEE,