From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B576C982E6 for ; Sun, 20 Sep 2026 09:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IDOHaADuOHx17ReYWZiinhfvI0uegcnln8Y+wVn991M=; b=uXNw6zNBr8fsVPJ47HFq5O4uh7 kbZ2UpJsFt4nTg6PpbHiTM8YU0Zsi4fTvHvFNM5/JVMM72mESo/wgAzGzsapwFMjI3WqaNG+yU3PL w7JbCaAS7R0O1AXziozPwN3IvzJlo98nxbgWgc9zTvX00vUusF/cgUHaG7h9E09ZwuCxxrr9jUL9o KjuiisT33RzT6BS2caeGe8NoLjrfmLKlU0EgCKUVWyqnWMJ8Cgm+nmOL9p6Z1SQNJH8c00r6Phdpw OdXzy8JgZKCB/mrc9cfImQh8lceI9AQQh9QvH6wNsHbbVquMyrNzAa2ahgSx6iiynZZU8mY31rGVN cBzt8NLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x8Djp-0000000HA4j-0NsJ; Sun, 20 Sep 2026 09:21:33 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x8Djk-0000000HA02-0lIT for linux-arm-kernel@lists.infradead.org; Sun, 20 Sep 2026 09:21:29 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AFE581691; Sun, 20 Sep 2026 02:21:23 -0700 (PDT) Received: from pluto.fritz.box (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4E55F3F59E; Sun, 20 Sep 2026 02:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1789896087; bh=O0cFYabobz2jqFk60laht8vyGhpYDGlxJ5P/lorbBzw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZP4RfplEjlDkzsVgehkQFCgwuWZSIRw5xoLYzrZEwFVDApcQelCymsBOVr38NFzCL UqtEjRCPE8EqUMedz5rFKJ/fh4xcFEDoNX+RiTqpNGGtD60z/XX1B+r/26SC002vu9 0GfUQ6tdawv7odOWpYYy0OJSiwazdT0N99FlAuNU= From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org, linux-doc@vger.kernel.org Cc: sudeep.holla@kernel.org, james.quinlan@broadcom.com, f.fainelli@gmail.com, vincent.guittot@linaro.org, etienne.carriere@st.com, peng.fan@oss.nxp.com, michal.simek@amd.com, d-gole@ti.com, jic23@kernel.org, elif.topuz@arm.com, lukasz.luba@arm.com, philip.radford@arm.com, david@kernel.org, souvik.chakravarty@arm.com, leitao@kernel.org, kas@kernel.org, puranjay@kernel.org, usama.arif@linux.dev, kernel-team@meta.com, Cristian Marussi Subject: [PATCH v12 18/25] firmware: arm_scmi: Expose per-instance identifier Date: Sun, 20 Sep 2026 10:19:21 +0100 Message-ID: <20260920091928.2014972-19-cristian.marussi@arm.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260920091928.2014972-1-cristian.marussi@arm.com> References: <20260920091928.2014972-1-cristian.marussi@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260920_022128_297786_0E340374 X-CRM114-Status: GOOD ( 12.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When multiple SCMI instances are configured, the SCMI stack probes and it is initialized multiple times: one core stack for each defined instance. Each istance is simply identified internally with a number and such number is already exposed to the user to name the root of the per-instance debugfs subtree, if enabled. Expose such unique identifier to the SCMI drivers so that they can use that same identifier when in need to name their per-instance resources. Signed-off-by: Cristian Marussi --- v7 --> v8 - fixed Doxygen 'non-negative' integer --- drivers/firmware/arm_scmi/driver.c | 1 + include/linux/scmi_protocol.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 8bb5e4c1bbbc..f5aca46bc608 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -3352,6 +3352,7 @@ static int scmi_probe(struct platform_device *pdev) idr_init(&info->rx_idr); handle = &info->handle; + handle->id = info->id; handle->dev = info->dev; handle->version = &info->version; handle->devm_protocol_acquire = scmi_devm_protocol_acquire; diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index 6b1b0eee2651..4b44c9f503bc 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -1125,6 +1125,10 @@ struct scmi_notify_ops { /** * struct scmi_handle - Handle returned to ARM SCMI clients for usage. * + * @id: A unique non-negative natural integer identifying the SCMI Instance + * associated with this handle to be used across all drivers for + * naming purposes: same identifier used internally as the root for + * the debugfs per-instance tree. * @dev: pointer to the SCMI device * @version: pointer to the structure containing SCMI version information * @devm_protocol_acquire: devres managed method to get hold of a protocol, @@ -1145,6 +1149,7 @@ struct scmi_notify_ops { * @notify_ops: pointer to set of notifications related operations */ struct scmi_handle { + unsigned int id; struct device *dev; struct scmi_base_info *version; -- 2.54.0