Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp809445rwb; Fri, 7 Oct 2022 04:35:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5C6nkhBmXsPfPAG/01jxNjsGUiB2AqmTty/6j0Wz6BaDjwVKZI/3o+qrbAdsqio0UmFGT1 X-Received: by 2002:a63:91ca:0:b0:458:cf7b:759b with SMTP id l193-20020a6391ca000000b00458cf7b759bmr4266837pge.257.1665142554978; Fri, 07 Oct 2022 04:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665142554; cv=none; d=google.com; s=arc-20160816; b=mRNXGRm76+VUaA1/lLATFvW2gWJ0okmT3IMHAz6L8QC3eEOrMm2QU4+E4FRHdlrrGr aUeVXOaubmcOofUsWzgRaYtX//8aVENKVlbCy6zKFZLtOM9FAiprbjcYCqD4r71XvnJa B1vglYQL3Vw5uWPIKyIPyXZlWZ0sCsAaCIcX6jfG2VnsW4ePdBX4ynFecEskk9FqyIK+ zoxj2WA8jRrBmu0yiwbcuYdmaBY8GLYrjnAsRwyK+JP0Dvn//Q1va4U8j/q8/gHVGLpu ZPJbhnbEhmj/1hU1tO7dwO2gI89DlnrlwhBRYUu+imw96CfUfQX7757DQxpxSW47uFeA S13Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=fJxHCaAqAOmFyw2vElDL6IzXl3Zptui473ggAsQPcuY=; b=Lo+XBy3E5VXoMvUyu/AoqOekj4SnYnn4tYIrY3Uezbb9kKJgNfsfNo4b5I+pARIr0H 39/nJU9s+WyrjwHdXF5kLALpbjqNCmZa6CPUJ9hofesgnRYi7daVRQPeY3Pk31vxvKG7 NtY9Z1BS39ZRFYtqUbyNzHdhQCtPisBVc6+T0010jwv0m7eeIw6vo6fwtNt0qasDQV2M jFpEIVRR2Uq7t3H+wS6lIq+CD72vf+5d4a5rs3Z4Gg/WFxW20k/gKW5M0g85lxsGkfUT zObrYu2Ki+wwgRuCKk2AoL4+ZbCooB2FT61P5e5W3/Y/3C56ImMmBmn/pbGfqKkYxwLt IIHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MMKjVibB; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c23-20020aa78e17000000b0053a9fee3b21si1759262pfr.325.2022.10.07.04.35.42; Fri, 07 Oct 2022 04:35:54 -0700 (PDT) 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=@intel.com header.s=Intel header.b=MMKjVibB; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229509AbiJGLZy (ORCPT + 99 others); Fri, 7 Oct 2022 07:25:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbiJGLZw (ORCPT ); Fri, 7 Oct 2022 07:25:52 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3BA2BCBA2; Fri, 7 Oct 2022 04:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665141951; x=1696677951; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=/11VDUP7t7Su244uf2aNGRclLR+R+OX0BbNHJ8xjx44=; b=MMKjVibBjSLjI3tDgNWG/7mOaPXLa+400VMtdrMT7VUIMELzASLVe5tW yJhm3Qbh/YgiWJR+w3QdSgq2sPoa0oyjKNVx3Zb+Uk/LukGnG3TaOhPxf hMycGRMvCMgtYhRO7y7rZ3yTRtR7VGXIz8Np5Bz7/brF9SytBm91yXdxx kLne6QUEXIP82K53/RkwUDaj22pexUJMRANjOo6SMiWMnNWYIPW6FP4zj TlZjCvJwTV4dFX4gQZoUQfSZY0wezvbuG+TjLvF3SWHyTxXTgRbxVHEgq 035KEqdwLlS+j0zi/02kwKhjaf7k5y2sb7rOUCM+PpkfiVTVHd4Oeu1L/ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="365654013" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="365654013" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:25:51 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="625118747" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="625118747" Received: from silin-mobl2.ger.corp.intel.com (HELO [10.252.61.25]) ([10.252.61.25]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:25:49 -0700 Message-ID: <6d820385-6118-4d90-6ffe-a9df20febe75@linux.intel.com> Date: Fri, 7 Oct 2022 14:25:47 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] HID: input: Add support for USI style events Content-Language: en-US To: Dmitry Torokhov , Jiri Kosina Cc: linux-input@vger.kernel.org, benjamin.tissoires@redhat.com, linux-kernel@vger.kernel.org References: <20220812103519.2142290-1-tero.kristo@linux.intel.com> From: Tero Kristo In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, 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 On 30/09/2022 21:15, Dmitry Torokhov wrote: > On Fri, Sep 30, 2022 at 11:09:12AM +0200, Jiri Kosina wrote: >> On Thu, 25 Aug 2022, Jiri Kosina wrote: >> >>>> Add support for Universal Stylus Interface (USI) style events to the HID >>>> input layers. The events are mapped as follows: >>>> >>>> type id event >>>> ---- -- ----- >>>> MSC(4) 6 Pen ID >>>> MSC(4) 7 Pen Color >>>> MSC(4) 8 Pen Line Style Ink >>>> MSC(4) 9 Pen Line Style Pencil >>>> MSC(4) 0xa Pen Line Style Highlighter >>>> MSC(4) 0xb Pen Line Style Chisel Marker >>>> MSC(4) 0xc Pen Line Style Brush >>>> MSC(4) 0xd Pen No Preferred Line Style >>>> ABS(3) 0x1c Pen Line Width >>>> >>>> All the listed MSC events are new, the ABS one is mapped to an existing >>>> event. >>> Dmitry, could you please Ack the MSC_PEN_* additions? >> Dmitry, friendly ping on this one. > Very sorry, I meant to answer and forgot... > > We need good descriptions of what exactly these events are, and when and > how userspace should expect/use them. > > In general, I am wary of MISC_* namespace as it needs to be sent in > every packet as we do not retain state and do not give userspace way of > querying it, unlike ABS_* or KEY_* or number of other events. Hmm ok, do you have a counter proposal for this? Should all of them move to some other namespace? I have been using Benjamin's HID-BPF support to handle the quirks of the USI support so far, and the events are passed via that interface also, allowing for writing of the parameters too. However, it would seem like it would be good to pass the details via the input event route also, if the user does not want to tap to the HID-BPF for whatever reason, and the pens do work as is, except for the new parameters. > > Also, what do we do with multiple pens used at once? Maybe we do not > have such devices now, but multitouch devices did not exist in the > beginning either, and now are ubiquitous. Multiple pen support is expected to happen somewhere in future, the spec sort of supports it already but the controllers really don't (and I am not quite sure how flexible the controller interface is for multiple pen support either.) Should we use ABS_MT_* for the new params? -Tero > > Thanks. >