Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7174203rwb; Mon, 12 Dec 2022 11:00:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf61OThmng5sPkfDGUqXQKi/YOMGRXCvUhPDPaxr6zYN4I7XcRDzzrsu+TZplApBRw/k4be/ X-Received: by 2002:a17:902:8c8d:b0:187:262a:7955 with SMTP id t13-20020a1709028c8d00b00187262a7955mr16124300plo.9.1670871649393; Mon, 12 Dec 2022 11:00:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670871649; cv=none; d=google.com; s=arc-20160816; b=rE87BueFRrg+isISZ8T5fMVNGBSLhJgpK/fqPdBysYp7+bGZ/+24Oek8ky2LwFfz6i wGDSA456tejCzxhJGurwXHPJRTzBA8njF4i+jaTHL0ZLWWk7Sr5sgdyYz/N8bVObFelU H9+YjjeuFxPtkSdHsbbpNcsbmJYOTKXqRCnwLshPYHENlZ+3QtXYtBJpXzx4nQyDxv07 9A67/RwbEhUpdmQ5cEHFhWtzhkspsx8yrw/mMrq2OdQMOr964zs7Yfp1R6AK50mbX5pq qYAe1TdUKv0TbdRBoXVuY03zpKKdEODhIwmiFza3qTpRkpACD+uu3gqRLh4CAvwpAgrt 2qkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=b2FoaTkFR172ODNwxywDb3/dtAhikbK9eu/N7ap6ZAA=; b=pRJzMG/7UtB4EAuicAzee/PfuPtcWdnAgCDUSbfZf+UQTL38pvi+BJMheAwUFG5y+Y Gw9Laqwly2eOnZghXOt1u2f+2QWk/A7MKUZj6SzxVYuZjAsdqBP4+mB5NKKDPEg37aIh 6NZohaphxs5X+H/Y/HD+QSxCgXs1t2PjdVgogoGg+ijPdfWkMUOmJq/s612HFFTXMy3T x3A4QYCgBVTb2/w9bFh+gaxCzwJPWPJZCWkAHB+NFkVYJ+Il4txqW4bsWUEs+iv76yRX XHCbWyB9KpfusfDcQIRSD74Dy9/0Tv+SdgsqYLpWrj9jQU7X4Y2zv7ppoh1NU+MT0tSl WZwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mwjVxEAA; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c12-20020a170903234c00b00188d892999esi11017109plh.521.2022.12.12.11.00.38; Mon, 12 Dec 2022 11:00:49 -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=mwjVxEAA; 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 S232785AbiLLSrt (ORCPT + 74 others); Mon, 12 Dec 2022 13:47:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233412AbiLLSq2 (ORCPT ); Mon, 12 Dec 2022 13:46:28 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25787E4C; Mon, 12 Dec 2022 10:46:17 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id t17so708411pjo.3; Mon, 12 Dec 2022 10:46:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=b2FoaTkFR172ODNwxywDb3/dtAhikbK9eu/N7ap6ZAA=; b=mwjVxEAAQu4acwY/E5dV1V/PTmZZk/WWngUyGKpXL8jNtgP6uTIyJk8oM7GKW8ha+g RE7iMfdp7zKu3Dhn8FhcLyLfUc/Ym6m1wFfvG5ZF1GawGssphXoPXO1g/cqU/wOqd8Qd uAmKesoo27osTsjNntW80/ziUoBurHMK9+ayaEZ8PO2cKJJ4yjsDLonfoxTOKJfStppi Bn4daYKwxi+ytxSuj+Pp/M+p4vWY+uOs3TEgKDeeiQobbSltDLYiqpXOU2Mq1BioN2fQ rgtzQeJDleBWVMO4EW68tcnizGHg6gWuLYxtyxqRE7W08xRkjl4vIPy+szBQKZXRTNPl e85A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=b2FoaTkFR172ODNwxywDb3/dtAhikbK9eu/N7ap6ZAA=; b=s6wiXwXj3cvTdXqYKN57tfHYb8egKeO7HcxLE3aZi0oF6ZYTT1zc7LpBjnjqIdropV sSVHecVdopwVC2m+EYnVFSfnUIppO0FPew5SnfGYM7nfKP0E596zLPrwU5MjkOxSG1s+ Qr5p+Vc86XweGt/s+6s1RwTe/6P+/Re11f6nfwHbhy7jrDFFcqe3p9LlKft6cOKek2+Y JQRSzmPJolaIHzBpZ1jx57hohUVl96BA9T8EtfxCfUg9MfGPbryNAJue9K06HfYmvkiD /kct5/gsa9nOVjklbKWv0rsue/a537DUSAYjr0nbDftF7ugbtB3xREHYeSuMG4hDTtDY e/eQ== X-Gm-Message-State: ANoB5pnuJFQZFT30mDFqSx9tCDRDnX1rNfmDf8RRcpQyRUUCS2ifQitB 84p5k1zapwQDsEJ+lgn65oo= X-Received: by 2002:a05:6a21:e311:b0:ac:9d6b:321a with SMTP id cb17-20020a056a21e31100b000ac9d6b321amr24540122pzc.33.1670870776446; Mon, 12 Dec 2022 10:46:16 -0800 (PST) Received: from google.com ([2620:15c:9d:2:77a6:a092:fc6e:38d3]) by smtp.gmail.com with ESMTPSA id h23-20020aa796d7000000b0056b8181861esm6338531pfq.19.2022.12.12.10.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 10:46:15 -0800 (PST) Date: Mon, 12 Dec 2022 10:46:12 -0800 From: Dmitry Torokhov To: Allen Ballway Cc: dtor@chromium.org, benjamin.tissoires@redhat.com, jikos@kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, rydberg@bitmath.org Subject: Re: [PATCH v2] HID: multitouch: Add quirks for flipped axes Message-ID: References: <20221208165145.1.I69657e84c0606b2e5ccfa9fedbf42b7676a1e129@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221208165145.1.I69657e84c0606b2e5ccfa9fedbf42b7676a1e129@changeid> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 On Thu, Dec 08, 2022 at 04:58:36PM +0000, Allen Ballway wrote: > Certain touchscreen devices, such as the ELAN9034, are oriented > incorrectly and report touches on opposite points on the X and Y axes. > For example, a 100x200 screen touched at (10,20) would report (90, 180) > and vice versa. > > This is fixed by adding device quirks to transform the touch points > into the correct spaces, from X -> MAX(X) - X, and Y -> MAX(Y) - Y. > > Signed-off-by: Allen Ballway > --- > V1 -> V2: Address review comments, change to use DMI match. Confirmed > MT_TOOL_X/Y require transformation and update orientation based on > flipped axes. I think you might need to push the DMI match into i2c-hid driver, and bubble the quirks up here, otherwise if you connect a 2nd USB touchscreen to such a system will also result in the quirk being applied to it as far as I understand. In i2c-hid you can make a fine-grained match on vendor/product and system to limit the quirk to hopefully the right peripheral. Thanks. -- Dmitry