[PATCH 3/5] scmi: change parameter dev in devm_scmi_process_msg

Patrick DELAUNAY patrick.delaunay at foss.st.com
Fri Feb 11 14:47:21 CET 2022


Hi

On 2/11/22 13:07, Etienne Carriere wrote:
> Changes devm_scmi_process_msg() first argument from target parent device
> to current SCMI device and lookup the SCMI agent device among SCMI device
> parents for find the SCMI agent operator needed for communication with
> the firmware.
>
> This change is needed in order to support CCF in clk_scmi driver unless
> what CCF will fail to find the right udevice related to exposed SCMI
> clocks.
>
> This patch allows to simplify the caller sequence, using SCMI device
> reference as parameter instead of knowing SCMI uclass topology. This
> change also adds some protection in case devm_scmi_process_msg() API
> function is called for an invalid device type.
>
> Cc: Lukasz Majewski <lukma at denx.de>
> Cc: Sean Anderson <seanga2 at gmail.com>
> Cc: Jaehoon Chung <jh80.chung at samsung.com>
> Cc: Patrick Delaunay <patrick.delaunay at foss.st.com>
> Signed-off-by: Etienne Carriere <etienne.carriere at linaro.org>
> ---
>   drivers/clk/clk_scmi.c                    |  6 +++---
>   drivers/firmware/scmi/scmi_agent-uclass.c | 17 +++++++++++++++--
>   drivers/power/regulator/scmi_regulator.c  | 10 +++++-----
>   drivers/reset/reset-scmi.c                |  4 ++--
>   include/scmi_agent.h                      |  2 +-
>   5 files changed, 26 insertions(+), 13 deletions(-)
>

Reviewed-by: Patrick Delaunay <patrick.delaunay at foss.st.com>

Thanks
Patrick



More information about the U-Boot mailing list