]> git.baikalelectronics.ru Git - uboot.git/commit
scmi: change parameter dev in devm_scmi_process_msg
authorEtienne Carriere <etienne.carriere@linaro.org>
Mon, 21 Feb 2022 08:22:40 +0000 (09:22 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 2 Mar 2022 22:42:06 +0000 (17:42 -0500)
commit7c00c4b251a7d330928c5707b318c8f94b78aac8
tree41db4e7af39822d4ab89a2eb18326d12475f9da9
parent576e002e98d920c33a09e9c49ea2df83b6ca0b7a
scmi: change parameter dev in devm_scmi_process_msg

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@denx.de>
Cc: Sean Anderson <seanga2@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
drivers/clk/clk_scmi.c
drivers/firmware/scmi/scmi_agent-uclass.c
drivers/power/regulator/scmi_regulator.c
drivers/reset/reset-scmi.c
include/scmi_agent.h