From patchwork Wed May 10 13:50:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 681045 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7343C7EE23 for ; Wed, 10 May 2023 13:53:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237125AbjEJNx0 (ORCPT ); Wed, 10 May 2023 09:53:26 -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 ); 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 Date: Wed, 10 May 2023 15:50:47 +0200 Subject: [PATCH 2/4] dt-bindings: touchscreen: add virtual-touchscreen and virtual-buttons properties 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 , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , Bastian Hecht , Michael Riesch Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, Javier Carrasco 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 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 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 --- .../bindings/input/touchscreen/touchscreen.yaml | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) 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 ]