diff options
author | Cristian Marussi <cristian.marussi@arm.com> | 2022-12-22 18:50:47 +0000 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2023-01-19 09:49:54 +0000 |
commit | 2c3e674465e73e2f7eb52c39dc5c5e97e78e68ea (patch) | |
tree | 7a795053d0208a3685c61071ccf51a41accc0907 /drivers/firmware/arm_scmi/common.h | |
parent | 971fc0665f1361f23251e4d85fac4aed1b683505 (diff) |
firmware: arm_scmi: Refactor device create/destroy helpers
Refactor SCMI device create/destroy helpers: it is now possible to ask
for the creation of all the currently requested devices for a whole
protocol, not only for the creation of a single well-defined device.
While at that, re-instate uniqueness checks on the creation of SCMI
SystemPower devices.
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20221222185049.737625-8-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 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h index 07d34954c060..19726a037991 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -107,6 +107,11 @@ extern struct bus_type scmi_bus_type; #define SCMI_BUS_NOTIFY_DEVICE_UNREQUEST 1 extern struct blocking_notifier_head scmi_requested_devices_nh; +struct scmi_device *scmi_device_create(struct device_node *np, + struct device *parent, int protocol, + const char *name); +void scmi_device_destroy(struct device *parent, int protocol, const char *name); + int scmi_protocol_acquire(const struct scmi_handle *handle, u8 protocol_id); void scmi_protocol_release(const struct scmi_handle *handle, u8 protocol_id); @@ -168,9 +173,6 @@ struct scmi_transport_ops { bool (*poll_done)(struct scmi_chan_info *cinfo, struct scmi_xfer *xfer); }; -struct scmi_device *scmi_child_dev_find(struct device *parent, - int prot_id, const char *name); - /** * struct scmi_desc - Description of SoC integration * |