Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6846690rwr; Tue, 25 Apr 2023 04:54:09 -0700 (PDT) X-Google-Smtp-Source: AKy350Ywp9SCHjjjeV/eb5fLaHODKFZVY+TF2WweIMmRK8TftlJen06cTzcMj3+CsD20G4YvVydh X-Received: by 2002:a05:6a20:748b:b0:ef:f5fc:cb44 with SMTP id p11-20020a056a20748b00b000eff5fccb44mr22364214pzd.35.1682423648753; Tue, 25 Apr 2023 04:54:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682423648; cv=pass; d=google.com; s=arc-20160816; b=qpOlfbiNiVepj0BdL1h5u5/l7VcWkEcrcl3rVTj9FeSbYhSQxNffG8GgMllaeeLaHq +ms9364T+4vF+zpDSLaArJIQEw7wDmEBoEn2v+4Fm5jnLdR0WVr5sgF7qFYAU60o5EC+ nsztiYgRksvwIUbb7wyRYFoT884AzPL06JSAi5A6s+ZgxlZFlwJib9gPJsrQNTVQhXly 7j663DxJfk7h86b1TaI/FLfZpwOLxgcdJUDtClLAjJTFoUtSXnRWLCNN4tPJXxwb5Xzd LC3UtsEgUHtPwXLci0ueUlGtjQW5gTivuvCp7JILvuagDRj+vTWSafKPYGuJOnzUTRc8 Tpjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=VPTyOIfb1O2zUDAwkV1u45duNt5qAJy7KGiSnpKrFM0=; b=ztSGHFOWvXRjGS9H+cyrfxEPR/riM6Jbv9SM2YP3WRF7shticPXgjD6BxNcpVAWDAb CFihFcFmjcilRLrwW7C55yJfL/AsrT4UbZdXbEv709UqaH5P9T5hmp3g+jhmCUzO84s5 qVM64soRmZqMidGLWFdJNFEKiB/GHwiQ9UjgcAzNu9jkczUIIV52gywjoUaYCvN4yodx ILfZuxehkXmoQKlBI57e1SBL5B+wD8wxf63AmmVpUVTtQ9l++WIc8eOnXf4yNgCM9U77 qFs2CrG+J3smG1MoMxNiJ3hZjO6NwzZ0a6ydnjQxajaJjuMFeNuv3uGwwrV6V/lq8Rw9 Ph9g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=DjfhgHne; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o3-20020a63fb03000000b004faeaac4dacsi13896800pgh.753.2023.04.25.04.53.52; Tue, 25 Apr 2023 04:54:08 -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=DjfhgHne; 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 S233757AbjDYLv2 (ORCPT + 99 others); Tue, 25 Apr 2023 07:51:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232240AbjDYLv1 (ORCPT ); Tue, 25 Apr 2023 07:51:27 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2063.outbound.protection.outlook.com [40.107.21.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43C62E67; Tue, 25 Apr 2023 04:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IsBsi1ACZb9hCJVKLt/jDMrXfSkYrEhUTiyPOjzKKUW68lkKa1dA/LWMwtt/pG/X0BlKtEvOmMHjD66NWYL2C6eVQShCC07aTzSbeQSdzW5DJeDhAiTy0DKmBiYkqZjb5CPiQu6q3b2J5DTgnJhuMz6q6PkFgDwE2757ZMpXsfSB4IYAJzSTh+cz7+pz+kZJhmLtczGvAqMhnD3dmR5YTaW34l4rWDdeTqfrraN1DSUBHeoQLpqOYOnFX8Kjw1xUcw3AUBUmY8+eZQX7vXMybZ3C67MhHYZh7nndWIBY/KnIKRRYLCsKSjb9WpKSiyiBVinnK8UVsL2s6eMw9vqnEA== 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=VPTyOIfb1O2zUDAwkV1u45duNt5qAJy7KGiSnpKrFM0=; b=evIE1Ie+BEcYH56WgcQTkCgSFhELANYCPI4pfpqZoxyKV4xSnaQOCzhFpfe4/u7T1FJv821guDykT4KJuJBJz71XV+AJUOcP2wGnVo3REiL61IbgoeX4Gln4mKDMv4pgsoqU7EQYYrE/vQ+fCcjHkPAqHsA+YgZaNzQeY3QIgjkvta7FDGNTK70cktcJR1iL5RpfIGH0HRGkcw/xwKy2jT2tw1D2MYd0uMXTrF1ZFqzgB3KZbTPR0ipMQ+/FmwlEiZOZuD7ned9TJ0s+HePCyM6jNtwGOLe1b+eNglcoovnQOxYPUuU6gOj1DYPcHEwp1erMs3P8O0XwXP62U2BSmg== 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=VPTyOIfb1O2zUDAwkV1u45duNt5qAJy7KGiSnpKrFM0=; b=DjfhgHnezzNPY8TuynqPgS4mB+Oy69Bqfer0m1SDw33rnOewDRnzjJZIz5p15muEuG2hCNexFDsZ38050qrBuwNShKdnUDDknLTmFDmQuliN37CUYOrrqbiuCI7yxJLDft9rbtVPumleRk2It1vymk5GymlgWqqV2rLMadywJ9w= 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 DU2PR08MB10203.eurprd08.prod.outlook.com (2603:10a6:10:491::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Tue, 25 Apr 2023 11:51:22 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::6c5a:c28e:206:453]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::6c5a:c28e:206:453%6]) with mapi id 15.20.6319.033; Tue, 25 Apr 2023 11:51:22 +0000 From: Javier Carrasco To: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Henrik Rydberg , Javier Carrasco , Ulf Hansson , Hans Verkuil , Stephen Boyd , Sebastian Reichel , Linus Walleij , Jonathan Cameron , Uwe Kleine-g , Bastian Hecht , Michael Riesch Subject: [RFC v1 0/4] Input: support virtual objects on touchscreens Date: Tue, 25 Apr 2023 13:50:45 +0200 Message-Id: <20230425115049.870003-1-javier.carrasco@wolfvision.net> X-Mailer: git-send-email 2.37.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: VI1P194CA0055.EURP194.PROD.OUTLOOK.COM (2603:10a6:803:3c::44) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DU2PR08MB10203:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a38eb9a-cd53-4fcb-bbf7-08db458363bc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QxO3iKAWDLuQ2otuiBX7Fl12JRXwM5Vv9zlDo8Qt5AZcgxdUQ6S6MO7ntgpPFT7Zk69Amw1F0wVfKjMCASUl3Jhv2m2mv49QpW5VuvJR5lpPDUOpcibs2L5t7QDpciTvESC78YBf/2A0e5TaNy7WEaLlRmZo/lm9FHABxD0mTi/YgybuPpHjGIzUF9dF1T/pnO6nP25afAYt3NVNhfZi+7H6xo9aucvaUrF4FBSh8YArsT+W+uSZT71zfL5mw07mfqWuue5kSQQ1puSq6+WRugj9DOE8XKARnn/Ach5lF8FYkmbc/YiucqyNZ/1O158So+v6XlBmuNNZndg3FElBPRLiVkbr6sVvahZkXTkYpj9rfuVkUxFInxMeDJl0LZ3uIqg1UoCSDPKKbjw9lqBGpkQkeFconn7gmTyt6wB21P0Lrl1A9tBTMukjJhznKMsm7lkgpz2ri71jZ+NGWjaTGvqhaVWkenb2ciIFoKk9kdPPg9uqFw1S/af5xEl/WgmkruEVg1QhSoGH22TChiFL9zvurD4yjuyXixv+bpU8uh/xx9NrPLyuEU689dtmW34ca1WjMfgy57u/coqRA9ahFhE+MRO8BVXuS5JtiUeZpRScHtJypP4n7+gvATDGU6rY 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)(39840400004)(366004)(346002)(396003)(136003)(451199021)(38350700002)(36756003)(8676002)(8936002)(54906003)(66899021)(478600001)(66476007)(66556008)(66946007)(4326008)(7416002)(44832011)(316002)(41300700001)(2906002)(38100700002)(5660300002)(2616005)(86362001)(186003)(26005)(6506007)(6512007)(1076003)(107886003)(52116002)(6486002)(6666004)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?gfuOMJeRYo9mbltgHF9lOme7eEv1T01sOCeONzRH+UjRj+R405U14dPh13ih?= =?us-ascii?Q?on0LoxcUGwSCwrbVobqjbbtch5L2RlBZlFBvx8kvoIE30kt7HhB5QDYa7PIX?= =?us-ascii?Q?2igpAbfUgzHQYUW+gYauLQiwMtYmlVslDN+wYvuTjxF89fBlPJ9+THIdp9lf?= =?us-ascii?Q?26u308oVsNrR130t9bMfVTaRqXFYmk1bR2mWiyHe336CeKwtYnPnTxoEzWld?= =?us-ascii?Q?gmwvydZVDQMAsAQi6j2xB5MlWwh6NFNQkxlGJhl/jnUM/9sr6LuD4eAeRdHV?= =?us-ascii?Q?GW0WNf/ex35RG9hEG+0VkgKWqCCh8wdsfAQrOemFfsJ5DMqeDdTtOilEE0fv?= =?us-ascii?Q?6mkvLv8bxda3QSbI1lNckcsCcb3u2oHlqH3bB3+2Dwq9v8E4DdrKs3r23jqM?= =?us-ascii?Q?JAeZWTM4mvjPCailWk/3DA436y3r3rf5YEdRe3Mh/JdDFmbGQoBPFSSHVlSM?= =?us-ascii?Q?szBSbx/nrBSYMiPdoyIukpvIUyDAPi3FcZi4BrdXYrIu26aEmC7WBR4ygZWF?= =?us-ascii?Q?KHuevhvhdWe70jcOa1PmXloZmXVkRbERiI4Gqm8q6Yf+OtTaicntN+Rf0vI7?= =?us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LA8nE4FW+mbnsM7boh3Q?= =?us-ascii?Q?4pI8Fg2PeU1+MebOIH9DvdxOjDAx6UL/7ospTQt4TmWdZKEorPy4agPwUhIA?= =?us-ascii?Q?N21/VuFnhEp1LZwcJ6i5mKNgFfzjG2i8nAYwNRIgxoKgbLOJcm3u7dZNTxPh?= =?us-ascii?Q?mA=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 7a38eb9a-cd53-4fcb-bbf7-08db458363bc X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2023 11:51:22.1227 (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: l6wSsk58pRWk7GljHOL6oHqqa6e7yT45zXnpv757UAL+bv0umri2KVmHKEqypG/On4zbu351iECZCdLHCVvjkYLKYQdJXY+NdQoTne0hu1I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR08MB10203 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: X-Mailing-List: linux-kernel@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-virtobj provide a simple workflow to acquire physical objects from the device tree, map them into the device driver structures as virtual objects and generate events according to the object descriptions. This solution has been tested with a JT240MHQS-E3 display, which uses the st1624 as a touchscreen and provides two overly buttons and a frame that clips its effective surface. Javier Carrasco (4): Input: ts-virtobj - Add touchsreen virtual object handling to the core dt-bindings: touchscreen: add virtual-touchscreen and virtual-buttons properties Input: st1232 - add virtual touchscreen and buttons handling dt-bindings: input: touchscreen: st1232: add virtual objects to the example .../input/touchscreen/sitronix,st1232.yaml | 28 ++ .../input/touchscreen/touchscreen.yaml | 54 ++++ drivers/input/Makefile | 1 + drivers/input/touchscreen/st1232.c | 41 ++- drivers/input/ts-virtobj.c | 305 ++++++++++++++++++ include/linux/input/ts-virtobj.h | 59 ++++ 6 files changed, 478 insertions(+), 10 deletions(-) create mode 100644 drivers/input/ts-virtobj.c create mode 100644 include/linux/input/ts-virtobj.h -- 2.37.2