[2/4] dt-bindings: touchscreen: add virtual-touchscreen and virtual-buttons properties
Message ID | 20230510-feature-ts_virtobj_patch-v1-2-5ae5e81bc264@wolfvision.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3642559vqo; Wed, 10 May 2023 06:57:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ihbhMO+wl9rsKiPZmsicYUexibAo8iCTOuLzk6ngqbooF6A5BVkQgWRXzO/DKZJpC9uao X-Received: by 2002:a17:90a:1503:b0:24e:14a4:9b92 with SMTP id l3-20020a17090a150300b0024e14a49b92mr20227706pja.5.1683727022505; Wed, 10 May 2023 06:57:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683727022; cv=pass; d=google.com; s=arc-20160816; b=Vg7j1/O9VFmLFWjr0tVRG6gPjpNsjHQQw2yBL3FQduG5hX2YDAIlntK2g+xydOxnjY 3NcvEABHyg1U1T/nvXeXQ6Vfzuh8r50ztL14IGNSfaMc5ztfvNVnLlo3mQvW5h0og8Is 1I1VDOVlbpz9Vm9dcW1uqyOVP+pbOuBwAzUfTx+68yzhfMId0SN28w19giM8Q7KJQ8JK C4v7rIRoW4xTzkwzkP7/WJnvgNGpJTSt1r7al96bgS2d8vQH9X+JcL8NLiB5RoEOwNaU w16IhUNSYX3HSGChWNMtTPHWyrDOFmDjHhj/y01XCovaNGHTwlUzMQL+64OuWrIyFHzt 6o7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:cc:to:in-reply-to:references :message-id:content-transfer-encoding:subject:date:from :dkim-signature; bh=Ke1LFs/dT6GQmzTiLzBym6UON1WUtBhFgAWU2ef3oII=; b=CcuZU1vM/GJDe9E74NHWz7dUIBiWibMfyvhI0eJSDWIzKW+UrRpw7WMReBRcukmBaE c2axwCXzUfbnQYpbLgUDuZSDzWd4q4AEg354pmFVzxUT9o9k0dHZnKuwJcVMEnsrg0ai 1ZO+9lmMnuwiEXB1tqSSmue2C6AmH7O9Obe0flyJ6GIKbEPPfF5RlSmH4BkouKWPA3n6 jlmGJszwNsOIwk6AvV2OHdON6mDbCKaa0c4W1tWzBjqPsnKv8iXnS8KM8OBRshHs4EBV zlF7Sy5Vc88OxvKJqow2SQ6LmQd/k7HF8XPyzSKYIOGZRKONzqSnxi59tJhDl9oZ/iue 6FPg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=Lc4CNG02; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f15-20020a63754f000000b0052c54de029csi4136570pgn.591.2023.05.10.06.56.49; Wed, 10 May 2023 06:57:02 -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=@wolfvision.net header.s=selector2 header.b=Lc4CNG02; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237364AbjEJNx1 (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Wed, 10 May 2023 09:53:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236995AbjEJNxB (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 10 May 2023 09:53:01 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2067.outbound.protection.outlook.com [40.107.20.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 733C5D2FC; Wed, 10 May 2023 06:52:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mLCUt4bmIKBALLZBRKI+ZiqkRGi80j4+BLwgK7vJbg5fpl29lVq5E90es1OZc1xo23fibAdsoO0vx8qxJm7H4p7Yd435T+cc5jUb6MLb5lS5J0I1NB1NOqXqtzZPtS6LlDTqTpC/h/TjNAk/C/IKNBV+DbYqwaXHd9wy2DXrBqTy+cTk5q5g/qCBQGcdTaWQ/AjwNgImd8aj+xTyGKP712sEBQemmonOJ1tsyNtYejucLS4tyATn0/sm9sF4kMJ8UWN0EYVIgVYD/PoV2mMlMkJM21qQckiluRRMIB5BUSqqu1wM1stej4VJC1M66Bkd72jY1xb88bXpgDzvWtDaPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ke1LFs/dT6GQmzTiLzBym6UON1WUtBhFgAWU2ef3oII=; b=UbQG/LXfS6DvylAJHwES5A6k/zbqXwB9XgOMaagPynv+vKJ3FYQmCwS7U0qCcWA72FUkq6qIfASuyrmirXllw7O1D+qGdIzNRCjSmyPBq19lTyaz+iy+PUsMSxzMm8M+k4hz3Xumfwd+xVngGElDhMZ2grNPfrWRVoNl2HuzELAf7pUI7SvexPPXfcjwsXR1OpWA1f2ZlGNFrmIxMGlcU32ExbTJmPD425071X4yeF/drXgxLpVdSI9J/fyMsSMdkRu7GySEZF0ONkywtuL43SXs8HNoZr8XN7GYU3thGVyOizKF8DePWgISHEZQQXFEUvQ/yMHhyC15jVAlb8lq1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ke1LFs/dT6GQmzTiLzBym6UON1WUtBhFgAWU2ef3oII=; b=Lc4CNG02Ekn652HwjAq6oiX/q9lZK91e3gL8l/YeceWWH/5wLJ0FyI3j1mP6z23U14vRvm2MBx/SaG+IfrCTj0QMuc9vWdNHgvE+BGzjKTVn1+o20HL6SsrUYQKGfrCvcJnM/j6CrxzNIoRXDapZyKdfbkgah7jczXGhI2Uh2Tc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by PAWPR08MB10212.eurprd08.prod.outlook.com (2603:10a6:102:369::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.19; Wed, 10 May 2023 13:51:12 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::bd0e:a139:9e67:b86d]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::bd0e:a139:9e67:b86d%4]) with mapi id 15.20.6387.019; Wed, 10 May 2023 13:51:12 +0000 From: Javier Carrasco <javier.carrasco@wolfvision.net> Date: Wed, 10 May 2023 15:50:47 +0200 Subject: [PATCH 2/4] dt-bindings: touchscreen: add virtual-touchscreen and virtual-buttons properties Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230510-feature-ts_virtobj_patch-v1-2-5ae5e81bc264@wolfvision.net> References: <20230510-feature-ts_virtobj_patch-v1-0-5ae5e81bc264@wolfvision.net> In-Reply-To: <20230510-feature-ts_virtobj_patch-v1-0-5ae5e81bc264@wolfvision.net> To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Henrik Rydberg <rydberg@bitmath.org>, Bastian Hecht <hechtb@gmail.com>, Michael Riesch <michael.riesch@wolfvision.net> Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, Javier Carrasco <javier.carrasco@wolfvision.net> X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1683726670; l=2958; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=oif59evYmkWx/9LoiD8k2HlA1dSFIUUqMXLuvbr2Lqk=; b=PzFUqKYA9spA9HVPy0NQowGVPFY6XWsf+m5guzxZwONFkKWUt0v51cT/CTBChNhfn1/QXPMIR tWxcavHOxBlCm72auxFBBbSha80HbYL6raye9SIZjOqvw5UJgLUnRI1 X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: VI1PR0102CA0093.eurprd01.prod.exchangelabs.com (2603:10a6:803:15::34) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|PAWPR08MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: 63ecf529-b5b4-4ce9-0505-08db515d9d8f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0RIv+VKXC3HObnyQvw+BDinCebPoI9inh0dLbujFdWKLvXGtc4wxhVkNHOc8KU2TcnyPtMPncou+a8yzobz82HSpzzzvLjqz73MIwy5l4OMxlqjdWAT6N+2CS9VH+aBGvPwt9EAew+VlTipPW6egH8m22Tn6qv+nGWrpVu8LIJ+8k+Tl+mPUlUfyYDW2Y1Lp4uy0s1lHuEiST3fHVjQM+BCjR3k03+LHafTd9FVUFuZPWi6zYoNhZQxY3j4hWB6U7S5SgrhUwdzUYQzVqeMDDAe/Q9UWxSfTZQYyEdfUrpzwk4iMGEloylOGk1QJw/5rgkvXklaautfP/NsdpKT1Z6ZeVwNbtuvV21HTg/TD0zlW2LxjmIGZP1feGBp48waD/lVtz51u2srgBjsmfUny+y6beO/i/D3KYOFvn68tb1aakCPRLAaulVDZZxPffhY09C1PYR8SIR3iCiRLSe0xr0kYICvhSwZrxTiONQuRZJFtYNMFl+Zy/uyLfAuVP7OM9W3QNZP9CXWb+sVq4CeHHKXuqU7MgdsnGhAQc6dwhw5TyDJ/XLx0J8yEjmYvmhqodQOjDz6bGwjGVQWNdzvYoddIsOyVQQGY0sUR4997mEa7xgilXD2j4/CG0lUpTPCD X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(346002)(376002)(136003)(39850400004)(396003)(451199021)(86362001)(36756003)(6666004)(110136005)(316002)(6636002)(4326008)(66476007)(52116002)(478600001)(66946007)(66556008)(6486002)(41300700001)(5660300002)(44832011)(8936002)(8676002)(2906002)(38100700002)(38350700002)(186003)(2616005)(26005)(6512007)(107886003)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?cK8vAFYivq+0BfQ68bl/3oXGx+td?= =?utf-8?q?IVdjriQ01ncvKXxPHGTrYXyE3eML2b+aXetD87HN7iOY+P6BrcQe83wGe8FztFUtG?= =?utf-8?q?Hi7oB6sKJ9CEbX1msMCqgxC79KBleIHCelQK7MSNoaL0Z7cFhU3MQGKKzjLXQtHvN?= =?utf-8?q?XLMzY0mN3vDPK8TiSt2PPukCHYzCWBMqLqHYI+FnaDFtBizC6sAgToKo8/rjeg0yg?= =?utf-8?q?9qI3YHsjvypE3KJFVJ6TnPLZkB8uVP0SRNYyES0XnCrAuUstPuioHWUXD7tdKWrp5?= =?utf-8?q?xq0yUN3tyHcPU/txIw7cgzKE1qZbWz5+xC89cDQ524UAG7QWymmnc3FD4Dw9DVR3D?= =?utf-8?q?fdtqgshHdnZUQVTdjeZEzt3gGIfOz/fCG5y9zg11zukW2UZLbQxzmthJqaLDuFxGI?= =?utf-8?q?XgtGeX4wkVxn6qgf/MO9ifvYo+QxwL0xta3BwnUGJR22lcOhUuGfSsuan/DD2umMA?= =?utf-8?q?/UJtKKzTHKWcxlX7lVZ37JdTfbdclwUupYH6L9hH1iF8Bl4oi3LWEDkFrrMAXWBS7?= =?utf-8?q?ehU92c7ZUhFdhhTotJsQq+0JEPKHm3Cdbc1qaqSVbh2DZ33hMBb2jD5NXeTIb8IH8?= =?utf-8?q?DUmlKqH3LAaQMXlREy829crxGofLDBwNXjSTZIURobY9X2vx1iu8hl2byU5TL4tb2?= =?utf-8?q?Umt2p5FVVuhjl9Vu47hKbiGMqhLbcw7+pSOUReAUQfwOF1BnGkojVxiWaEmoSGV6i?= =?utf-8?q?KVYG4YwdiWP5uMNmU/QQ9j1huUxQ1gWA70ljLwEL80FdfcdBvVQ4C24LVi7/LFb+5?= =?utf-8?q?M3Yb+LTOgQ+xMlKvM1fD4VWo/u121Lkvw8hH2SPTOttHTHNN/dBRherDT4+OSpIZM?= =?utf-8?q?cSxG0tTCp3nXYbvXjYCNmC3wXR/QmwTiYjEVKm6X/G1NxMZ7VOwsfzCMKcjLNyQh3?= =?utf-8?q?9qdMmSRKay4zx4muYwva6FacjnLiIYNwFWulb4aHtjYqB2WbUJGlazDqT/ZkmKoDu?= =?utf-8?q?F3uOBdraJzmDDrkWiuinS9wXUbvJdMdpoED03AImZrvYFbDO+ETXymPbxIFgTYZSR?= =?utf-8?q?82O0LtGW/lr92BTviY9bZLyoSpHw2DmCxNEhLYGx8l9NctLgrVTnHw/EKyEIKxM5b?= =?utf-8?q?L3kvJ4lHiLXFv9VK1SzrQSmhPydHga1vmtBa/q/8bDCnyuP5liXNqvpVKgYf5V3IM?= =?utf-8?q?mCpDoJoM3cFNT96g8gpcCBLwMf1GgibO7XuBAf8uHPFSurhllHKHLmuZe80iq1CKj?= =?utf-8?q?WOH+N9xCDY6tElMYP3j62HrfTg84eOX22JcR8MJ/+HHaJJUGw1oUCOH40Krl2zyuf?= =?utf-8?q?mPI+5rzgIxiMqxmYKmlPeXfBIxepDLKb5YqUka5vychp5kBiBEHzp3K9vhYIp6O1M?= =?utf-8?q?ZNcqZvER+bdXatpUtg7d/ZweGb+MhuNQHdX/lvxJvrUkcStwrrzNjLSJjk8+AUls2?= =?utf-8?q?T0dRyZS7MZH4VKZakUeV9X+6ljyb9Z8XOU5G6BNPWIhnpl571HR/OtNK2xkETCaW0?= =?utf-8?q?x4ZF/r+sp8w5IwlWQH1ytMUSDTFEvX9Mw04frTN8i5yf0hQpAlTLz6pM3FcQ3V5AS?= =?utf-8?q?VuNDVFhhO3RUBuFCh0/5VFS4sMlNPla1UFhzfSeRn7NpsxyTyWVeWKA=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 63ecf529-b5b4-4ce9-0505-08db515d9d8f X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2023 13:51:12.1890 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: o99MtG53dc4xH/rpmLiIf2UvdN+wyhCxrk/bzVG8IHPjwsa4Spz+OOOBVdwPnFNb90OJbZUgt5aq6s+TUQRd5jTX/gaOonbCTGJMIWjkNQA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB10212 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765515746249832083?= X-GMAIL-MSGID: =?utf-8?q?1765515746249832083?= |
Series |
Input: support virtual objects on touchscreens
|
|
Commit Message
Javier Carrasco
May 10, 2023, 1:50 p.m. UTC
The virtual-touchscreen object defines an area within the touchscreen
where touch events are reported and their coordinates get converted to
the virtual origin. This object avoids getting events from areas that
are physically hidden by overlay frames.
For touchscreens where overlay buttons on the touchscreen surface are
provided, the virtual-buttons object contains a node for every button
and the key event that should be reported when pressed.
Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
---
.../bindings/input/touchscreen/touchscreen.yaml | 54 ++++++++++++++++++++++
1 file changed, 54 insertions(+)
Comments
On 10/05/2023 15:50, Javier Carrasco wrote: > The virtual-touchscreen object defines an area within the touchscreen > where touch events are reported and their coordinates get converted to > the virtual origin. This object avoids getting events from areas that > are physically hidden by overlay frames. > > For touchscreens where overlay buttons on the touchscreen surface are > provided, the virtual-buttons object contains a node for every button > and the key event that should be reported when pressed. Hm, I don't understand - are these separate physical buttons? If so, why would they be part of touchscreen? Where do the wires go? > > Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net> > --- > .../bindings/input/touchscreen/touchscreen.yaml | 54 ++++++++++++++++++++++ > 1 file changed, 54 insertions(+) > Best regards, Krzysztof
On 11.05.23 11:45, Krzysztof Kozlowski wrote: > On 10/05/2023 15:50, Javier Carrasco wrote: >> The virtual-touchscreen object defines an area within the touchscreen >> where touch events are reported and their coordinates get converted to >> the virtual origin. This object avoids getting events from areas that >> are physically hidden by overlay frames. >> >> For touchscreens where overlay buttons on the touchscreen surface are >> provided, the virtual-buttons object contains a node for every button >> and the key event that should be reported when pressed. > > Hm, I don't understand - are these separate physical buttons? If so, why > would they be part of touchscreen? Where do the wires go? Those buttons are actually printed on some overlays which are mounted on top of the touchscreen and they are used to provide a predefined functionality to that touchscreen region. Any touchscreen with such a physical overlay with buttons printed on them or clipped touchscreen areas might use this functionality. These buttons are actually physical i.e. printed and with a given functionality, but still part of the touchscreen as the physical device is not aware of them. Therefore they only make sense in the touchscreen context. > >> >> Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net> >> --- >> .../bindings/input/touchscreen/touchscreen.yaml | 54 ++++++++++++++++++++++ >> 1 file changed, 54 insertions(+) >> > > Best regards, > Krzysztof >
On 11/05/2023 12:28, Javier Carrasco wrote: > On 11.05.23 11:45, Krzysztof Kozlowski wrote: >> On 10/05/2023 15:50, Javier Carrasco wrote: >>> The virtual-touchscreen object defines an area within the touchscreen >>> where touch events are reported and their coordinates get converted to >>> the virtual origin. This object avoids getting events from areas that >>> are physically hidden by overlay frames. >>> >>> For touchscreens where overlay buttons on the touchscreen surface are >>> provided, the virtual-buttons object contains a node for every button >>> and the key event that should be reported when pressed. >> >> Hm, I don't understand - are these separate physical buttons? If so, why >> would they be part of touchscreen? Where do the wires go? > Those buttons are actually printed on some overlays which are mounted on > top of the touchscreen and they are used to provide a predefined > functionality to that touchscreen region. Any touchscreen with such a > physical overlay with buttons printed on them or clipped touchscreen > areas might use this functionality. > > These buttons are actually physical i.e. printed and with a given > functionality, but still part of the touchscreen as the physical device > is not aware of them. Therefore they only make sense in the touchscreen > context. So basically you still have the same touchscreen under the buttons and these are not separate devices. Whether someone put a sticker on touchscreen, does not really change hardware behavior and it's up to system to handle this. What you are trying to do here is to create virtual buttons through Devicetree and DT is not for that. Best regards, Krzysztof
Hi Krzysztof, On 5/12/23 08:25, Krzysztof Kozlowski wrote: > On 11/05/2023 12:28, Javier Carrasco wrote: >> On 11.05.23 11:45, Krzysztof Kozlowski wrote: >>> On 10/05/2023 15:50, Javier Carrasco wrote: >>>> The virtual-touchscreen object defines an area within the touchscreen >>>> where touch events are reported and their coordinates get converted to >>>> the virtual origin. This object avoids getting events from areas that >>>> are physically hidden by overlay frames. >>>> >>>> For touchscreens where overlay buttons on the touchscreen surface are >>>> provided, the virtual-buttons object contains a node for every button >>>> and the key event that should be reported when pressed. >>> >>> Hm, I don't understand - are these separate physical buttons? If so, why >>> would they be part of touchscreen? Where do the wires go? >> Those buttons are actually printed on some overlays which are mounted on >> top of the touchscreen and they are used to provide a predefined >> functionality to that touchscreen region. Any touchscreen with such a >> physical overlay with buttons printed on them or clipped touchscreen >> areas might use this functionality. >> >> These buttons are actually physical i.e. printed and with a given >> functionality, but still part of the touchscreen as the physical device >> is not aware of them. Therefore they only make sense in the touchscreen >> context. > > So basically you still have the same touchscreen under the buttons and > these are not separate devices. Whether someone put a sticker on > touchscreen, does not really change hardware behavior and it's up to > system to handle this. What you are trying to do here is to create > virtual buttons through Devicetree and DT is not for that. I have already addressed a similar statement here: https://lore.kernel.org/lkml/20230504042927.GA1129520@quokka/t/#m1a93595c36535312df0061459a1da5e062de6c44 but let me extend this comment a bit. The notion of "someone putting a sticker on touchscreen" does not really reflect the use case we have in mind. We are talking about devices that are shipped from the factory in a particular configuration, e.g., +-----------------------+---------+ | | power | | | button | | touchscreen +---------+ | (behind: display) | return | | | button | +-----------------------+---------+ Here, the real touchscreen is larger than the display. The display is behind the "touchscreen" part. Behind the buttons there are symbols engraved in metal or printed foils or what not. I just would like to make it clear that these symbols are not going to change. We believe that the engraved or printed symbols actually define the (expected) hardware behavior. Of course there is a virtual notion to that, and of course it would be possible to let the power button work as return button and vice versa in software. However, the user sees the engraved or printed symbols (which are not going to change) and expects the device to react appropriately. Now if you suggest that the system (that is user space, right?) should handle this, then the question would be which component is supposed to handle the touchscreen events and react accordingly. I don't have an answer to that and hope I don't need to find one. But independent of that, a configuration file is required that defines the area of the virtual buttons etc. Wouldn't this be similar to the (mostly) beloved xorg.conf containing the definitions of input devices? Best regards, Michael
On 12/05/2023 09:08, Michael Riesch wrote: > Hi Krzysztof, > >>> These buttons are actually physical i.e. printed and with a given >>> functionality, but still part of the touchscreen as the physical device >>> is not aware of them. Therefore they only make sense in the touchscreen >>> context. >> >> So basically you still have the same touchscreen under the buttons and >> these are not separate devices. Whether someone put a sticker on >> touchscreen, does not really change hardware behavior and it's up to >> system to handle this. What you are trying to do here is to create >> virtual buttons through Devicetree and DT is not for that. > > I have already addressed a similar statement here: > https://lore.kernel.org/lkml/20230504042927.GA1129520@quokka/t/#m1a93595c36535312df0061459a1da5e062de6c44 > but let me extend this comment a bit. > > The notion of "someone putting a sticker on touchscreen" does not really > reflect the use case we have in mind. We are talking about devices that > are shipped from the factory in a particular configuration, e.g., > > +-----------------------+---------+ > | | power | > | | button | > | touchscreen +---------+ > | (behind: display) | return | > | | button | > +-----------------------+---------+ > > Here, the real touchscreen is larger than the display. The display is > behind the "touchscreen" part. Behind the buttons there are symbols > engraved in metal or printed foils or what not. I just would like to > make it clear that these symbols are not going to change. > > We believe that the engraved or printed symbols actually define the > (expected) hardware behavior. Of course there is a virtual notion to > that, and of course it would be possible to let the power button work as > return button and vice versa in software. However, the user sees the > engraved or printed symbols (which are not going to change) and expects > the device to react appropriately. OK, I actually missed the concept that display is not equal to the touchscreen ("screen" actually suggests display :) ). In your case here it sounds good, but please put some parts of this description into this common binding. The sketch above is nice, especially if you can point where the virtual origin x/y are. Picture is thousands words. > > Now if you suggest that the system (that is user space, right?) should > handle this, then the question would be which component is supposed to > handle the touchscreen events and react accordingly. I don't have an > answer to that and hope I don't need to find one. But independent of > that, a configuration file is required that defines the area of the > virtual buttons etc. Wouldn't this be similar to the (mostly) beloved > xorg.conf containing the definitions of input devices? If the case was a bit different - e.g. display is everywhere - I could easily imagine that on the device rotation you want to move (re-position) the buttons. Or if user has some accessibility option enabled, you want bigger buttons. Then it would be a prove that it must be configured and managed from user-space. How, I don't know. Best regards, Krzysztof
Hi Krzysztof, On 5/12/23 09:20, Krzysztof Kozlowski wrote: > On 12/05/2023 09:08, Michael Riesch wrote: >> Hi Krzysztof, >> >>>> These buttons are actually physical i.e. printed and with a given >>>> functionality, but still part of the touchscreen as the physical device >>>> is not aware of them. Therefore they only make sense in the touchscreen >>>> context. >>> >>> So basically you still have the same touchscreen under the buttons and >>> these are not separate devices. Whether someone put a sticker on >>> touchscreen, does not really change hardware behavior and it's up to >>> system to handle this. What you are trying to do here is to create >>> virtual buttons through Devicetree and DT is not for that. >> >> I have already addressed a similar statement here: >> https://lore.kernel.org/lkml/20230504042927.GA1129520@quokka/t/#m1a93595c36535312df0061459a1da5e062de6c44 >> but let me extend this comment a bit. >> >> The notion of "someone putting a sticker on touchscreen" does not really >> reflect the use case we have in mind. We are talking about devices that >> are shipped from the factory in a particular configuration, e.g., >> >> +-----------------------+---------+ >> | | power | >> | | button | >> | touchscreen +---------+ >> | (behind: display) | return | >> | | button | >> +-----------------------+---------+ >> >> Here, the real touchscreen is larger than the display. The display is >> behind the "touchscreen" part. Behind the buttons there are symbols >> engraved in metal or printed foils or what not. I just would like to >> make it clear that these symbols are not going to change. >> >> We believe that the engraved or printed symbols actually define the >> (expected) hardware behavior. Of course there is a virtual notion to >> that, and of course it would be possible to let the power button work as >> return button and vice versa in software. However, the user sees the >> engraved or printed symbols (which are not going to change) and expects >> the device to react appropriately. > > OK, I actually missed the concept that display is not equal to the > touchscreen ("screen" actually suggests display :) ). In your case here > it sounds good, but please put some parts of this description into this > common binding. The sketch above is nice, especially if you can point > where the virtual origin x/y are. Picture is thousands words. I think this can be arranged :-) >> Now if you suggest that the system (that is user space, right?) should >> handle this, then the question would be which component is supposed to >> handle the touchscreen events and react accordingly. I don't have an >> answer to that and hope I don't need to find one. But independent of >> that, a configuration file is required that defines the area of the >> virtual buttons etc. Wouldn't this be similar to the (mostly) beloved >> xorg.conf containing the definitions of input devices? > > If the case was a bit different - e.g. display is everywhere - I could > easily imagine that on the device rotation you want to move > (re-position) the buttons. Or if user has some accessibility option > enabled, you want bigger buttons. Then it would be a prove that it must > be configured and managed from user-space. How, I don't know. I fully agree here. If user space is able to draw the symbols, then naturally it is also responsible for handling the events appropriately. This could happen in an application with a GUI or on display manager/compositor level (e.g., weston controller or similar). But I take it that for the situation sketched above the device tree approach is the correct one. Documentation should be improved, though. Best regards, Michael
diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml index 895592da9626..869be007eb6f 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml @@ -80,6 +80,60 @@ properties: touchscreen-y-plate-ohms: description: Resistance of the Y-plate in Ohms + virtual-touchscreen: + description: Clipped touchscreen area + type: object + + properties: + x-origin: + description: horizontal origin of the clipped area + $ref: /schemas/types.yaml#/definitions/uint32 + + y-origin: + description: vertical origin of the clipped area + $ref: /schemas/types.yaml#/definitions/uint32 + + x-size: + description: horizontal resolution of the clipped area + $ref: /schemas/types.yaml#/definitions/uint32 + + y-size: + description: vertical resolution of the clipped area + $ref: /schemas/types.yaml#/definitions/uint32 + + virtual-buttons: + description: list of nodes defining the buttons on the touchscreen + type: object + + patternProperties: + '^button-': + type: object + description: + Each button (key) is represented as a sub-node. + + properties: + label: + $ref: /schemas/types.yaml#/definitions/string + description: descriptive name of the button + + linux,code: true + + x-origin: + description: horizontal origin of the button area + $ref: /schemas/types.yaml#/definitions/uint32 + + y-origin: + description: vertical origin of the button area + $ref: /schemas/types.yaml#/definitions/uint32 + + x-size: + description: horizontal resolution of the button area + $ref: /schemas/types.yaml#/definitions/uint32 + + y-size: + description: vertical resolution of the button area + $ref: /schemas/types.yaml#/definitions/uint32 + dependencies: touchscreen-size-x: [ touchscreen-size-y ] touchscreen-size-y: [ touchscreen-size-x ]