mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
firmware: arm_scmi: Extend protocol registration interfaces
Extend common protocol registration routines and provide some new generic protocols get/put helpers that can track protocols usage and automatically perform the proper initialization and de-initialization on demand when required. Convert all standard protocols to use this new registration scheme while keeping them all still using the usual initialization logic bound to SCMI devices probing. Link: https://lore.kernel.org/r/20210316124903.35011-2-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
908a4f778d
commit
48dc16e2e5
12 changed files with 334 additions and 45 deletions
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* SCMI Message Protocol driver header
|
||||
*
|
||||
* Copyright (C) 2018 ARM Ltd.
|
||||
* Copyright (C) 2018-2021 ARM Ltd.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_SCMI_PROTOCOL_H
|
||||
|
@ -712,9 +712,9 @@ static inline void scmi_driver_unregister(struct scmi_driver *driver) {}
|
|||
#define module_scmi_driver(__scmi_driver) \
|
||||
module_driver(__scmi_driver, scmi_register, scmi_unregister)
|
||||
|
||||
typedef int (*scmi_prot_init_fn_t)(struct scmi_handle *);
|
||||
int scmi_protocol_register(int protocol_id, scmi_prot_init_fn_t fn);
|
||||
void scmi_protocol_unregister(int protocol_id);
|
||||
struct scmi_protocol;
|
||||
int scmi_protocol_register(const struct scmi_protocol *proto);
|
||||
void scmi_protocol_unregister(const struct scmi_protocol *proto);
|
||||
|
||||
/* SCMI Notification API - Custom Event Reports */
|
||||
enum scmi_notification_events {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue