Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9697641rwl; Sun, 1 Jan 2023 08:21:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXu4YEo8lpotYsES7S5uGpkEjjAjI5E3iy9Gbwe21blIz/ZzWNrkFYXIHSyhdQyZeGJJleyK X-Received: by 2002:a17:906:b00c:b0:7c4:fa17:7202 with SMTP id v12-20020a170906b00c00b007c4fa177202mr31969946ejy.33.1672590119290; Sun, 01 Jan 2023 08:21:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672590119; cv=none; d=google.com; s=arc-20160816; b=jqxjoE7l8EbFmSibzxZRt5GcQ98EhMmU4l75P/s9Qz2sPcpGMdedNli1LMMc8u5IGQ 1oxw5KVZ2kr/X7NFn0uIZPiXDyCXtdf7RoKVNHeatbzcVYT0WjqfPEqKzSURHfwLWwEf prtRX2C6XzzhQExl4PY8IWPaM/47UH5IehRQALZuAIkY3qYua6g/wmn6yh85R15kuv+4 GDFZNJ/H1UfWvqyod8gqE1MaXwsgdBUOoQUWLb4/khUuBx/oNZJ8oEDMStlVx042eUL7 FRlzCTQfxdP/a118yt92CRyDb8Hmc7SSblIfvEX1S+vWIWqOWdD+D97xymHCvMLkbH98 iq5Q== 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=oJpuliPIJH9lv4Q0sx37YYjFRvcMIRdAXpsgtmScckc=; b=TwaPX+EUopVt6vudWidyQevGYRQ/ILSdrSkF8T1ExI4wgIvfQwZQWwHjYOM2HmMwYx SHXk9gxmiAD/MsaWCV94K3JudCmrCFQTdVHppZp0z1Qp3VjdIoqy3t0Gx5rAyDkd8bFz YeNB50NN+QtmRixLJJDHVs4sWGOkXUdenFY4XH2t1YOVN6Lly5AcnIC1miM4BRPK/yjH CuSOpt0SVoewl/t3z1KcBikTyZuxKpFWw523nc05rjyUYw7iwIP8xoLNrnOV0kLmwBh1 xTycPZnEEBL4uh4Tw+JgsZvm7SYgaBpbnw0V/PpbgBg9W7vX0GPiy+ezirD2iux7cKcH ggxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redstrate.com header.s=default header.b=wasLQRFT; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a1709065d0600b007824b85978asi23664042ejt.81.2023.01.01.08.21.40; Sun, 01 Jan 2023 08:21:59 -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=@redstrate.com header.s=default header.b=wasLQRFT; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231318AbjAAPlM (ORCPT + 60 others); Sun, 1 Jan 2023 10:41:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231534AbjAAPlJ (ORCPT ); Sun, 1 Jan 2023 10:41:09 -0500 Received: from ryne.moe (ryne.moe [157.90.134.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3ECD71F4; Sun, 1 Jan 2023 07:41:04 -0800 (PST) Received: from adrastea.localnet (unknown [170.55.83.2]) by ryne.moe (Postfix) with ESMTPSA id 54B5C1900366; Sun, 1 Jan 2023 15:41:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=redstrate.com; s=default; t=1672587663; bh=yuFQO/B9DLbhWgXBd8dhCFw3Fabkj++FF+sK5r52Idc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wasLQRFTkLpROUPjARpYn/k+HUyd0h89gZVzZM9KIrMnUUpdbNqRRJJt8cRmrbI8c +6q+a5h12CaxI8vysbzKKTPLRRtRHPjqlDVAgviRolkTi9CAfPxnNTmrASOCP0HVEC oC1cXCiKaBx3J16VcEUlb0ZjuB7CcQkmSqffY8DI= From: redstrate To: =?ISO-8859-1?Q?Jos=E9_Exp=F3sito?= Cc: benjamin.tissoires@redhat.com, jikos@kernel.org, kurikaesu@users.noreply.github.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: uclogic: Add support for XP-PEN Artist 22R Pro Date: Sun, 01 Jan 2023 10:40:59 -0500 Message-ID: <5985890.lOV4Wx5bFT@adrastea> In-Reply-To: References: <2068502.VLH7GnMWUR@adrastea> <3448509.5fSG56mABF@adrastea> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE 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 > > Ah cool, then I guess we can remove the cases for "4" and "8"? I'd be > nice to stick with decimal numbers in all cases for consistency. > Oh yeah we totally could, I'm not sure why the double cases were there in the first place - it might have been for another device included in the original patch. > > Also, buf[6] does not indicate the number of buttons (20?). > > Did you check with Wireshark if the Windows driver is doing something > different for your tablet? It'd be nice to avoid adding quirks but it > might not be possible :S > > We can ignore buf[12] and buf[14]. buf[0] indicates the size of the > descriptor (12), so the last two bytes are random memory. > I don't even think I have to drop into Windows, we have a userspace linux program for XP-PEN but I haven't tested it with this tablet yet. Yeah, I'd also like to avoid implementing device-specific quirks - hopefully I'll be able to shrink the init code but I might not be able to get rid of all of it. It's really weird that almost everything else (data frame wise) is the same, with the exception of init. And yes, this tablet contains 20 buttons and nothing in that buffer indicates button count :-/