Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1512329rwl; Thu, 5 Jan 2023 14:57:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXtPY9mQ75fuiEcE+kCsHNj8g1AqklvPzToj5id99N26mQR/SEnB6lKah/SUBGkxUdrpSO/V X-Received: by 2002:a17:90a:4210:b0:219:49c6:538b with SMTP id o16-20020a17090a421000b0021949c6538bmr70779531pjg.33.1672959447628; Thu, 05 Jan 2023 14:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672959447; cv=none; d=google.com; s=arc-20160816; b=c6WSbRGMVtexjwSI+ji6uoCzuW81QJQ5/fLEZtIfZfodb8qNZofXBDC1nE640nV/SJ J+d8Da/XHm/0Gz5dX4t9EzBVOdDJdcG8nHbqjIbqJGkgsbbY5XHkANlv2paAgRO5hMzM Wh1kEMN1sMPV4AWCM5mqjdzl6urU0jmmaByd1gdNYUjEJY91HOI7PQqf64h3LqiCdpEf FArbI/aqTDLYmYW7J85WTR/TH4L6aiojUrX75BOJg4vaN+wsbK55zyRKyJGTSGxvwtHc hLXkWn7/zis+zPMzbf3QOtH4dZa3TN4A7SZb2ijkqFA7iuyhpBb/Dk4+tKbfUnMAJcap mQYQ== 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=QoyP5FAfPYf1ZrvtkWr4j1G5D33UMSEwt9NFXBwhOPY=; b=GHweDXdxE5lRK6R0uSoXXxYkout73fLWWC/MESelfgTXzD8KeZaimcgIC2SEa6/2d1 xXJ8VHk3dx5TvLPDsxSkn5sSlkIWfXiwqiKt3bv2wMl+x2b0fkxgdjcoLp7cHoawtz8j JEjVpYGdpa5qJtu7Hj7VzJK/uWUCqwV6TN98j05Zqi06ZwYjsQZu0ppIrbXwFsUI3OVh v+FUSwXU79nQEAbzl+YIBUfbMcd5C/BNCHgWKGoForAXP2EANsHCGvN5UGhFzY2ClTDz wMQeG1yAZVgXBmYZwJ+NigJlaDs4eIEqniC24j2M3McG36a4HYZqfppCOoNLT5CuKWQ5 mK7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redstrate.com header.s=default header.b=Iz43PPr2; 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 mh16-20020a17090b4ad000b002266b8b9ee4si3635140pjb.35.2023.01.05.14.57.20; Thu, 05 Jan 2023 14:57: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=@redstrate.com header.s=default header.b=Iz43PPr2; 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 S235590AbjAEWJl (ORCPT + 55 others); Thu, 5 Jan 2023 17:09:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236192AbjAEWIw (ORCPT ); Thu, 5 Jan 2023 17:08:52 -0500 Received: from ryne.moe (ryne.moe [157.90.134.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D6E1A6E41B; Thu, 5 Jan 2023 14:08:34 -0800 (PST) Received: from adrastea.localnet (unknown [170.55.83.2]) by ryne.moe (Postfix) with ESMTPSA id B45701900401; Thu, 5 Jan 2023 22:08:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=redstrate.com; s=default; t=1672956513; bh=r6XnwZZkbxtki7WdFdm9xTSDHdb0DlUFmv8n6lO6Zl8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Iz43PPr2zlar4TgT0HB4dZeEI8/C8DlhXuMX/j0FHgY3owHVWpBQ3rDFalG0dgkrI axgiJG+tjEHmeVQ5xKGPfHAgHyEFMsMEFLRFOOauE++bZ/DbneBB3O/j4q73GPyGFv dwADVT1RrjC4VHi+Op0HY68nr/wp+tvvaB0Sw/W0= From: redstrate To: =?ISO-8859-1?Q?Jos=E9_Exp=F3sito?= Cc: linux-input@vger.kernel.org, kernel test robot , Dan Carpenter , Jiri Kosina , Benjamin Tissoires , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] HID: uclogic: Add support for XP-PEN Artist 22R Pro Date: Thu, 05 Jan 2023 17:08:29 -0500 Message-ID: <4810275.31r3eYUQgx@adrastea> In-Reply-To: References: <2068502.VLH7GnMWUR@adrastea> <20230102194911.56083-1-josh@redstrate.com> 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 > I see this event codes in a test device mock in libinput, but I wonder > if we could/should use BTN_9 instead of skiping a few IDs here. > > Honestly, I don't now what should be the right approach in this case, > let's see if someone else comments on this topic. I forgot about BTN_9, that should be an easy change. I already merged changes upstream in systemd/udev to mark devices with these buttons correctly - so, sunken cost and all that :-) > I think that you could use uclogic_params_parse_ugee_v2_desc() and > change the number of buttons in the template afterwards. It'd avoid > some code duplication. Yeah I think that's what I'll do, I was thinking of reusing it and just overriding parameters if needed. > There are some XP-Pen PRO devices handled by the other init function. > Maybe we could rename this function to something more specific to your > device. Ah okay, it's pretty specific to this device anyway - so I'll rename the function so it's clear what it's purpose is. I wasn't sure if future XP-PEN Pro work was going to reuse this function, but I guess we'll rename it if that happens! > You can use "uclogic_ugee_v2_probe_endpoint" here. Good catch! Will change. > User-space lacks support for dials, but, with this descriptor, would it > be possible to differenciate between the 2 dials to, for example, > assign them different actions? Or would them be exposed as the same > dial? > > I have no idea how would user-space see this, but it'd interesting to > see how libinput handles it. Currently userspace sees this as REL_WHEEL and REL_HWHEEL, but like mentioned libinput currently rejects mouse wheel events from tablet pads. The fact that they previously worked before these patches is because udev misclassified the pad device as a mouse. I'm working upstream to expose dials on tablet pads in libinput (I just got the green light so I'll be working on that shortly!) > You can cherry-pick my patch refactoring this variables and send it as > part of your series. I think that it might help maintainers with the > merge and it'd also fix the problem reported by the test robot. Ooh good point, I didn't even consider doing that. Next version will have it split up into two then.