From patchwork Fri Jun 16 07:28:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 693408 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 F038DEB64D8 for ; Fri, 16 Jun 2023 07:29:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245088AbjFPH3X (ORCPT ); Fri, 16 Jun 2023 03:29:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242794AbjFPH3S (ORCPT ); Fri, 16 Jun 2023 03:29:18 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2057.outbound.protection.outlook.com [40.107.7.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 947F526A1; Fri, 16 Jun 2023 00:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O1VKfpJa/YQ6k+SDQ29CAXqb3NivSl76ralwE4y8ldSRkblymxlxAH9R/s4qFJZ8rF7UGlFrUgY4n8CT4ivMKkmsS+H+da4kfWydhqgcBDr3Id3aqqYTdkuhEThFw9r1Axz8oU5fJS0ICp1VoddS58KV9xhjOfOuPgu3bzJNoaf6I3+QfaAWHrTwzcp1j4xDWd1F4QdwOgdZBdCSMSh5DNRBa5mluyguE+Taod3aNXW7PEG5NKnwlQUmu7WhCmUP3/59OnWMKij0uomE8RNQ/b/KNZ6U1Hjnk6Uh/uNsPtZO13IjrwErGoM75jddtpHEW7z+bxOqWshX6CsZYqyDHw== 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=rZZ02nBwROclrbIOV+nWq5Qc43lnwrePpPOoP1llooc=; b=ASf9RM32lzfCigIqTflnulkrkYa5cAHGl0cKG1axCp5GHU4JB/3Ynhr23eNxbc+sthr7vYP7o6adXSebghHGfq6httzoDcwkkDCuqK2VVLe3KqSNOb3bvulJs72vJjYGk7Jz1YgvR4AkqbzUBOZ0GwKG/R1EDTDGVzxNjzYQPMf3w5OyeBeTO2q7sJhAgW4lCuHgHSSU6U4rVfcSMIzgBLEwWBhFEhoZ50gSWQ5OFTs80e4DzRa2E75x1ndhWW4STvkULJ/ZskmdhS1G8DVkFSthxE/v0tUXq1eZBLKf/JeMgAi+AeUX7UbkG0XcGbfp82HIY9kKGvm5blWC04pPRg== 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=rZZ02nBwROclrbIOV+nWq5Qc43lnwrePpPOoP1llooc=; b=b0x0RgWq9mLuOqF+Alfpos22uy8phEjvvvP2WiRcjzFR6zrdrL9j+1R93HrhOE6xUef4LbCbmV0edoIyfSYffFXdaaPG9yO+cVVAGJR2/j72+J+HEOe5v+eOPGo2iMmDvUUzV5q7cnUSLpLbbYgjPbwnYONC4drhVTNqlxaUSD4= 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 GV1PR08MB9916.eurprd08.prod.outlook.com (2603:10a6:150:a6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.37; Fri, 16 Jun 2023 07:29:09 +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.6477.037; Fri, 16 Jun 2023 07:29:09 +0000 From: Javier Carrasco Subject: [PATCH v3 0/4] Input: support overlay objects on touchscreens Date: Fri, 16 Jun 2023 09:28:50 +0200 Message-Id: <20230510-feature-ts_virtobj_patch-v3-0-b4fb7fc4bab7@wolfvision.net> X-B4-Tracking: v=1; b=H4sIADIPjGQC/42PQQ6CMBBFr0K6tqQtUIgr72EMmdap1BhK2lo1h LtbcOmG5ZvJf39mJgG9xUCOxUw8JhusGzNUh4LoAcYbUnvNTAQTFWs4owYhPj3SGPpkfXTq3k8 Q9UBRyLapGQC2NclxBQGp8jDqYRUkWdbUa76uJo/GvrfW8yXzYEN0/rMdkfg63dGXOGW0AWyw4 0oLWZ9e7mF+H5QjRrKak9hrE9lmZAdSGWyBmT/bsixf+OvRpi4BAAA= 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=1686900549; l=2693; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=nJCmx7+oAnKcJw3blXkcdeozwxmBFkx/bSwLYf7svx4=; b=mo73cXEERdQ3eH2i4lT7XpWxtUTiuBvHJ0/QTR1Qqhcfdn0EQawhMY6my1rBj7YNoEfT6tdmg Gz+8RsU5NYqAtLVWajZskcIMgg/R225z12irx1LQ76M9MPFeYN1R0H6 X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: VI1PR07CA0197.eurprd07.prod.outlook.com (2603:10a6:802:3f::21) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|GV1PR08MB9916:EE_ X-MS-Office365-Filtering-Correlation-Id: f6c5d8a1-9c04-41fe-2376-08db6e3b5fd0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ukH8ff34TNoPTgM02naoEVJtmt+RYFLpx6MSEwNUCi/G6883qmyTtGaVrRw8tI+PYViln+qczGAkQ80lWRadGP+SqjCvehDkWkcp7TcxSiW8jEWc5cBdUXZV8kbuvbQT0k6ruhc9C0/F1AQhcmT9/XtrcIaEUn7P2MoDIMwNtI2kGbXq/B/PkeikWkaNbM4EsW9bLCxuTCcmnYTHlCoeKcBmwqmuNMrBC/HqUHfo3IgRlrU0g8GwF8oSsLgPyeLLKRV4nJAfwBdd8208SjirOUVevaZ2G49Vmzag3vF1MHmkfHVogm+nv9eXm2KAMXMWaSHLGnJkewui2VgtyD3xMy8SZwqWebLN0Ukj8KYePbjSFjfjI5IsVNd8ichCZW3GE60Tl2N1PzufSOFJtPegDPdXwbxzeyiV8B0/2+CVSC5d51u7Gz9aB0bg9aEd/zmIfYaPy+6VnKgujg5rG7sLpq4CAAkCyejqhxUzucpsjcj9eayU3l7EAiDAfseNGjanmqcWf5QCMMea+teycf0gzaSVBnpT+0GVubEF/RgbpypdVJDzZTvRGRJSdtI3n6SrAXe6Sh0hLFmrlX95tlzSFO+TbSmlAM5TSAJbYrxaYIfzurgYuXw/teaAJsIIw0rOk/Yo3kVzhLLR+9Pch6YAbA== 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)(376002)(136003)(396003)(366004)(39850400004)(346002)(451199021)(36756003)(86362001)(2906002)(44832011)(66899021)(83380400001)(6486002)(6666004)(186003)(52116002)(107886003)(6512007)(6506007)(26005)(6636002)(66476007)(966005)(110136005)(316002)(41300700001)(38100700002)(4326008)(66556008)(2616005)(38350700002)(66946007)(5660300002)(478600001)(8676002)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?tDEoFHeDvU7iQbbJ/ujEau1HtNsN?= =?utf-8?q?4+Sb4k8/8S6sP+GF7u55q/sBj/Esu3MRX0Q9rhM/kukEEdabdk2qNmC8DalUsIL60?= =?utf-8?q?5EJOagVI1OTDY8sbhHJK8ubnyLTbIMyCnaIn0FAtFIbb11odrpr5VbRTvw+CyRyAI?= =?utf-8?q?6iDvUpBQo7bQS0/hRBBRh64yskScycgHxP7k5daahvswKl2aZPhu9OZkc9nuoL36v?= =?utf-8?q?f+TEtPEesmfp43oJlEoqTCzainrLq4zEKbLisa2c6xl+sjdiiNSYPyoMcP/48LMjl?= =?utf-8?q?E9yHlzuPuIByZEWs8ZaPgLMuKp3swTRnVJtgOHMchtCVLN+LFLh3S6WlXfNB08xIe?= =?utf-8?q?9CyEZVWIpevbaiUjHQ+b+4lpgvBIqwfpBF7lV+wt1KCmUzN255vappnpYsC1UAFfE?= =?utf-8?q?jwbe69nLl02eklCYCFNdeWci0zZHaRQaC72P/bwZZb0NkzUnbNazjXfPcH0Xsk5g4?= =?utf-8?q?vSQa9LpHhQYE0pmWxriaR9U5pCH0nDZe5j00k9+pacZSLf0WfWVKM2BRQT/VWH4te?= =?utf-8?q?aOb6DOsCDWFdEbQU7TORnCwiQhRxnRE8HhfIaPqGra6h5fBZ5w3UJrgvhBfBE60R/?= =?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?hlLKTrfvWxgEW0sxeDvLpzSYnn86w6zofl9akv/+pCjiwegF43tjS1lhldWUuoW2c?= =?utf-8?q?iAINWcuoqGekb7nRzXcfAoARn2XlXdeHKQ=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: f6c5d8a1-9c04-41fe-2376-08db6e3b5fd0 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2023 07:29:09.3829 (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: 4pAG2fegUuT27JC8plROeHJKfZdlWk9QzU7SOJTwa7h6YNB96x7/KaAqBntlVZyWZ9w//qdCcMpDcj2PRyDXsA2zwyFDoGmahD9TuS5Aeg4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB9916 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Some touchscreens are shipped with a physical layer on top of them where a number of buttons and a resized touchscreen surface might be available. In order to generate proper key events by overlay buttons and adjust the touch events to a clipped surface, these patches offer a documented, device-tree-based solution by means of helper functions. An implementation for a specific touchscreen driver is also included. The functions in ts-overlay provide a simple workflow to acquire physical objects from the device tree, map them into the device driver structures as overlay objects and generate events according to the object descriptions. This feature has been tested with a JT240MHQS-E3 display, which consists of an st1624 as the base touchscreen and an overlay with two buttons and a frame that clips its effective surface mounted on it. Signed-off-by: Javier Carrasco --- Changes in v3: - General: rename "virtobj" and "virtual" to "overlay" - PATCH 1/4: Make feature bool instead of tristate (selected by supported touchscreens) - Link to v2: https://lore.kernel.org/r/20230510-feature-ts_virtobj_patch-v2-0-f68a6bfe7a0f@wolfvision.net Changes in v2: - PATCH 1/4: remove preprocessor directives (the module is selected by the drivers that support the feature). Typo in the commit message. - PATCH 2/4: more detailed documentation. Images and examples were added. - PATCH 3/4: select ts-virtobj automatically. - Link to v1: https://lore.kernel.org/r/20230510-feature-ts_virtobj_patch-v1-0-5ae5e81bc264@wolfvision.net --- Javier Carrasco (4): Input: ts-overlay - Add touchscreen overlay object handling dt-bindings: touchscreen: add overlay-touchscreen and overlay-buttons properties Input: st1232 - add overlay touchscreen and buttons handling dt-bindings: input: touchscreen: st1232: add example with ts-overlay .../input/touchscreen/sitronix,st1232.yaml | 40 +++ .../bindings/input/touchscreen/touchscreen.yaml | 139 ++++++++ MAINTAINERS | 7 + drivers/input/touchscreen/Kconfig | 10 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/st1232.c | 87 +++-- drivers/input/touchscreen/ts-overlay.c | 356 +++++++++++++++++++++ include/linux/input/ts-overlay.h | 43 +++ 8 files changed, 665 insertions(+), 18 deletions(-) --- base-commit: ac9a78681b921877518763ba0e89202254349d1b change-id: 20230510-feature-ts_virtobj_patch-e267540aae74 Best regards,