From patchwork Wed Jul 26 08:37:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1813330 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=zLkK+FzE; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RB0CX4lzMz1yY5 for ; Thu, 27 Jul 2023 02:46:16 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4CF1C8622D; Wed, 26 Jul 2023 18:46:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="zLkK+FzE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8BFF38620C; Wed, 26 Jul 2023 18:46:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8F7A482A2C for ; Wed, 26 Jul 2023 18:46:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-1bb5dda9fb7so9752fac.0 for ; Wed, 26 Jul 2023 09:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690389967; x=1690994767; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2Rd5q9j7qRELQLBT8cyFDzu+amVc73lxBd7tQRjm0V4=; b=zLkK+FzERe48JUiqgRrGn2DI0AxswqqAzSfzm+CQSvyyypM90YleQTXckDtKpMhnj8 EA74MAhw1nOz5h80mIPaiRdWG3Q7qGpggqZgY4BhZT+k/iZZuZO4pihzq4EFNrABqpwZ 424E/E/Qlgda3DYZDT2roMtwfiCWlcYzZn/o6JLs5B5oUDgCILIMX4YtEJ2edFaK+z5Q Qxte4fO5niztMz/iE6dFTb9LmsAfmhUAfOM9r4WWswACVZOfVY3UW+WTV8tjWInKUy1r 3olP9juzVkdfrYEjG/6tsOOiAfaDZWXqdZpRZRJB0nR0NxW6rs31GPw+WdEhqQYZLFaE IBzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690389967; x=1690994767; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2Rd5q9j7qRELQLBT8cyFDzu+amVc73lxBd7tQRjm0V4=; b=fOyv8y5M5TEvO3Ma7W8f5cnqz+oeEcl2rGDK4+dF7Fhh++iowT8czfOTrRdUxbqTKI OHQjZA3k7dlsqPZoLSkrM3nBk4/WOeiRB2axEIjfAneGQ85kSs2e8XJzdadallEGzKjQ qKeeaTNx6AGRyXOF0CFwJTm7BuIBIE2bqrmFnYqnvMDR+RIBYtz09Mow9MPdetmsqFSh Owq2Z655nsN1oQwK65LCoI9NOvXnlz6tvEWH5PR7C+gfSh6V/wLvwzOZldUWnqbT5aba 7o3dz0G1ylUwdhIoObVv8RnJZLpsJvZ+8O7lh9XkxA1hkUOHkw5mL1cAQZlrL3d7hvaJ ujIQ== X-Gm-Message-State: ABy/qLbMerEkQqqKB/5om6/t82L1yYT/IjtTHK7LddsU3c7jpV6rP7rW 0+dfmroF8x9O1eDrRkb5F9dLNtPqIJfdsGVonOA= X-Google-Smtp-Source: APBJJlG1sv3XokIjbEtecP/ZG6e/ICYMOidy7zjOU4D/9Z5lCRyefHDb0fGq1z7sjiEWy8EixcNcig== X-Received: by 2002:a17:90a:128e:b0:263:25f9:65b2 with SMTP id g14-20020a17090a128e00b0026325f965b2mr1337677pja.4.1690360721878; Wed, 26 Jul 2023 01:38:41 -0700 (PDT) Received: from laputa.. ([2400:4050:c3e1:100:b3f9:1d29:2d48:cb41]) by smtp.gmail.com with ESMTPSA id 16-20020a17090a191000b00263c6b44dd8sm865986pjg.15.2023.07.26.01.38.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 01:38:38 -0700 (PDT) From: AKASHI Takahiro To: trini@konsulko.com, sjg@chromium.org Cc: etienne.carriere@st.com, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH v2 01/12] scmi: refactor the code to hide a channel from devices Date: Wed, 26 Jul 2023 17:37:57 +0900 Message-ID: <20230726083808.140780-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230726083808.140780-1-takahiro.akashi@linaro.org> References: <20230726083808.140780-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The commit 85dc58289238 ("firmware: scmi: prepare uclass to pass channel reference") added an explicit parameter, channel, but it seems to make the code complex. Hiding this parameter will allow for adding a generic (protocol-agnostic) helper function, i.e. for PROTOCOL_VERSION, in a later patch. Signed-off-by: AKASHI Takahiro Reviewed-by: Simon Glass --- v2 * new patch --- drivers/clk/clk_scmi.c | 27 ++------- drivers/firmware/scmi/scmi_agent-uclass.c | 74 ++++++++++++++++++----- drivers/power/regulator/scmi_regulator.c | 27 +++------ drivers/reset/reset-scmi.c | 19 +----- include/scmi_agent.h | 15 +++-- 5 files changed, 86 insertions(+), 76 deletions(-) diff --git a/drivers/clk/clk_scmi.c b/drivers/clk/clk_scmi.c index d172fed24c9d..34a49363a51a 100644 --- a/drivers/clk/clk_scmi.c +++ b/drivers/clk/clk_scmi.c @@ -13,17 +13,8 @@ #include #include -/** - * struct scmi_clk_priv - Private data for SCMI clocks - * @channel: Reference to the SCMI channel to use - */ -struct scmi_clk_priv { - struct scmi_channel *channel; -}; - static int scmi_clk_get_num_clock(struct udevice *dev, size_t *num_clocks) { - struct scmi_clk_priv *priv = dev_get_priv(dev); struct scmi_clk_protocol_attr_out out; struct scmi_msg msg = { .protocol_id = SCMI_PROTOCOL_ID_CLOCK, @@ -33,7 +24,7 @@ static int scmi_clk_get_num_clock(struct udevice *dev, size_t *num_clocks) }; int ret; - ret = devm_scmi_process_msg(dev, priv->channel, &msg); + ret = devm_scmi_process_msg(dev, &msg); if (ret) return ret; @@ -44,7 +35,6 @@ static int scmi_clk_get_num_clock(struct udevice *dev, size_t *num_clocks) static int scmi_clk_get_attibute(struct udevice *dev, int clkid, char **name) { - struct scmi_clk_priv *priv = dev_get_priv(dev); struct scmi_clk_attribute_in in = { .clock_id = clkid, }; @@ -59,7 +49,7 @@ static int scmi_clk_get_attibute(struct udevice *dev, int clkid, char **name) }; int ret; - ret = devm_scmi_process_msg(dev, priv->channel, &msg); + ret = devm_scmi_process_msg(dev, &msg); if (ret) return ret; @@ -70,7 +60,6 @@ static int scmi_clk_get_attibute(struct udevice *dev, int clkid, char **name) static int scmi_clk_gate(struct clk *clk, int enable) { - struct scmi_clk_priv *priv = dev_get_priv(clk->dev); struct scmi_clk_state_in in = { .clock_id = clk->id, .attributes = enable, @@ -81,7 +70,7 @@ static int scmi_clk_gate(struct clk *clk, int enable) in, out); int ret; - ret = devm_scmi_process_msg(clk->dev, priv->channel, &msg); + ret = devm_scmi_process_msg(clk->dev, &msg); if (ret) return ret; @@ -100,7 +89,6 @@ static int scmi_clk_disable(struct clk *clk) static ulong scmi_clk_get_rate(struct clk *clk) { - struct scmi_clk_priv *priv = dev_get_priv(clk->dev); struct scmi_clk_rate_get_in in = { .clock_id = clk->id, }; @@ -110,7 +98,7 @@ static ulong scmi_clk_get_rate(struct clk *clk) in, out); int ret; - ret = devm_scmi_process_msg(clk->dev, priv->channel, &msg); + ret = devm_scmi_process_msg(clk->dev, &msg); if (ret < 0) return ret; @@ -123,7 +111,6 @@ static ulong scmi_clk_get_rate(struct clk *clk) static ulong scmi_clk_set_rate(struct clk *clk, ulong rate) { - struct scmi_clk_priv *priv = dev_get_priv(clk->dev); struct scmi_clk_rate_set_in in = { .clock_id = clk->id, .flags = SCMI_CLK_RATE_ROUND_CLOSEST, @@ -136,7 +123,7 @@ static ulong scmi_clk_set_rate(struct clk *clk, ulong rate) in, out); int ret; - ret = devm_scmi_process_msg(clk->dev, priv->channel, &msg); + ret = devm_scmi_process_msg(clk->dev, &msg); if (ret < 0) return ret; @@ -149,12 +136,11 @@ static ulong scmi_clk_set_rate(struct clk *clk, ulong rate) static int scmi_clk_probe(struct udevice *dev) { - struct scmi_clk_priv *priv = dev_get_priv(dev); struct clk *clk; size_t num_clocks, i; int ret; - ret = devm_scmi_of_get_channel(dev, &priv->channel); + ret = devm_scmi_of_get_channel(dev); if (ret) return ret; @@ -205,5 +191,4 @@ U_BOOT_DRIVER(scmi_clock) = { .id = UCLASS_CLK, .ops = &scmi_clk_ops, .probe = scmi_clk_probe, - .priv_auto = sizeof(struct scmi_clk_priv *), }; diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c index 02de692d66f3..39cf15c88f75 100644 --- a/drivers/firmware/scmi/scmi_agent-uclass.c +++ b/drivers/firmware/scmi/scmi_agent-uclass.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -129,43 +130,88 @@ static const struct scmi_agent_ops *transport_dev_ops(struct udevice *dev) return (const struct scmi_agent_ops *)dev->driver->ops; } -int devm_scmi_of_get_channel(struct udevice *dev, struct scmi_channel **channel) +/** + * scmi_of_get_channel() - Get SCMI channel handle + * + * @dev: SCMI agent device + * @channel: Output reference to the SCMI channel upon success + * + * On return, @channel will be set. + * Return 0 on success and a negative errno on failure + */ +static int scmi_of_get_channel(struct udevice *dev, struct scmi_channel **channel) +{ + const struct scmi_agent_ops *ops; + + ops = transport_dev_ops(dev); + if (ops->of_get_channel) + return ops->of_get_channel(dev, channel); + else + return -EPROTONOSUPPORT; +} + +int devm_scmi_of_get_channel(struct udevice *dev) { struct udevice *parent; + struct scmi_agent_proto_priv *priv = dev_get_parent_priv(dev); + int ret; parent = find_scmi_transport_device(dev); if (!parent) return -ENODEV; - if (transport_dev_ops(parent)->of_get_channel) - return transport_dev_ops(parent)->of_get_channel(parent, channel); + ret = scmi_of_get_channel(parent, &priv->channel); + if (ret == -EPROTONOSUPPORT) { + /* Drivers without a get_channel operator don't need a channel ref */ + priv->channel = NULL; - /* Drivers without a get_channel operator don't need a channel ref */ - *channel = NULL; + return 0; + } - return 0; + return ret; } -int devm_scmi_process_msg(struct udevice *dev, struct scmi_channel *channel, - struct scmi_msg *msg) +/** + * scmi_process_msg() - Send and process an SCMI message + * + * Send a message to an SCMI server. + * Caller sets scmi_msg::out_msg_sz to the output message buffer size. + * + * @dev: SCMI agent device + * @channel: Communication channel for the device + * @msg: Message structure reference + * + * On return, scmi_msg::out_msg_sz stores the response payload size. + * Return: 0 on success and a negative errno on failure + */ +static int scmi_process_msg(struct udevice *dev, struct scmi_channel *channel, + struct scmi_msg *msg) { const struct scmi_agent_ops *ops; + + ops = transport_dev_ops(dev); + if (ops->process_msg) + return ops->process_msg(dev, channel, msg); + else + return -EPROTONOSUPPORT; +} + +int devm_scmi_process_msg(struct udevice *dev, struct scmi_msg *msg) +{ struct udevice *parent; + struct scmi_agent_proto_priv *priv = dev_get_parent_priv(dev); parent = find_scmi_transport_device(dev); if (!parent) return -ENODEV; - ops = transport_dev_ops(parent); - - if (ops->process_msg) - return ops->process_msg(parent, channel, msg); - - return -EPROTONOSUPPORT; + return scmi_process_msg(parent, priv->channel, msg); } UCLASS_DRIVER(scmi_agent) = { .id = UCLASS_SCMI_AGENT, .name = "scmi_agent", .post_bind = scmi_bind_protocols, + .per_device_plat_auto = sizeof(struct scmi_agent_priv), + .per_child_auto = sizeof(struct scmi_agent_proto_priv *), }; diff --git a/drivers/power/regulator/scmi_regulator.c b/drivers/power/regulator/scmi_regulator.c index 801148036ff6..08918b20872c 100644 --- a/drivers/power/regulator/scmi_regulator.c +++ b/drivers/power/regulator/scmi_regulator.c @@ -25,18 +25,9 @@ struct scmi_regulator_platdata { u32 domain_id; }; -/** - * struct scmi_regulator_priv - Private data for SCMI voltage regulator - * @channel: Reference to the SCMI channel to use - */ -struct scmi_regulator_priv { - struct scmi_channel *channel; -}; - static int scmi_voltd_set_enable(struct udevice *dev, bool enable) { struct scmi_regulator_platdata *pdata = dev_get_plat(dev); - struct scmi_regulator_priv *priv = dev_get_priv(dev); struct scmi_voltd_config_set_in in = { .domain_id = pdata->domain_id, .config = enable ? SCMI_VOLTD_CONFIG_ON : SCMI_VOLTD_CONFIG_OFF, @@ -47,7 +38,7 @@ static int scmi_voltd_set_enable(struct udevice *dev, bool enable) in, out); int ret; - ret = devm_scmi_process_msg(dev, priv->channel, &msg); + ret = devm_scmi_process_msg(dev, &msg); if (ret) return ret; @@ -57,7 +48,6 @@ static int scmi_voltd_set_enable(struct udevice *dev, bool enable) static int scmi_voltd_get_enable(struct udevice *dev) { struct scmi_regulator_platdata *pdata = dev_get_plat(dev); - struct scmi_regulator_priv *priv = dev_get_priv(dev); struct scmi_voltd_config_get_in in = { .domain_id = pdata->domain_id, }; @@ -67,7 +57,7 @@ static int scmi_voltd_get_enable(struct udevice *dev) in, out); int ret; - ret = devm_scmi_process_msg(dev, priv->channel, &msg); + ret = devm_scmi_process_msg(dev, &msg); if (ret < 0) return ret; @@ -80,7 +70,6 @@ static int scmi_voltd_get_enable(struct udevice *dev) static int scmi_voltd_set_voltage_level(struct udevice *dev, int uV) { - struct scmi_regulator_priv *priv = dev_get_priv(dev); struct scmi_regulator_platdata *pdata = dev_get_plat(dev); struct scmi_voltd_level_set_in in = { .domain_id = pdata->domain_id, @@ -92,7 +81,7 @@ static int scmi_voltd_set_voltage_level(struct udevice *dev, int uV) in, out); int ret; - ret = devm_scmi_process_msg(dev, priv->channel, &msg); + ret = devm_scmi_process_msg(dev, &msg); if (ret < 0) return ret; @@ -101,7 +90,6 @@ static int scmi_voltd_set_voltage_level(struct udevice *dev, int uV) static int scmi_voltd_get_voltage_level(struct udevice *dev) { - struct scmi_regulator_priv *priv = dev_get_priv(dev); struct scmi_regulator_platdata *pdata = dev_get_plat(dev); struct scmi_voltd_level_get_in in = { .domain_id = pdata->domain_id, @@ -112,7 +100,7 @@ static int scmi_voltd_get_voltage_level(struct udevice *dev) in, out); int ret; - ret = devm_scmi_process_msg(dev, priv->channel, &msg); + ret = devm_scmi_process_msg(dev, &msg); if (ret < 0) return ret; @@ -140,7 +128,6 @@ static int scmi_regulator_of_to_plat(struct udevice *dev) static int scmi_regulator_probe(struct udevice *dev) { struct scmi_regulator_platdata *pdata = dev_get_plat(dev); - struct scmi_regulator_priv *priv = dev_get_priv(dev); struct scmi_voltd_attr_in in = { 0 }; struct scmi_voltd_attr_out out = { 0 }; struct scmi_msg scmi_msg = { @@ -153,14 +140,14 @@ static int scmi_regulator_probe(struct udevice *dev) }; int ret; - ret = devm_scmi_of_get_channel(dev->parent, &priv->channel); + ret = devm_scmi_of_get_channel(dev); if (ret) return ret; /* Check voltage domain is known from SCMI server */ in.domain_id = pdata->domain_id; - ret = devm_scmi_process_msg(dev, priv->channel, &scmi_msg); + ret = devm_scmi_process_msg(dev, &scmi_msg); if (ret) { dev_err(dev, "Failed to query voltage domain %u: %d\n", pdata->domain_id, ret); @@ -184,7 +171,6 @@ U_BOOT_DRIVER(scmi_regulator) = { .probe = scmi_regulator_probe, .of_to_plat = scmi_regulator_of_to_plat, .plat_auto = sizeof(struct scmi_regulator_platdata), - .priv_auto = sizeof(struct scmi_regulator_priv *), }; static int scmi_regulator_bind(struct udevice *dev) @@ -209,4 +195,5 @@ U_BOOT_DRIVER(scmi_voltage_domain) = { .name = "scmi_voltage_domain", .id = UCLASS_NOP, .bind = scmi_regulator_bind, + .per_child_auto = sizeof(struct scmi_agent_proto_priv *), }; diff --git a/drivers/reset/reset-scmi.c b/drivers/reset/reset-scmi.c index 122556162ec3..b76711f0a8fb 100644 --- a/drivers/reset/reset-scmi.c +++ b/drivers/reset/reset-scmi.c @@ -13,17 +13,8 @@ #include #include -/** - * struct scmi_reset_priv - Private data for SCMI reset controller - * @channel: Reference to the SCMI channel to use - */ -struct scmi_reset_priv { - struct scmi_channel *channel; -}; - static int scmi_reset_set_level(struct reset_ctl *rst, bool assert_not_deassert) { - struct scmi_reset_priv *priv = dev_get_priv(rst->dev); struct scmi_rd_reset_in in = { .domain_id = rst->id, .flags = assert_not_deassert ? SCMI_RD_RESET_FLAG_ASSERT : 0, @@ -35,7 +26,7 @@ static int scmi_reset_set_level(struct reset_ctl *rst, bool assert_not_deassert) in, out); int ret; - ret = devm_scmi_process_msg(rst->dev, priv->channel, &msg); + ret = devm_scmi_process_msg(rst->dev, &msg); if (ret) return ret; @@ -54,7 +45,6 @@ static int scmi_reset_deassert(struct reset_ctl *rst) static int scmi_reset_request(struct reset_ctl *rst) { - struct scmi_reset_priv *priv = dev_get_priv(rst->dev); struct scmi_rd_attr_in in = { .domain_id = rst->id, }; @@ -68,7 +58,7 @@ static int scmi_reset_request(struct reset_ctl *rst) * We don't really care about the attribute, just check * the reset domain exists. */ - ret = devm_scmi_process_msg(rst->dev, priv->channel, &msg); + ret = devm_scmi_process_msg(rst->dev, &msg); if (ret) return ret; @@ -83,9 +73,7 @@ static const struct reset_ops scmi_reset_domain_ops = { static int scmi_reset_probe(struct udevice *dev) { - struct scmi_reset_priv *priv = dev_get_priv(dev); - - return devm_scmi_of_get_channel(dev, &priv->channel); + return devm_scmi_of_get_channel(dev); } U_BOOT_DRIVER(scmi_reset_domain) = { @@ -93,5 +81,4 @@ U_BOOT_DRIVER(scmi_reset_domain) = { .id = UCLASS_RESET, .ops = &scmi_reset_domain_ops, .probe = scmi_reset_probe, - .priv_auto = sizeof(struct scmi_reset_priv *), }; diff --git a/include/scmi_agent.h b/include/scmi_agent.h index ee6286366df7..577892029ff8 100644 --- a/include/scmi_agent.h +++ b/include/scmi_agent.h @@ -15,6 +15,14 @@ struct udevice; struct scmi_channel; +/** + * struct scmi_agent_proto_priv - Private data in device for SCMI agent + * @channel: Reference to the SCMI channel to use + */ +struct scmi_agent_proto_priv { + struct scmi_channel *channel; +}; + /* * struct scmi_msg - Context of a SCMI message sent and the response received * @@ -49,10 +57,9 @@ struct scmi_msg { * devm_scmi_of_get_channel() - Get SCMI channel handle from SCMI agent DT node * * @dev: Device requesting a channel - * @channel: Output reference to the SCMI channel upon success * @return 0 on success and a negative errno on failure */ -int devm_scmi_of_get_channel(struct udevice *dev, struct scmi_channel **channel); +int devm_scmi_of_get_channel(struct udevice *dev); /** * devm_scmi_process_msg() - Send and process an SCMI message @@ -62,12 +69,10 @@ int devm_scmi_of_get_channel(struct udevice *dev, struct scmi_channel **channel) * On return, scmi_msg::out_msg_sz stores the response payload size. * * @dev: SCMI device - * @channel: Communication channel for the device * @msg: Message structure reference * Return: 0 on success and a negative errno on failure */ -int devm_scmi_process_msg(struct udevice *dev, struct scmi_channel *channel, - struct scmi_msg *msg); +int devm_scmi_process_msg(struct udevice *dev, struct scmi_msg *msg); /** * scmi_to_linux_errno() - Convert an SCMI error code into a Linux errno code