From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44F19C433EF for ; Wed, 20 Oct 2021 02:15:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FC3161212 for ; Wed, 20 Oct 2021 02:15:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230323AbhJTCR1 (ORCPT ); Tue, 19 Oct 2021 22:17:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230103AbhJTCRG (ORCPT ); Tue, 19 Oct 2021 22:17:06 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84385C061749; Tue, 19 Oct 2021 19:14:51 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id h193so5728161pgc.1; Tue, 19 Oct 2021 19:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BeLefvFYaaRNCXybpBNbetJ8KPidcgjmt2FIlG8JLGU=; b=g2kvxFPQF0NKcFZdcxoOMWcur0VCSL5wdxGZLs3mlkcAkYUcSmvP9Af8ZAStymqLs0 tHAM0eeyBmCxRmMskpNA5XC/UuUkOL42EK7ejN4a2nK85+pGdX8bBQgBC+Y5C8aOuw9v f2kPwbFVcmDHyCf38qj5zBBrhHvIulPdmtayqXLxfelVYJmAn9YRFpDeeh8bV14bX69W HtjKu7YdKH5WFTSZgd94BqDCs/ESo+Gg7g1GAGOLdTtIoaY/jMiUknWIW9FYqClpfGb4 NKwnkkAlwzIDQ5+kLk6WDGqQdfXPssBhqpLl7KLAaWDeuTceVn7nl69zNgwSUqhQnv3p +mtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BeLefvFYaaRNCXybpBNbetJ8KPidcgjmt2FIlG8JLGU=; b=fh09+zwK+Zy93AfUTfw8yB056DtrnpMl6Ui0PVzoqAiMtXQ79xMN9QcA+CbqvNqvJm 7GQa+udbaoiGf9pHdK81WdU69+g/0Xen6D5KQobWp38GRyClFyNVpOlwK/NEFJkqIBv8 VKoizQaAHtRLq8wcj2+0MX84znZi/Tj1surfLAw7eIopPBMF8uB/UKo3Xr+XJcOWUcaH 0VjltdQFu+B6I7jslmRQ3v+9nWYdpuYzq2Y5GX5SwSvWqHnqeEtLNjFoHy2ufs4HfO/m NQCowwrQsQ78iFcdnEjGwoKD5wdZchi/rrHwj0zxYzsDvXVI3RSAvb8Q9v6NFBYuYnfN BqSQ== X-Gm-Message-State: AOAM533OIUBTdx622fpnQ+FvJHFoxrmBSQ4stL0a3BR1ZjH2n2amVPiV 8m3Kpg+3LpR3kAcNhMQzBMc= X-Google-Smtp-Source: ABdhPJyR9L42ItJdgeY8OFVEuB+bR+EEDRXjgA+Rvzo7tbV8YJlnkPhWyOmMetzWesvDsvBeGVKbUw== X-Received: by 2002:a05:6a00:88e:b0:44c:c40:9279 with SMTP id q14-20020a056a00088e00b0044c0c409279mr3335225pfj.85.1634696090862; Tue, 19 Oct 2021 19:14:50 -0700 (PDT) Received: from google.com ([2620:15c:202:201:4814:8c29:ba96:983d]) by smtp.gmail.com with ESMTPSA id k14sm422679pji.45.2021.10.19.19.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 19:14:49 -0700 (PDT) Date: Tue, 19 Oct 2021 19:14:47 -0700 From: Dmitry Torokhov To: Alistair Francis Cc: Ping Cheng , Alistair Francis , Shawn Guo , Sascha Hauer , dl-linux-imx , Jiri Kosina , Benjamin Tissoires , linux-input , devicetree , LKML , linux-arm-kernel Subject: Re: [PATCH v11 1/4] HID: wacom_sys: Add support for flipping the data values Message-ID: References: <20211009114313.17967-1-alistair@alistair23.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 20, 2021 at 11:44:50AM +1000, Alistair Francis wrote: > On Wed, Oct 20, 2021 at 11:05 AM Dmitry Torokhov > wrote: > > > > On Wed, Oct 20, 2021 at 09:33:13AM +1000, Alistair Francis wrote: > > > On Tue, Oct 19, 2021 at 11:51 AM Dmitry Torokhov > > > wrote: > > > > > > > > We already have touchscreen-inverted-x/y defined in > > > > Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml, > > > > why are they not sufficient? > > > > > > The touchscreen-* properties aren't applied to HID devices though, at > > > least not that I can tell. > > > > No, they are not currently, but that does not mean we need to establish > > a new set of properties (property names) for HID case. > > I can update the names to use the existing touchscreen ones. > > Do you have a hint of where this should be implemented though? > > Right now (without "HID: wacom: Add support for the AG14 Wacom > device") the wacom touchscreen is just registered as a generic HID > device. I don't see any good place in hid-core, hid-input or > hid-generic to invert the input values for this. I think the transformation should happen in hid-multitouch.c::mt_process_slot() using helpers from include/linux/input/touchscreen.h I think the more challenging question is to how pass/attach struct touchscreen_properties * to the hid device (i expect the properties will be attached to i2c-hid device, but maybe we could create a sub-node of it and attach properties there. Thanks. -- Dmitry From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7AA3C433F5 for ; Wed, 20 Oct 2021 02:21:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF4A7611EF for ; Wed, 20 Oct 2021 02:21:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AF4A7611EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FoZvMJIKlffbCuBMcDgMZ8bhvsC9EXyvg9RoOjtpTfU=; b=TMlH+sRmI1E1oB kJH60PC8jkTSVgJyWCxEPoFoY709SKST9sFmxwjYEGUlb3Vq8tDbc+9yzwikvL70LVI8EsAYx6K7n D+jvjPWrCamQb6bfs3nsK1aHUpQmKcPN0TmzEQREWcCA8K2ocppFiN5hmZc+nuGXphfgcXTfgOC+J wwph0qn01kgoLsgOCbVIJXdCR5vMQiVYPzcLQvauDHqYt1J4dA16RfFwGwnqeVdyRqVXH700X7Zki q4zQqdx30wuRVCpBQW4WfxjLAxX/qwjTYXVm29vAAlG6gQ06MggyRgfYa329F0ZtdJ18uj5bNB1Wb K75rVJLQf9BcmYDlzewg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1md1CD-003DJa-4U; Wed, 20 Oct 2021 02:19:13 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1md180-003B3y-8P for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 02:14:55 +0000 Received: by mail-pg1-x529.google.com with SMTP id m21so21090968pgu.13 for ; Tue, 19 Oct 2021 19:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BeLefvFYaaRNCXybpBNbetJ8KPidcgjmt2FIlG8JLGU=; b=g2kvxFPQF0NKcFZdcxoOMWcur0VCSL5wdxGZLs3mlkcAkYUcSmvP9Af8ZAStymqLs0 tHAM0eeyBmCxRmMskpNA5XC/UuUkOL42EK7ejN4a2nK85+pGdX8bBQgBC+Y5C8aOuw9v f2kPwbFVcmDHyCf38qj5zBBrhHvIulPdmtayqXLxfelVYJmAn9YRFpDeeh8bV14bX69W HtjKu7YdKH5WFTSZgd94BqDCs/ESo+Gg7g1GAGOLdTtIoaY/jMiUknWIW9FYqClpfGb4 NKwnkkAlwzIDQ5+kLk6WDGqQdfXPssBhqpLl7KLAaWDeuTceVn7nl69zNgwSUqhQnv3p +mtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BeLefvFYaaRNCXybpBNbetJ8KPidcgjmt2FIlG8JLGU=; b=6oKONZVNcCsLrQl9XllqlwOvn2Xr01INAhFnkRD7KZ/fS9IBimIeNTB7SDbNFdR3ai KPp5O/unoGSqPu+p0AQsMDzVyd6RxVxw4yoSWfyeR1RyHKeChp3HAJk2NTsqW3O5CwyQ Vz8blHtYcfirMWaAhssB6QU5aWDvWMAZd3h1r727amw/gOyZhiTe2rIPNCuqchC+xPit C7gyam8JAQNIl1CX3QoZpIJZ1jUoLy3ZznqMMNqrtldOIe/PXXwwhc+FrIUu1eJun/By H73Kzb/3zV2LIgQK648IXY7B2EvkdnzN6oSeJcOnYGqRahW8yuUs88ifkZUJcwO8WmSk H+eQ== X-Gm-Message-State: AOAM532C8SHzJx2Th5QcBGbOrudSaBcYuwyx1Uqjy7IFGWFS26Jti/b+ UsaYo2UUMPNgYLbaL/eucM4= X-Google-Smtp-Source: ABdhPJyR9L42ItJdgeY8OFVEuB+bR+EEDRXjgA+Rvzo7tbV8YJlnkPhWyOmMetzWesvDsvBeGVKbUw== X-Received: by 2002:a05:6a00:88e:b0:44c:c40:9279 with SMTP id q14-20020a056a00088e00b0044c0c409279mr3335225pfj.85.1634696090862; Tue, 19 Oct 2021 19:14:50 -0700 (PDT) Received: from google.com ([2620:15c:202:201:4814:8c29:ba96:983d]) by smtp.gmail.com with ESMTPSA id k14sm422679pji.45.2021.10.19.19.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 19:14:49 -0700 (PDT) Date: Tue, 19 Oct 2021 19:14:47 -0700 From: Dmitry Torokhov To: Alistair Francis Cc: Ping Cheng , Alistair Francis , Shawn Guo , Sascha Hauer , dl-linux-imx , Jiri Kosina , Benjamin Tissoires , linux-input , devicetree , LKML , linux-arm-kernel Subject: Re: [PATCH v11 1/4] HID: wacom_sys: Add support for flipping the data values Message-ID: References: <20211009114313.17967-1-alistair@alistair23.me> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211019_191452_371214_1C6A5B59 X-CRM114-Status: GOOD ( 22.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 20, 2021 at 11:44:50AM +1000, Alistair Francis wrote: > On Wed, Oct 20, 2021 at 11:05 AM Dmitry Torokhov > wrote: > > > > On Wed, Oct 20, 2021 at 09:33:13AM +1000, Alistair Francis wrote: > > > On Tue, Oct 19, 2021 at 11:51 AM Dmitry Torokhov > > > wrote: > > > > > > > > We already have touchscreen-inverted-x/y defined in > > > > Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml, > > > > why are they not sufficient? > > > > > > The touchscreen-* properties aren't applied to HID devices though, at > > > least not that I can tell. > > > > No, they are not currently, but that does not mean we need to establish > > a new set of properties (property names) for HID case. > > I can update the names to use the existing touchscreen ones. > > Do you have a hint of where this should be implemented though? > > Right now (without "HID: wacom: Add support for the AG14 Wacom > device") the wacom touchscreen is just registered as a generic HID > device. I don't see any good place in hid-core, hid-input or > hid-generic to invert the input values for this. I think the transformation should happen in hid-multitouch.c::mt_process_slot() using helpers from include/linux/input/touchscreen.h I think the more challenging question is to how pass/attach struct touchscreen_properties * to the hid device (i expect the properties will be attached to i2c-hid device, but maybe we could create a sub-node of it and attach properties there. Thanks. -- Dmitry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel