firmware: arm_scmi: Add dynamic scmi devices creation
authorCristian Marussi <cristian.marussi@arm.com>
Tue, 16 Mar 2021 12:49:03 +0000 (12:49 +0000)
committerSudeep Holla <sudeep.holla@arm.com>
Tue, 30 Mar 2021 15:35:16 +0000 (16:35 +0100)
commitd4f9dddd21f39395c62ea12d3d91239637d4805f
treebc84ab12611d2da1d2e465e6b16a61f3276de3ca
parentf5800e0bf6f9b7ff7dfa4db8b0681bd062eb16a4
firmware: arm_scmi: Add dynamic scmi devices creation

Having added the support for SCMI protocols as modules in order to let
vendors extend the SCMI core with their own additions it seems odd to
then force SCMI drivers built on top to use a static device table to
declare their devices since this way any new SCMI drivers addition
would need the core SCMI device table to be updated too.

Remove the static core device table and let SCMI drivers to simply declare
which device/protocol pair they need at initialization time: the core will
then take care to generate such devices dynamically during platform
initialization or at module loading time, as long as the requested
underlying protocol is defined in the devicetree.

Link: https://lore.kernel.org/r/20210316124903.35011-39-cristian.marussi@arm.com
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/bus.c
drivers/firmware/arm_scmi/common.h
drivers/firmware/arm_scmi/driver.c