Re: [PATCH v15 28/35] firmware: arm_scmi: Add un-managed methods to get/put protocols operations
From: Jonathan Cameron
Date: Tue Nov 10 2026 - 18:02:37 EST
On Mon, 9 Nov 2026 09:12:14 +0000
Cristian Marussi <cristian.marussi@xxxxxxx> wrote:
> Add a couple of simple common methods to be able to manually get and put
> protocol operations to address situation in which devres managed methods
> cannot be used.
>
> Signed-off-by: Cristian Marussi <cristian.marussi@xxxxxxx>
> /**
> * scmi_devm_protocol_acquire - Devres managed helper to get hold of a protocol
> * @sdev: A reference to an scmi_device whose embedded struct device is to
> @@ -2697,6 +2722,18 @@ static void scmi_devm_protocol_put(struct scmi_device *sdev, u8 protocol_id)
> WARN_ON(ret);
> }
>
> +/**
> + * scmi_protocol_operations_put - UnManaged put protocol operations
Bonus space after -
> + *
> + * @handle: A reference to the SCMI platform instance.
> + * @protocol_id: The protocol being released.
> + */
> +static void scmi_protocol_operations_put(const struct scmi_handle *handle,
> + u8 protocol_id)
> +{
> + scmi_protocol_release(handle, protocol_id);
> +}
> +