mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
firmware: arm_scmi: Add protocol modularization support
Extend SCMI protocols accounting mechanism to address possible module usage and add the support to possibly define new protocols as loadable modules. Keep the standard protocols built into the SCMI core. Link: https://lore.kernel.org/r/20210316124903.35011-38-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>
This commit is contained in:
parent
aa1fd3e4cb
commit
f5800e0bf6
12 changed files with 55 additions and 5 deletions
|
@ -704,6 +704,18 @@ static inline void scmi_driver_unregister(struct scmi_driver *driver) {}
|
|||
#define module_scmi_driver(__scmi_driver) \
|
||||
module_driver(__scmi_driver, scmi_register, scmi_unregister)
|
||||
|
||||
/**
|
||||
* module_scmi_protocol() - Helper macro for registering a scmi protocol
|
||||
* @__scmi_protocol: scmi_protocol structure
|
||||
*
|
||||
* Helper macro for scmi drivers to set up proper module init / exit
|
||||
* functions. Replaces module_init() and module_exit() and keeps people from
|
||||
* printing pointless things to the kernel log when their driver is loaded.
|
||||
*/
|
||||
#define module_scmi_protocol(__scmi_protocol) \
|
||||
module_driver(__scmi_protocol, \
|
||||
scmi_protocol_register, scmi_protocol_unregister)
|
||||
|
||||
struct scmi_protocol;
|
||||
int scmi_protocol_register(const struct scmi_protocol *proto);
|
||||
void scmi_protocol_unregister(const struct scmi_protocol *proto);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue