From patchwork Tue Jun 6 16:22:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Moisieiev X-Patchwork-Id: 689887 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 705CCC7EE31 for ; Tue, 6 Jun 2023 16:22:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238302AbjFFQWv (ORCPT ); Tue, 6 Jun 2023 12:22:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231700AbjFFQWt (ORCPT ); Tue, 6 Jun 2023 12:22:49 -0400 Received: from mx0a-0039f301.pphosted.com (mx0a-0039f301.pphosted.com [148.163.133.242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43E76E40; Tue, 6 Jun 2023 09:22:48 -0700 (PDT) Received: from pps.filterd (m0174676.ppops.net [127.0.0.1]) by mx0a-0039f301.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 356F1eiE030721; Tue, 6 Jun 2023 16:22:33 GMT Received: from eur04-he1-obe.outbound.protection.outlook.com (mail-he1eur04lp2057.outbound.protection.outlook.com [104.47.13.57]) by mx0a-0039f301.pphosted.com (PPS) with ESMTPS id 3r229jsu66-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Jun 2023 16:22:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CVxLtCYJM7NNfoFHkuSgjkH/X19CPqiqfoBCRqc+AoZ+7PTmT/qtApPYHL5OSiuRG1LRw29/MFQJrofk6OhJZnB5gNzWS5cnk7AHksmJBQSUUkDG0XLQluPqgUE/9naln5il9axoZRKKAdgBWsSXU3qN22HssfUAeYdyNxHkiyK+PKFBA0jktRG615me75a+Kg38mtGJPSGqoIDP4P9LyEtbO3HNRWKGqwPiMfILbEZuNymSbyDgkjgzcJ5inspHkFbt1u4yUKUKnrtc+r7Ibt7ueuGbAMHT6uPlCT1c6bvEPsitkajCVEU4WAslADi1Ta/ETLjOR03eAdTFjkFhYg== 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=S1vg2H0gwnIiA0XBcxRAHjKtXu/CVSVIZptf9NvQcQY=; b=mp4LVV/jSgZZH0WxzhnmlUEXQWzjY8zMQJYffnY5xfgajwPyrpq/RQruQGuJ77CTLVgynNkfSJx8jr/xkpgaNnjV+7kX6QsrDiDb8Is1Hj8r7V3wU9kDym5fkYGZ3rw5G2cy9AU+TYuuamb1/NKnl2oNRIDuSCK36lwwDMlQgP0rLD3I2xuqJPPwY9QeVPvHiy8IJwaTO9fdfLtK0JrBz+LXXkNRFErRWkPf95+p+2WZL1HxSqDgxl8Dv3am5ZDqvI6unl4nXj5f4AGtcR6CLTTK/8VfufBBeIq8Rmdr5xxhrrjhmU59KT9siBhQ2bmqeVZQA7T2wNTcPqAB3WWC/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S1vg2H0gwnIiA0XBcxRAHjKtXu/CVSVIZptf9NvQcQY=; b=Tl4bV4PoqI3268+TbE3SgnKPocjrbjxlrELcaYkJwlcZHY+EKEi2F+GDqZkQKKLFf5I/yFHgIV7JcrY8ie95ECY6LsT2jNKcH9CNlYhYkYcdq+1B0rLZI58YAPT6rZ2sx4mYfIfsJ8hQoy46fgnmYWJtySPh8xC6xlRadwvTxivPDsyXCNrmCCh546co7ybzPUIBJ6lr/8k800ykBBR9jNl96zYVlp3n4Utb7tiLc9vcjgiyHf95wwPA9aNCQ1oKNbmZoDINXpUqD6wwB2PRY69fuFcC/YfjyyprHyc/l8ik3iGjS1wKPiovvuS37RG4pkCpTpihTJBLeZeAG0PuUQ== Received: from PA4PR03MB7136.eurprd03.prod.outlook.com (2603:10a6:102:ea::23) by DB4PR03MB8708.eurprd03.prod.outlook.com (2603:10a6:10:380::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Tue, 6 Jun 2023 16:22:27 +0000 Received: from PA4PR03MB7136.eurprd03.prod.outlook.com ([fe80::528d:e0b6:ecc6:25e5]) by PA4PR03MB7136.eurprd03.prod.outlook.com ([fe80::528d:e0b6:ecc6:25e5%4]) with mapi id 15.20.6455.030; Tue, 6 Jun 2023 16:22:27 +0000 From: Oleksii Moisieiev To: "sudeep.holla@arm.com" CC: Oleksii Moisieiev , Cristian Marussi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" Subject: [PATCH v3 1/4] firmware: arm_scmi: Add optional flags to extended names helper Thread-Topic: [PATCH v3 1/4] firmware: arm_scmi: Add optional flags to extended names helper Thread-Index: AQHZmJMV0Z/bArOidE+HuMEc9wmXMQ== Date: Tue, 6 Jun 2023 16:22:27 +0000 Message-ID: <2ad06a5582bb31e16fe2f497e15cb41e8455e863.1686063941.git.oleksii_moisieiev@epam.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PA4PR03MB7136:EE_|DB4PR03MB8708:EE_ x-ms-office365-filtering-correlation-id: afd4a14b-03eb-4e2b-eb0a-08db66aa381d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: nQUU2i2Cuuc+r2RgtYqrvSYciZ1Mzb+JPC+dgxtbMbVAo0zGNapQb5DpDz/bNLlMkkX27vG01Pl1Mp1ozUFKNQhVtttGvNFSdjiJF+QjSdMew24ZPfkYP8vwuyg7+bsfclN3Tfr+SIHP0cDRZwQ7qN6Ly0OdROtG0Weg6E8TlYHGdI+Vl2+EDSOuu56GsHTBk1lHnqpmBznPz+w9SYs37Vd8VBI3wxV21veSPGabLkJLwQ89TCcZE4zQtHge6jPboYPoLh3cKxlr/KimwGjIULVjZyHQlq8p54+F7nYt+UiT0CmPRr+EOQGNYZKj7O/MvlFh9Lpwrflj5CbOySdYQY/FvFckquT+F/YPbSS77Xm/ElDNqtAyAdc3ZSjUkeFC3xIFjUGGlUmse9+RPCcO38gCchWYHODaP9OLqnUtLul/mcslMEcX5WB0j3mXQepHLBWlSp81U6swJ56/H1F3o2Aw8AAn1zMwCGA7pkpXEUzAvReP+pildaJDuRck/1CUY5k7vR+5fO/5eUaa/GMiEYsfmPEFAd0Iw76AtP4//JXwHXAknpBTa6D5Icg0zG82fQ5BIvwDodrvmC3/x4ljwwtqKh4TcdrDfyfp9i89BOpJJ3NUVWhessau565MrnVa x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR03MB7136.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(366004)(39860400002)(396003)(346002)(376002)(451199021)(6512007)(6506007)(26005)(2616005)(83380400001)(186003)(66476007)(66446008)(122000001)(66556008)(66946007)(64756008)(76116006)(2906002)(6486002)(71200400001)(8936002)(38100700002)(7416002)(38070700005)(86362001)(5660300002)(36756003)(54906003)(8676002)(91956017)(478600001)(6916009)(316002)(4326008)(41300700001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?BhQsKZ/irtkz66VaWYWXvrB?= =?iso-8859-1?q?y5XKpi32kpty8+aTbb6D8Ita1JKssKAjnITQblHrmqFYHBUILOniDJ/20r5U?= =?iso-8859-1?q?dBDzqwgyFODP1FE9JV3uLKI/+iOQ1yrrBqyz+pYTLDW9QINoWJKWxOQm57BU?= =?iso-8859-1?q?qUQLy7eRAwfq8j4R8JmzHkMbSrLWwerNA+FH5WpkV+xB5uhqQsRY1JrR8wkh?= =?iso-8859-1?q?Nii1f8dpDag7XS4PahNPJ7sfQC/1Z/lt1HexZaZ7dKhmtugiZtC/UZZ2bG//?= =?iso-8859-1?q?y1koFCiEszQ7V0YAjeTDYb6IwFJZoGVVzbgSR1blBXayvacGcUMz9PJlxaF2?= =?iso-8859-1?q?+uBsIQrMy8IjNQ3JcPg3nTvgxALPf2Na2+8LyCPDsGLJDzuxBhJ56OjoeOcl?= =?iso-8859-1?q?6JLFoag1FBprfjPfb0BB19zs5GSXsp2p0vYGcyg8bL6Ikua5QfotSD3jCHtF?= =?iso-8859-1?q?hxUwqB33q/N8qzUIy8L/ONtEVV3IOFqYhmP4YYyutv0sOds6NrnRilkedA+S?= =?iso-8859-1?q?Q/Z9MF82ciGIaKfIIyevsAZScR5QPR63KtfPqop5Qck048Wfhsgd1Cn7Sqnm?= =?iso-8859-1?q?NFiLg0sbkevtGPUV0Q47+6foWIKMW4rA/gC7Wy5bViM0qI27G9eLTWOzp7L8?= =?iso-8859-1?q?RtC+vTvOQ+P8lR9MUQT8VpLgb4y3anjViXw5oN45/Zjcr6OB4s2toD20B90e?= =?iso-8859-1?q?zJbF9vZ11OXYxNJy7p1JfZAzTx0H8LHv02XL91UGbf6+jqXuL9W7pYeIX+jF?= =?iso-8859-1?q?tzDZGZQJWsf1sa2fpSJXlNg0Fk3vriEH+bAxLZ5xZ12HPkALfgFosepT5trK?= =?iso-8859-1?q?c/XaOYpLxjFI5lLOjt2LrqxnCG8YM1PveOlQ7stAmpdW9Ulw4Wqireew4nBD?= =?iso-8859-1?q?ElZKHpT+9E5OqK+t7g3OGyn5zX85L/tCzCSgUtvTYZ8FsVXNU+jy9uzzGH+d?= =?iso-8859-1?q?M99IyGOIfkhEaD/XkJMGozil0+uzLZtpdcoWOZDiLGs5/HSc+8TF2I3KNl7E?= =?iso-8859-1?q?FgMZrSTOl7tv4J7z1uysYt+8+Iwtca30BBlFW7eQNxHG500exNbtHq6oBsAt?= =?iso-8859-1?q?iOa0WLEch4OnaEaG5hCPxiwouSzeSpMUXsJKgoVBdOJ1eqFRqU3edoq/wNBA?= =?iso-8859-1?q?8UB/AsA+5l0IHNiU0VIp7DxI8yWAuprFnHui3lBpf8O/YBQB8KbWe6DWIpdC?= =?iso-8859-1?q?rB1OHL7AIpnuBSZUHDXomNC2YOzohpzEQ5wkdUNphA653MexTURTwQdRuORu?= =?iso-8859-1?q?DrNav670HyzdTqvaXxG5ejQzdvtIqKlm8Gav7wxsbOgmSL4u012wPwDSMPFT?= =?iso-8859-1?q?Ykz2TEMMhR1mNxgWlChmdFq6T5RTPgFfjvsrJwAmKqinvGaSKN3LzB2ACprw?= =?iso-8859-1?q?YYyU3pJgqmPsyd/iNivWYIp+FUd0HM51LUEkYn44ll8+zIyHtKGHLiHm1XaN?= =?iso-8859-1?q?ssgrAWMfUsgkfKUnOf4/7IaVk1wAGSsoFa10uNy93Ji3ygYko7nb4YbRgCZA?= =?iso-8859-1?q?sfalr8sz9A8lqmw9ZEinUbb0Wy8Nj9oa3KHgIiJNFvwFfiwOGuBA2ZSlJ3gw?= =?iso-8859-1?q?7a4hZULThY3wb42qTXzeqyJCA8NthWYk5zHgnjRhIgli1dT8ifrnqDUdyAlt?= =?iso-8859-1?q?jxp5v/XuxRu+iOBggS71wZFEoexgzIlG/hnl03w=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PA4PR03MB7136.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: afd4a14b-03eb-4e2b-eb0a-08db66aa381d X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jun 2023 16:22:27.3498 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: JY6c3FlgFjevhd22FDSHPqVzXDkFgOLPoaHpt/7W87htxEciffQCNr9pzGaaUELerJg2oGqIEY9Qe5OkTdywMLgd/urpEt9a9cjxlsr1j8o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR03MB8708 X-Proofpoint-GUID: F11GTAlSEEFoV_rky7jqY6gLqbPHG1wb X-Proofpoint-ORIG-GUID: F11GTAlSEEFoV_rky7jqY6gLqbPHG1wb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-06_12,2023-06-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 mlxlogscore=999 adultscore=0 spamscore=0 impostorscore=0 mlxscore=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2306060140 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Some recently added SCMI protocols needs an additional flags parameter to be able to properly configure the command used to query the extended name of a resource. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/clock.c | 2 +- drivers/firmware/arm_scmi/driver.c | 8 ++++++-- drivers/firmware/arm_scmi/perf.c | 3 ++- drivers/firmware/arm_scmi/power.c | 2 +- drivers/firmware/arm_scmi/powercap.c | 2 +- drivers/firmware/arm_scmi/protocols.h | 3 ++- drivers/firmware/arm_scmi/reset.c | 3 ++- drivers/firmware/arm_scmi/sensors.c | 2 +- drivers/firmware/arm_scmi/voltage.c | 2 +- 9 files changed, 17 insertions(+), 10 deletions(-) diff --git a/drivers/firmware/arm_scmi/clock.c b/drivers/firmware/arm_scmi/clock.c index 96060bf90a24..e6e087686e8c 100644 --- a/drivers/firmware/arm_scmi/clock.c +++ b/drivers/firmware/arm_scmi/clock.c @@ -169,7 +169,7 @@ static int scmi_clock_attributes_get(const struct scmi_protocol_handle *ph, if (!ret && PROTOCOL_REV_MAJOR(version) >= 0x2) { if (SUPPORTS_EXTENDED_NAMES(attributes)) ph->hops->extended_name_get(ph, CLOCK_NAME_GET, clk_id, - clk->name, + NULL, clk->name, SCMI_MAX_STR_SIZE); if (SUPPORTS_RATE_CHANGED_NOTIF(attributes)) diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index e7d97b59963b..5be931a07c84 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -1438,6 +1438,7 @@ struct scmi_msg_resp_domain_name_get { * @ph: A protocol handle reference. * @cmd_id: The specific command ID to use. * @res_id: The specific resource ID to use. + * @flags: A pointer to specific flags to use, if any. * @name: A pointer to the preallocated area where the retrieved name will be * stored as a NULL terminated string. * @len: The len in bytes of the @name char array. @@ -1445,8 +1446,8 @@ struct scmi_msg_resp_domain_name_get { * Return: 0 on Succcess */ static int scmi_common_extended_name_get(const struct scmi_protocol_handle *ph, - u8 cmd_id, u32 res_id, char *name, - size_t len) + u8 cmd_id, u32 res_id, u32 *flags, + char *name, size_t len) { int ret; struct scmi_xfer *t; @@ -1458,6 +1459,9 @@ static int scmi_common_extended_name_get(const struct scmi_protocol_handle *ph, goto out; put_unaligned_le32(res_id, t->tx.buf); + if (flags) + put_unaligned_le32(*flags, + (u8 *)t->tx.buf + sizeof(res_id)); resp = t->rx.buf; ret = ph->xops->do_xfer(ph, t); diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index ecf5c4de851b..d85d4a0e3605 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -237,7 +237,8 @@ scmi_perf_domain_attributes_get(const struct scmi_protocol_handle *ph, if (!ret && PROTOCOL_REV_MAJOR(version) >= 0x3 && SUPPORTS_EXTENDED_NAMES(flags)) ph->hops->extended_name_get(ph, PERF_DOMAIN_NAME_GET, domain, - dom_info->name, SCMI_MAX_STR_SIZE); + NULL, dom_info->name, + SCMI_MAX_STR_SIZE); return ret; } diff --git a/drivers/firmware/arm_scmi/power.c b/drivers/firmware/arm_scmi/power.c index 356e83631664..077767d6e902 100644 --- a/drivers/firmware/arm_scmi/power.c +++ b/drivers/firmware/arm_scmi/power.c @@ -133,7 +133,7 @@ scmi_power_domain_attributes_get(const struct scmi_protocol_handle *ph, if (!ret && PROTOCOL_REV_MAJOR(version) >= 0x3 && SUPPORTS_EXTENDED_NAMES(flags)) { ph->hops->extended_name_get(ph, POWER_DOMAIN_NAME_GET, - domain, dom_info->name, + domain, NULL, dom_info->name, SCMI_MAX_STR_SIZE); } diff --git a/drivers/firmware/arm_scmi/powercap.c b/drivers/firmware/arm_scmi/powercap.c index 83b90bde755c..e7ea9210aae1 100644 --- a/drivers/firmware/arm_scmi/powercap.c +++ b/drivers/firmware/arm_scmi/powercap.c @@ -268,7 +268,7 @@ scmi_powercap_domain_attributes_get(const struct scmi_protocol_handle *ph, */ if (!ret && SUPPORTS_EXTENDED_NAMES(flags)) ph->hops->extended_name_get(ph, POWERCAP_DOMAIN_NAME_GET, - domain, dom_info->name, + domain, NULL, dom_info->name, SCMI_MAX_STR_SIZE); return ret; diff --git a/drivers/firmware/arm_scmi/protocols.h b/drivers/firmware/arm_scmi/protocols.h index 78e1a01eb656..b3c6314bb4b8 100644 --- a/drivers/firmware/arm_scmi/protocols.h +++ b/drivers/firmware/arm_scmi/protocols.h @@ -256,7 +256,8 @@ struct scmi_fc_info { */ struct scmi_proto_helpers_ops { int (*extended_name_get)(const struct scmi_protocol_handle *ph, - u8 cmd_id, u32 res_id, char *name, size_t len); + u8 cmd_id, u32 res_id, u32 *flags, char *name, + size_t len); void *(*iter_response_init)(const struct scmi_protocol_handle *ph, struct scmi_iterator_ops *ops, unsigned int max_resources, u8 msg_id, diff --git a/drivers/firmware/arm_scmi/reset.c b/drivers/firmware/arm_scmi/reset.c index e9afa8cab730..7217fd7c6afa 100644 --- a/drivers/firmware/arm_scmi/reset.c +++ b/drivers/firmware/arm_scmi/reset.c @@ -128,7 +128,8 @@ scmi_reset_domain_attributes_get(const struct scmi_protocol_handle *ph, if (!ret && PROTOCOL_REV_MAJOR(version) >= 0x3 && SUPPORTS_EXTENDED_NAMES(attributes)) ph->hops->extended_name_get(ph, RESET_DOMAIN_NAME_GET, domain, - dom_info->name, SCMI_MAX_STR_SIZE); + NULL, dom_info->name, + SCMI_MAX_STR_SIZE); return ret; } diff --git a/drivers/firmware/arm_scmi/sensors.c b/drivers/firmware/arm_scmi/sensors.c index 0b5853fa9d87..9952a7bc6682 100644 --- a/drivers/firmware/arm_scmi/sensors.c +++ b/drivers/firmware/arm_scmi/sensors.c @@ -644,7 +644,7 @@ iter_sens_descr_process_response(const struct scmi_protocol_handle *ph, if (PROTOCOL_REV_MAJOR(si->version) >= 0x3 && SUPPORTS_EXTENDED_NAMES(attrl)) ph->hops->extended_name_get(ph, SENSOR_NAME_GET, s->id, - s->name, SCMI_MAX_STR_SIZE); + NULL, s->name, SCMI_MAX_STR_SIZE); if (s->extended_scalar_attrs) { s->sensor_power = le32_to_cpu(sdesc->power); diff --git a/drivers/firmware/arm_scmi/voltage.c b/drivers/firmware/arm_scmi/voltage.c index eaa8d944926a..36e2df77738c 100644 --- a/drivers/firmware/arm_scmi/voltage.c +++ b/drivers/firmware/arm_scmi/voltage.c @@ -242,7 +242,7 @@ static int scmi_voltage_descriptors_get(const struct scmi_protocol_handle *ph, if (SUPPORTS_EXTENDED_NAMES(attributes)) ph->hops->extended_name_get(ph, VOLTAGE_DOMAIN_NAME_GET, - v->id, v->name, + v->id, NULL, v->name, SCMI_MAX_STR_SIZE); if (SUPPORTS_ASYNC_LEVEL_SET(attributes)) v->async_level_set = true; From patchwork Tue Jun 6 16:22:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Moisieiev X-Patchwork-Id: 689886 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 E0F3BC77B73 for ; Tue, 6 Jun 2023 16:23:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238513AbjFFQXQ (ORCPT ); Tue, 6 Jun 2023 12:23:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237753AbjFFQW6 (ORCPT ); Tue, 6 Jun 2023 12:22:58 -0400 Received: from mx0b-0039f301.pphosted.com (mx0b-0039f301.pphosted.com [148.163.137.242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1928210EA; Tue, 6 Jun 2023 09:22:56 -0700 (PDT) Received: from pps.filterd (m0174680.ppops.net [127.0.0.1]) by mx0b-0039f301.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 356G3fee006627; Tue, 6 Jun 2023 16:22:47 GMT Received: from eur02-db5-obe.outbound.protection.outlook.com (mail-db5eur02lp2112.outbound.protection.outlook.com [104.47.11.112]) by mx0b-0039f301.pphosted.com (PPS) with ESMTPS id 3r2804r2hw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Jun 2023 16:22:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EQJixJ3k7j17ZvnICaTg75pwRLb4D8507lQROfXen5t6qFVtkmStS74C4zlrGk5AwbpvfzfWLbJXBKG4cthC2/Fb2lvv3j9uviw2sA3htcYyWhcqV6GVOyO9xRrrKjYQj8ef0e9Gm/eFZQ3Z8/lMPq+VoeikuPqOpCjHyLZxgDYMDT0gLGO2bxvd7FlV7MDHsT7LZuE//bRAZu3mgWKvGU7GcXnpUXepxLruU7I5w7Jvpw7l9dcWct3kQikQzH4xRUWyFjU3hY7I3K+jhK0hh8lvr09bQVkX8LE7IQjW++NkRMRzfGz/Oqgsol+lOgdut4+UxsVomM8ZPMkLflwnZg== 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=IPyoM93CIg05EExfADs14Sex6K6txv6z7yh4h8HoPVU=; b=JgdTi7c5D6nShM3KFPvkp7UlN60EPDS4tIx1PtQjNdUHf9K9gHlIvV86ssIKy2C+LB/usdHQ5iybwKHC0DJ+pc4mzCl0KYKFa6l8hS3vyKBYE8MKVrDgqxAt6ut7fyotw18fWRDhBPt1bzDFerP+1EKzy97EiO8UYVFrhKiVjK28ZNkwEYt8EcxjM9i4AmHB+sJ9EK/qLLN2UI4we2vILEZOa0BJ4AGkLQvNx3MesHMZ+nq1ISjbn/pLdLtl7P7jdPf6GkAMCyIIE/xsZL4vsQLDtLlR+N2m8XmGb5aPlfWi+PtFe3/ZHZ4VlQMsIoJqg3srmeyvJQwhh6LdxVVKjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IPyoM93CIg05EExfADs14Sex6K6txv6z7yh4h8HoPVU=; b=L9M7NlpAL1dJHwl3zvUdhdct3RA/uVezTPUEa4dZt9WCs+2s+UkKs0JOlD3NiUKod+0V2nGPFrAZz9XQ5PrzY39M2CXZWdYmH5h8krpqROzX2RGxN/jQ69H8lx0seY0/0lcV47vFz7wyJH0mhyg+NCL9hkiyze/oU5YvVab7Li/ujHOS5v3UUaf5VdaVm0IWrOHB7ETqf7HvGMnvF6O2NnUJ9AkftiAYxbc6R7RL+PewjQdEadTzXFlwtV5hBsTgWfqibOMhuvc+ly8+rIIRUcwy5UkBU0kpO2q/LV6DElNJ+cd5UZ7ZBb5uIFqnX68IzOwio8gq3SUU7ZEKuXYZcA== Received: from PA4PR03MB7136.eurprd03.prod.outlook.com (2603:10a6:102:ea::23) by PAVPR03MB9383.eurprd03.prod.outlook.com (2603:10a6:102:308::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Tue, 6 Jun 2023 16:22:28 +0000 Received: from PA4PR03MB7136.eurprd03.prod.outlook.com ([fe80::528d:e0b6:ecc6:25e5]) by PA4PR03MB7136.eurprd03.prod.outlook.com ([fe80::528d:e0b6:ecc6:25e5%4]) with mapi id 15.20.6455.030; Tue, 6 Jun 2023 16:22:28 +0000 From: Oleksii Moisieiev To: "sudeep.holla@arm.com" CC: Oleksii Moisieiev , Cristian Marussi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" Subject: [PATCH v3 4/4] dt-bindings: firmware: arm,scmi: Add support for pinctrl protocol Thread-Topic: [PATCH v3 4/4] dt-bindings: firmware: arm, scmi: Add support for pinctrl protocol Thread-Index: AQHZmJMWJkxtIOd1SkGZy3MMJWizGg== Date: Tue, 6 Jun 2023 16:22:28 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PA4PR03MB7136:EE_|PAVPR03MB9383:EE_ x-ms-office365-filtering-correlation-id: 59b85e82-598e-49e1-0078-08db66aa38df x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fnaQAf9+y7OqzCgdgQrG3UzF4eeGd9/fsVXgeGMd3RhcyjMtDk8Qt4B2oZRC20AjPPdWnXRLnxxhlnyFZd6UIYrANrvLRvPHMyPjUWV2xGGU8PYcKCEFhmlBzER2Ryq9p+6OgWW4ox/3awieRSTtvbiY2UyBJhX2Xqlr48PxW3kjCYP7zbkaa/VPHM/9K9lTjdrrF9EniF1RbBp5SdJTMplgbpgvdtsTCm/YLLURGFh9JQM+GBfIYLnnfXfLIWIwGd/zpOBXH71CiFstwxoqAxe7ZMc/NoYh4ZhREzfzqpOBVkdFgpGSa0OltW2Ixrw7dPkCJnxV7Cv4/5OMo9FwsasCZVtmO9J8TyTl8NJ6E1R54nVB1PMq3+npP4MoYghJ07eUOJnvQWja62ki0X3XG5r6px/e2vVJDsBEXTbUkiWqQ9psR8KO+kf0TPI1xjaKOThjmEnTrcAquS/E5/PLFtHyty4xMlJTFfh9/6fOgjo5YX9HybNgvQX9nzQDqj8+bdI6r3auLv0v/ppn2EkmcqUI5sGwNSnFOTF15KTDiWgZsYkWO/T9FtpAUoZFW6IrGwj166/atYbCLd2NDz8GuImjf23UYLPoKvxdSDkQk/6ZezmX+C9yF6dUyTBYF3D8 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR03MB7136.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(366004)(39860400002)(396003)(376002)(346002)(451199021)(38100700002)(86362001)(38070700005)(122000001)(478600001)(91956017)(41300700001)(71200400001)(6486002)(54906003)(5660300002)(8676002)(66476007)(64756008)(66946007)(76116006)(6916009)(4326008)(8936002)(66446008)(66556008)(316002)(2906002)(7416002)(2616005)(26005)(6506007)(6512007)(36756003)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?/BmKN2/Ax6Y5H3KwL3zWa5I?= =?iso-8859-1?q?u84U4IiPFHIECnZ95fs+6oxR95F6UEUuCSNXbsOgr80VH18t9aP7uKNueuNO?= =?iso-8859-1?q?EDN7vvOnUouf+tmUdJp+k6yKlxKcsHPlKpheykv1eEcFCYAxYz7bSMqaI53a?= =?iso-8859-1?q?w+yiwqBAg94Xq7FxuJ9MzLmaEYeat0P6xZrsnTdTwKFdDledSHl3QOAjZ62C?= =?iso-8859-1?q?yp92j0XvVj2GSg7MOfWSz6cmBKnKuWDT7ofRyPVVUkDW7FKaU/G7J/hStwMj?= =?iso-8859-1?q?gb3oft6kUOeRIeC36B2S8y15L24f0vpJuk2/2RNaerfCi8JZnbMOVzoDDk0s?= =?iso-8859-1?q?LBCElDEISAs4M48aAP/wJfmARpFLbAzGt+ykfwChdGIl991dpo9ERcQosm8v?= =?iso-8859-1?q?xgx65qbUD3WHeuF5ERKrVZRPti9VbfJ3C+kJ/sQ1rKaGOEVNY5AkXwNKnKWm?= =?iso-8859-1?q?CgjDICiaR3PffsWnCqxncfN+lVobBtp0b7xQ/KGvX4IALez3+7laQoh8UhV8?= =?iso-8859-1?q?CggVecmwmscE1l5vMZInx1TGAPf5e3/+OVBhyhQk/Q1ya8byOTyo8AC60phH?= =?iso-8859-1?q?MF9xEDc93XaUs2y3InV1s2zdDtjdeR4ohx25kcUKesYTc1s/2l3ydFKJJRQN?= =?iso-8859-1?q?eG5PC9AVTPNG6RJrlwBargQAvXypg8pXIKwIyYIodbJ0sVSymUC7OaHv4ODd?= =?iso-8859-1?q?8geFX1+jlhXQXcCSyJy3N1oyy50kE1KMRbEOSD0ie79yzPAiYcCRS0OzlOFo?= =?iso-8859-1?q?FLPhzfU7YqVrAmxI44N1aFYY1ab6MiTNTxovHEoa9xi3ZNYk33b8AwNzqeb/?= =?iso-8859-1?q?QhzgerBBYUtsTkCPWhmD6EDni5fwOM7PA8Wzut+rLRSKOnfS11Lg+gjrC5NJ?= =?iso-8859-1?q?NGaeSDwhUX6F/4uGJ0ypzU0uI8zBErfKIpoYGjzuMOsBBUUfGjtogCItLkFQ?= =?iso-8859-1?q?aF5xzoKacZQlJ9LHALj8lqM3CR/jIqHn49xlsJPNc4JZhAPKUEIzuBgN9LhP?= =?iso-8859-1?q?5XlDTBUZp3W9rFZMzah46N4z2cRXUOPawLA/t05AX/VOw9VBpK+9zVVC7/9f?= =?iso-8859-1?q?hFhTVqtQaRE2Kr2PqARE50LNv1NvOorDctQRBeRbyEvfwR7AFuFGBeB2iEQM?= =?iso-8859-1?q?HuWzdsnVe6jrhRt89bpz7jdnxTF0JdRPwePZCtovScRSoGh1T7owvMx8LY8B?= =?iso-8859-1?q?OiiME6MnHx+UGnufnyYlRp05PnRsfX3bE9JHexLr7lHHVu626dxmzftweLMh?= =?iso-8859-1?q?wGINPwRPDU8GsGpUlH+JGBnhMYg5ZILHbXdAcncPEmF6zpc8ccGbwxDLyLU3?= =?iso-8859-1?q?wmUoQf1hIEAozNKp9q8R41lMQyN4EM2mBZOWWsUgxe7mdndHfWI92GhUcj/p?= =?iso-8859-1?q?W0POqkPIliaG/b2o9bnaAR/GvbW3AdiRjMnmP6x1P2tVS0CePYGTyoBpF5vY?= =?iso-8859-1?q?691RJckb7xERiscuRIWN/HVenai70ynTz1qplrUySjXr61E+sWCYqQBFUnab?= =?iso-8859-1?q?zv37IfjEX5X1YmAlUUsPHkRi/UMxbUmUio2AC6l3Ya2qJmnhdZCU04/XbcDK?= =?iso-8859-1?q?DCOZW69JtOZ7MNHfAJGn5FDHjmYHkWZi7J040F8AeSxjC6Q0jDftsOLI5DOT?= =?iso-8859-1?q?USydUoB1r3jzqPIm/vGB16BF4zxz6kE0I//SxMw=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PA4PR03MB7136.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59b85e82-598e-49e1-0078-08db66aa38df X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jun 2023 16:22:28.7228 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: mg3GCMSTf75ZTvi9TQAPCHt1vuqCJmH4vD7ze8Hzus+W3kciS5SwLSlT44UfUz3297QZc2UyMNqbKKqYCj10nXuDM8+Cjzo2F69LNRKoPbo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR03MB9383 X-Proofpoint-GUID: QgVRBiERD4BkcpQ3nj8aX8SMvmGa8gl9 X-Proofpoint-ORIG-GUID: QgVRBiERD4BkcpQ3nj8aX8SMvmGa8gl9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-06_12,2023-06-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 suspectscore=0 mlxscore=0 spamscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 adultscore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2306060141 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add new SCMI v3.2 pinctrl protocol bindings definitions and example. Signed-off-by: Oleksii Moisieiev --- .../bindings/firmware/arm,scmi.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml index 5824c43e9893..a19aa184bbd1 100644 --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml @@ -233,6 +233,39 @@ properties: reg: const: 0x18 + protocol@19: + $ref: '#/$defs/protocol-node' + + properties: + reg: + const: 0x19 + + '#pinctrl-cells': + const: 0 + + allOf: + - $ref: /schemas/pinctrl/pinctrl.yaml# + + required: + - reg + + additionalProperties: + anyOf: + - type: object + allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml# + - $ref: /schemas/pinctrl/pinmux-node.yaml# + + description: + A pin multiplexing sub-node describe how to configure a + set of pins is some desired function. + A single sub-node may define several pin configurations. + This sub-node is using default pinctrl bindings to configure + pin multiplexing and using SCMI protocol to apply specified + configuration using SCMI protocol. + + unevaluatedProperties: false + additionalProperties: false $defs: @@ -384,6 +417,26 @@ examples: scmi_powercap: protocol@18 { reg = <0x18>; }; + + scmi_pinctrl: protocol@19 { + reg = <0x19>; + #pinctrl-cells = <0>; + + i2c2 { + groups = "i2c2_a", "i2c2_b"; + function = "i2c2"; + }; + + pins_mdio { + groups = "avb_mdio"; + drive-strength = <24>; + }; + + keys_pins: keys { + pins = "GP_5_17", "GP_5_20", "GP_5_22", "GP_2_1"; + bias-pull-up; + }; + }; }; };