diff options
author | Cristian Marussi <cristian.marussi@arm.com> | 2021-03-16 15:48:31 +0300 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2021-03-29 12:00:35 +0300 |
commit | 533c7095b1ff9271a32e5a4b45b2d35f1432ea04 (patch) | |
tree | a998893bc27acf3d6058dfe275ed0f399d7131f4 /drivers/firmware/arm_scmi/common.h | |
parent | 5ad3d1cf7d34c00aa5b425d93373b5c0044aa0a9 (diff) | |
download | linux-533c7095b1ff9271a32e5a4b45b2d35f1432ea04.tar.xz |
firmware: arm_scmi: Refactor events registration
Add a new refactored protocol events registration helper and invoke it
from the centralized initialization process triggered by get_ops() and
friends.
Also add a `get_num_sources` as a new optional callback amongst protocol
events operations. Finally remove events registration call-sites from
within the legacy protocol init routines.
Link: https://lore.kernel.org/r/20210316124903.35011-7-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>
Diffstat (limited to 'drivers/firmware/arm_scmi/common.h')
-rw-r--r-- | drivers/firmware/arm_scmi/common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h index e90ab458b08e..9478b8240589 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -226,6 +226,7 @@ typedef int (*scmi_prot_init_fn_t)(struct scmi_handle *); * @instance_deinit: Optional protocol de-initialization function. * @ops: Optional reference to the operations provided by the protocol and * exposed in scmi_protocol.h. + * @events: An optional reference to the events supported by this protocol. */ struct scmi_protocol { const u8 id; @@ -233,6 +234,7 @@ struct scmi_protocol { const scmi_prot_init_fn_t instance_init; const scmi_prot_init_fn_t instance_deinit; const void *ops; + const struct scmi_protocol_events *events; }; int __init scmi_bus_init(void); |