Message ID | 20240320-feature-ts_virtobj_patch-v8-0-cab6e7dcb1f6@wolfvision.net |
---|---|
Headers | show
Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2094.outbound.protection.outlook.com [40.107.22.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B04223DE; Wed, 20 Mar 2024 07:58:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.94 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710921501; cv=fail; b=g+br8cX9V7R9lIjPfhEYBaFMfofeY7NuzgejspMzAH7YfuVO3y4NP2XMHyXb5pQSrfYkGod/omHIBCFC78epuAhD4+PAZS5rCxBwvv+ChUacFmdf7sXguOqCKyPjY5HmcG5b9m64TL8U9wipCa7GoID/F/Dqo6vxXXVdXikPvC8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710921501; c=relaxed/simple; bh=GlXHoFVfGs9c9meh5vV5ej7K7i+w66XzdRkU6vn5rT8=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=tKXTIGHcpRQjBs9XdDQrEq/HZsWdCZpouBK36SgBKe/4k9rBiaw/5zWjKb1r7ReSVHZtBgJPkq4VUmyTP1+eMX4VmeKfuVJWd53FINL1EonZo1fvrppMDcGQBQtlN1Jw6wnOorW6hVm4+LTObljRzCGRKr2tPR7CMo5U3i1BUAc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net; spf=pass smtp.mailfrom=wolfvision.net; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b=tZQfs4ZA; arc=fail smtp.client-ip=40.107.22.94 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="tZQfs4ZA" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OuMZYo9rM5pnvw6xcvp74T4t2mKbANtN7eFSEmGiJQXKBBTcHs6+VwX2pU6rv3L3cP501W2O7xqpRrtE2tS80P5jJLUCpFXtj2+rK0F1IV3PIX79xWJGPAARWdsT3C/lAx7WPdUru7SXM31Iddk0RwMhW4f3jQbHNwRe+DNONRAkDalZl7Dz5B5ejJIsTpN8hRbrSs+miY0t7t7HBwwoVoSY0PH6FYaemvKOLolpguMBt1wodBkxlmwpkvy7BeVjszcJSVjdoPg+JuNGvD5bZLm4u6VCx8DvPxE2Txbj8udTsekd07hM7IG1H1Z+17MtVO7sLHQEfogwQs8ZBZSY7w== 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=gfUv06jq+gQwKaV4aUPQ0Dxm3R5jrT8vL39k44yvgbo=; b=MBCsV5km+1hchVvD47BjTUpnZ9H5iGUnosvQd+pK3rWMdxNngA4Wq3v2Gc/kdOdtoKREmc7oqbE8AHcHvJBAk5rSX5T38AVoRFcSX5NYU1lMA2a+hdl/lKcDe5RLBVUhrjYnuBRObNhNDK5tSlOq4xqBDxXoIS5LPC5pvMvSHhG7vwqROZi7CRuNJiPPNae9fZ6lXlX/zFVGdGMORYL91C2Nw6rfW2lxhFPL5b/LZuIWy+bzUO/tXctQpdeeyX8Fq2ecg1YejUK5HH5YZQU4CP9A9PlWdaCWQcTjoIYmN6UoEehDpI0iKdwCVqIYsSwJhvxOB3uDF5nVMGj64iTRpA== 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=gfUv06jq+gQwKaV4aUPQ0Dxm3R5jrT8vL39k44yvgbo=; b=tZQfs4ZApaxagWEorB9enqiT6FyFrau2C/rM77ARLqBV6gW93sij8LkoGxKGHeQMwBNoeSQRZ0VEye4TzSwxS4fGWnd7VVD0zaK4XPogb83mmU4Yc0zPgGrnJsZwfb+reE+Xce8uI++/QzfiFBeZg5dOa8J7jDxocqE6bGL4KNI= 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 DB4PR08MB8056.eurprd08.prod.outlook.com (2603:10a6:10:387::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Wed, 20 Mar 2024 07:58:11 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7386.025; Wed, 20 Mar 2024 07:58:11 +0000 From: Javier Carrasco <javier.carrasco@wolfvision.net> Subject: [PATCH v8 0/4] Input: support overlay objects on touchscreens Date: Wed, 20 Mar 2024 08:58:05 +0100 Message-Id: <20240320-feature-ts_virtobj_patch-v8-0-cab6e7dcb1f6@wolfvision.net> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAA2X+mUC/43QTW7DIBAF4KtErEsEmB8nq96jiiIGDzVVZUdAa KvIdy+ky3rB8oHmGx4PkjAGTOR8eJCIJaSwLjWMLwfiZru8Iw1TzUQwMTDFGfVo8z0izelaQsw rfFxvNruZotBGSWYtGknqONiEFKJd3NyAoo+SRsfb1S2iD9/PrW+XmueQ8hp/no8ovJ127CucM qosKhw5OKHl69f66f8aHBfMpMlF9Gqial6PVoNHY5nf1YZebagaSA/GOwkWzK4mezXZmjrtmHc ccdK7murVVGvqNSgnJ9CnYVfTvZqu2lS/jamTUVz917Zt+wWnlyMfZgIAAA== To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Bastian Hecht <hechtb@gmail.com>, Michael Riesch <michael.riesch@wolfvision.net> Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Javier Carrasco <javier.carrasco@wolfvision.net>, Jeff LaBundy <jeff@labundy.com> X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1710921491; l=4664; i=javier.carrasco@wolfvision.net; s=20240320; h=from:subject:message-id; bh=GlXHoFVfGs9c9meh5vV5ej7K7i+w66XzdRkU6vn5rT8=; b=lYmrSjOspPZPSiJWR1DFypAc8gmhjL9AT9I8hdM035TEkgQEpZspnE0bR3yHMuMrFBzD/yIee Ox2nDkzT135AV+waKnsONB7amR1IS8XzAJc9TunHhD+WQPiYXTFEn5X X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=Vxk2/0sGIxM8rsKnceszFuSuHVfQwa1Yo8+is7BX2nY= X-ClientProxiedBy: VI1PR07CA0286.eurprd07.prod.outlook.com (2603:10a6:800:130::14) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: <linux-input.vger.kernel.org> List-Subscribe: <mailto:linux-input+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-input+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DB4PR08MB8056:EE_ X-MS-Office365-Filtering-Correlation-Id: de3ae115-98ef-4aec-dd07-08dc48b37cf9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8tiZuhmTo7kpiKPUu31wFjpfPCysIA3jW+INh1bepfzW/gyb61szHo9DOMNRLNbgegWzjxqLqJ4F1KN+J26Q60rbt/fGjLVf99/29jpQ3SIdlguNbDE7FMz9nHE+DPhmyX1UBUKCz+9jxhxrvLTY9qbjTDux5JtzSblSlXydR0UmJ9CmFdCV0FjgpJekpWFjz9QUQCQSS4V28ZmGziH/TyLrKpT+JPKqs9Ic2EBwCbAFcGD8gjPE1UNm3dBRXtVwObhNXCfWCKtjjhHO2fMsSDXCPVEAIUnWqN27QDT2/0PyBML8BjniaV4Oaa7oTEp9GdZnOJdIYokaf0XDO/jyrcoJBi5RTIEchD9g/3LQO37+t5GAiPnhvODY7dJ9QzevSON6wBGstXfbB50B0DsDhn5fpHniO6ObF8fJUBT6tqT0rabrBd8uTVT3AE1RRiE3SH6GnfaPwNxUJHRtuS2meABlwyPyFXIzpKRS71lY5J6Z+33DOa7T+wZeFSumbNzDxVGxyIY13dD/6IadHUumgD7mw2HNwhKqbGQNegJYy/9hETxuX/qJjK59GwV3LmVn9CYbrp0lUn4zSBDu0DFrfsma+WCwo5/TTM3h20zVAVovTcTrYDZCuwi7S6S2Qms+o41DUfp+ioE861yZh42dwtzv0mxR2VqiRX9zME2nGn4= 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:(13230031)(376005)(366007)(1800799015)(52116005)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ls/vXESt2kpN9bTzsAYFd9qQ+Syu?= =?utf-8?q?BMkZGm3uWg6YliiqErYqpJ0L1tWDoVyQZXCMrqr1BmI7yN3+NmjKXmeXXmyn8qeQN?= =?utf-8?q?xANUJnC60No3NQkJKwKtek9HGS5Me2MkrrDoND/79MeDGnK2gGuPo5rqLxY0LFwr7?= =?utf-8?q?Dp7VtIGmOWxtTdKOmxuJPARysAfItmAxPrBUWAanVO5F7E7LU40+NOJXlA6BCCXGZ?= =?utf-8?q?N4zkOpe8ERFPakdE1b/zSsxk/RPFW3LGlnaPmyF0Z2D9XjVCBrPJF1muMDtbPQb1u?= =?utf-8?q?sWS6Sa68eIQL2uy6l+/90lH9sVZIME1b1e0sIUQR67dh15r1lgJcfV9Axngdemf/p?= =?utf-8?q?ydbx8XwXpgcyHeFFvzletu6NaHye3SN2sgGul34+A0c6p7/ZOssqwof9dxXc1Tw2y?= =?utf-8?q?aPvolPTMz8ctgRi4KyiDEsL0taY9tdgCPYSe+3sibrWF0MJI5WHvGGvVzXIwpKjmA?= =?utf-8?q?UBdxK8RHWapORssHLfzedz6zsx0xURaPi/z2G/LbhI3koK9HxGcy0+az0oZDTW/2z?= =?utf-8?q?/zn1dl1WHAC8I6BsD3l4OwV3ok+k/VcGEX6+0oulsK7NAXrP+Pxgu9Vb6Wm1x1Uxv?= =?utf-8?q?XYNo1nCEYDMMdU/cZG1CgHYn/BrirkQhM9rJEm21C1KHVbWFaEFY0WILt1S71beLS?= =?utf-8?q?hP1it8aK/o1pWYz3zqBzmALvihwu8G8lAAFJNq8AQr71A+2STxfp+GrGfhbZiT/a5?= =?utf-8?q?/jccvu9ip62oiils5RwewGj93YGqAvEohOF7ExwjQu89lkAakRwh8gdFs1Y/GG390?= =?utf-8?q?HR9wsf7Xer31Wpv+IBe1ewCMRnGX/cC8rmdTosf9tzCYQY3jwXIGMVpNLKpwtGZHW?= =?utf-8?q?GJmgaBFrRP7A7cyipvH5YIC4UFcMa/XPGp71gcHQfIO+4HD6v3ma2I8LDNuZ5ue6k?= =?utf-8?q?TWW749KSeNC1kwfkBj5LptHN2zoKsjsnTtzmUVA0fsapd2gnpctSw3OKJbwBgQcUL?= =?utf-8?q?AqWHfkvncS1fWV/ebrFE9CKfK8aAS2GYtGoZIZJ4tmakmaBDtRyvwQ7ZVR/Qu0mAG?= =?utf-8?q?QiZg1dGRXLv4de7B/uKQlIINbqIGX3l1IENZxmN2Kyq4DNlNpiGwB6lcph+3ZVqNz?= =?utf-8?q?3z872bVb3h4Fw+N2/IQSojn9Xuqphy4cPhc9+5HwfnLZXdoiQyiU5E+awYWNmwQ40?= =?utf-8?q?tEn8c2tku6B3yJFNbGFD3bihYnSpHSdgcG7iO0nerVp5XHWxI72j4SvdR9YtF8s2q?= =?utf-8?q?nLgNNRmeIbDP8p6SQAvsYJX6nbhOCETmXOHQjmmSOUBDEs6gasWdJAe0SRn03bYoT?= =?utf-8?q?Yk5u2HIJ+MuR0hizTpIpudG5f+aipMcc3m+T6YfbaGStr98CEKYQaff01M5bnrnlt?= =?utf-8?q?AfJ1cbq697q8NJxnEqnntj7BizEI2yN0mjWEVXNACsX7l6kZryEhDrIYUFJLvVE/w?= =?utf-8?q?FkwEIaS8CixWOS2lyGQ2n751XkaDOwzSjdnm/CZHgmd2oE8aR+a+yLloqM5N9y3z+?= =?utf-8?q?NFSLJqMzjUmJ535+/fMbCilND8bOwH/DSOQtR0QIfJUqR+E7Jww+mxiBWTnAT7lkg?= =?utf-8?q?2z9Co7tu+JINSSbH0HVnxPXwB7aRl9aiIPFTz/9Qq+3LQao/VwFScKw=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: de3ae115-98ef-4aec-dd07-08dc48b37cf9 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2024 07:58:11.4385 (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: 8fvrwsNjAfiwoIVQ4MOYT9KAppFfNBR4Hu7+ocVSAMHtVTiZoibQM97R0J8vvYVNJJsLi++Bdbtsn99zuEc7XucqaLnv7TH0ruJeULsGdYU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR08MB8056 |
Series |
Input: support overlay objects on touchscreens
|
expand
|
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, this series offers a documented, device-tree-based solution by means of helper functions. An implementation for a specific touchscreen driver is also included. The functions in touch-overlay provide a simple workflow to acquire physical objects from the device tree, map them into a list 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. To: Dmitry Torokhov <dmitry.torokhov@gmail.com> To: Rob Herring <robh@kernel.org> To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> To: Conor Dooley <conor+dt@kernel.org> To: Bastian Hecht <hechtb@gmail.com> To: Michael Riesch <michael.riesch@wolfvision.net> Cc: linux-input@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net> Changes in v8: - touchscreen bindings: fix description formatting. - Link to v7: https://lore.kernel.org/r/20240119-feature-ts_virtobj_patch-v7-0-eda70985808f@wolfvision.net Changes in v7: - General: return to a single input device implementation. - touchscreen bindings: segment instead of button in the label description. - touch-overlay.c: define button-specific data inside segment struct. - touch-overlay.c: remove fwnode_property_present() and check return value of fwnode_property_read_u32() in touch_overlay_get_segment(). - touch-overlay.c: simplify return path in touch_overlay_map(). - Link to v6: https://lore.kernel.org/r/20230510-feature-ts_virtobj_patch-v6-0-d8a605975153@wolfvision.net Changes in v6: - General: use a single list to manage a single type of object. - General: swap patches to have bindings preceding the code. - touch-overlay.c: minor code-sytle fixes. - Link to v5: https://lore.kernel.org/r/20230510-feature-ts_virtobj_patch-v5-0-ff6b5c4db693@wolfvision.net Changes in v5: - touchscreen bindings: move overlay common properties to a $def entry (Rob Herring) - st1232 bindings: move overlays to the existing example instead of making a new one (Rob Herring) - Link to v4: https://lore.kernel.org/r/20230510-feature-ts_virtobj_patch-v4-0-5c6c0fc1eed6@wolfvision.net Changes in v4: - General: rename "touchscreen" to "touch" to include other consumers. - PATCH 1/4: move touch-overlay feature to input core. - PATCH 1/4, 3/4: set key caps and report key events without consumer's intervention. - PATCH 2/4: add missing 'required' field with the required properties. - Link to v3: https://lore.kernel.org/r/20230510-feature-ts_virtobj_patch-v3-0-b4fb7fc4bab7@wolfvision.net 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): dt-bindings: touchscreen: add touch-overlay property Input: touch-overlay - Add touchscreen overlay handling dt-bindings: input: touchscreen: st1232: add touch-overlay example Input: st1232 - add touch overlays handling .../input/touchscreen/sitronix,st1232.yaml | 29 +++ .../bindings/input/touchscreen/touchscreen.yaml | 119 ++++++++++ MAINTAINERS | 7 + drivers/input/Makefile | 2 +- drivers/input/touch-overlay.c | 250 +++++++++++++++++++++ drivers/input/touchscreen/st1232.c | 48 ++-- include/linux/input/touch-overlay.h | 22 ++ 7 files changed, 462 insertions(+), 15 deletions(-) --- base-commit: b3603fcb79b1036acae10602bffc4855a4b9af80 change-id: 20230510-feature-ts_virtobj_patch-e267540aae74 Best regards,