From patchwork Mon Dec 26 12:54:48 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: 3305 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp892709wrt; Mon, 26 Dec 2022 04:55:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXuwJYKBrpTCYaohXwG34Ydny+9vTWQEGfpODqZ3JY08snjthNpFSVrOwfjpE/Lsi3Tmqdj1 X-Received: by 2002:a05:6a21:9990:b0:a6:f26b:558 with SMTP id ve16-20020a056a21999000b000a6f26b0558mr30013907pzb.16.1672059327224; Mon, 26 Dec 2022 04:55:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672059327; cv=none; d=google.com; s=arc-20160816; b=IvP7T5Cljm0dZtBdODNUyNf1nEJvs9xTb95ueVKe8vL1sKYU7h58Qxga1WPhmDcWF+ EowH/oDBl5XNvqmjyDz6m+2kUadEl8hp5o5u2h9+aobmh5w9X++wuJZ+JKL5nBShzraq Z/OVdmHpMH+QEx5yxiyQxnXM3lNt/Me+r3MDC6ORZV/TXQVaY8qHQMMQ1K7LbBunNJWq mrzfRLlmsYX5Vfecw0bo/Xv2kRcVWoAeBZ62Mdv8qw2dvC6i+RdHcwf5PxUc8L/tN68g Ah2ObtXBAYQDZ2VQn6fXy256DD35rs9DWb5UJBEzuawOEr1Mu7ZDT8hiJdX59vshrwzp am9g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=go4tve/Op9RygAUFtopjfFh/CZKE0zEfnvvG7nESATk=; b=OP/7ZcLpliCQWi9kFnHBeNhowJyxPx/m8RT9qjDEN+G5880hUstb8uVRzqTdc0t7dw k7NYa4VU2+t5iEhdiczJFje5BygoDnvCj2TF9DVolntypPEQ2sbh0h8rud4/jWh8iORZ tKxyXUbKgJ47ocVGIr69DFAKPbzDZLVwmVLFLDKU7nPGV0O7zcjMfO3rgGti4fwpOIQ2 CmM85iw/mhAX9vPi+1vnDXyVIqFl/tFX1N8jyGjAz58UxM/zmGe5NdvNWJWnD6oGrVhT Oy7HeQ/AUSLtwG1FllaEO5AOP2WTmWUeKrmYw/5SyJL2N4JvGLZ+CrWWBUuYJmiUPRHC lrCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=c8ZvrltC; 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 v125-20020a632f83000000b0049ac863877asi445071pgv.523.2022.12.26.04.55.14; Mon, 26 Dec 2022 04:55:27 -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=c8ZvrltC; 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 S230228AbiLZMzL (ORCPT + 99 others); Mon, 26 Dec 2022 07:55:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbiLZMzJ (ORCPT ); Mon, 26 Dec 2022 07:55:09 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA5EE24A; Mon, 26 Dec 2022 04:55:08 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id g25-20020a7bc4d9000000b003d97c8d4941so1687011wmk.4; Mon, 26 Dec 2022 04:55:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=go4tve/Op9RygAUFtopjfFh/CZKE0zEfnvvG7nESATk=; b=c8ZvrltCQdzj8L4d54KkYOebmwCkj1586jCOfO9hZkUf2+Eo2iKLi7TcSwjiY9g0w+ SaQVW27TnlmNMgeKpsqSpOrjcviIE70e5HNvsdxmLZOlCsBA2Ddb6KojCeDi8iT1QvI9 JzAdySj0a8tWBW/tuaxBfLBD2OmzesZ8f7o1tcvb0vrkdjB8mWXTkxlN8ZIeG7E7r4Mp LNAvpLcZfCXB56RSpubURKVi5wPjj39C6ml2zAxVaiXmnPHGKGjvrheK7tn4d0iQSa3/ VbcaODCA6OEZCoR3kkZSUPEEcy1eGqaUrc3WkXyjzj/ABr9ZOXbLAWptx0J6hIPlAt2+ j3Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=go4tve/Op9RygAUFtopjfFh/CZKE0zEfnvvG7nESATk=; b=tUw96IBXxnnYMJKRjI44jUjfTFBTLIOY3UNVoqPGMIwNKjac22KpBly36xj28psQ36 6xb0GbcrhXpzIZm0mqexY1C1WGnpguh2qcY6mOlNFIWbo0BN9jn6U00W7wxZc3eS0BQt u/OWpDAVxLgqYBaEb/jjlWy3ffRhq7s8sPulsa1poln9fOy5TzZYipHGxE5SNqctImz9 r5hD5B9DpqfIFoNUKZd2xhdhSgkGCYGmjv37gzILCNKEJETNgk44BzXcQeVbE3o0Wxu/ Rmorp5j1qaCj7pmuSQJyiSRdnYxw55jk/Hj/RmQCa0pwr6PrczIeRoI5q4uclizUh9NX KECQ== X-Gm-Message-State: AFqh2krZcwj32RRAoI5TUvD4RnxqmGI8MMvn/MuI1HnBqhRvDxN6JScI Ylc27ict/PdyT478UbjcUhI= X-Received: by 2002:a05:600c:2112:b0:3d3:396e:5e36 with SMTP id u18-20020a05600c211200b003d3396e5e36mr12856292wml.0.1672059307214; Mon, 26 Dec 2022 04:55:07 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Dec 2022 04:55:06 -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?= Subject: [PATCH 0/6] HID: uclogic: Add support for XP-PEN Deco PRO SW and MW Date: Mon, 26 Dec 2022 13:54:48 +0100 Message-Id: <20221226125454.16106-1-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.38.1 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?1753281281060540807?= X-GMAIL-MSGID: =?utf-8?q?1753281281060540807?= Hi! This series add support for the XP-PEN Deco PRO SW and MW drawing tablets. Both tablets are similar, the only difference between them is their size and their IDs. I own one of them and Andreas helped me test the other one, so thanks a lot! Please note that this series might cause conflicts with [1], but they should be really easy to fix/I can rebase once it is merged. About the patches: - The first patch introduces a quirks to be able to fix the frame type reported by these devices. - The second patch adds another quirks to know whether a tablet has battery or not. I didn't find any difference in the information reported by the firmware nor in the Windows driver to obtain this information, so I added a manual flag. - The fourth patch adds a generic mechanism to schedule jobs when an event is received, in this case, to reconnect the tablet. - The last two patches add support for the tablets. Best wishes, José Expósito [1] [PATCH] HID: uclogic: Add support for XP-PEN Deco 01 V2 https://lore.kernel.org/linux-input/20221226123456.14822-1-jose.exposito89@gmail.com/T/ José Expósito (6): HID: uclogic: Add frame type quirk HID: uclogic: Add battery quirk HID: uclogic: Refactor UGEEv2 probe magic data HID: uclogic: Handle wireless device reconnection HID: uclogic: Add support for XP-PEN Deco Pro SW HID: uclogic: Add support for XP-PEN Deco Pro MW drivers/hid/hid-ids.h | 2 + drivers/hid/hid-input.c | 4 + drivers/hid/hid-uclogic-core-test.c | 105 ++++++++++++++++++++++ drivers/hid/hid-uclogic-core.c | 61 +++++++++---- drivers/hid/hid-uclogic-params-test.c | 16 ++++ drivers/hid/hid-uclogic-params.c | 124 ++++++++++++++++++++++++-- drivers/hid/hid-uclogic-params.h | 40 +++++++++ drivers/hid/hid-uclogic-rdesc.c | 6 ++ drivers/hid/hid-uclogic-rdesc.h | 5 ++ 9 files changed, 338 insertions(+), 25 deletions(-) create mode 100644 drivers/hid/hid-uclogic-core-test.c