[PATCH RFC v2 2/7] firmware: arm_scmi: add is_gpio() function
Cristian Marussi
cristian.marussi at arm.com
Thu Aug 21 01:19:11 PDT 2025
On Sun, Jul 20, 2025 at 02:38:42PM -0500, Dan Carpenter wrote:
> Parse the GPIO response in scmi_pinctrl_attributes(), set the gpio
> flag, and create an is_gpio() function pointer so that it can be queried.
>
Hi,
> In SCMI only functions and pins have a GPIO flag so that's why groups are
> not handled here.
>
> Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>
[snip]
> static const struct scmi_pinctrl_proto_ops pinctrl_proto_ops = {
> .count_get = scmi_pinctrl_count_get,
> .name_get = scmi_pinctrl_name_get,
> + .is_gpio = scmi_pinctrl_is_gpio,
> .group_pins_get = scmi_pinctrl_group_pins_get,
> .function_groups_get = scmi_pinctrl_function_groups_get,
> .mux_set = scmi_pinctrl_mux_set,
> diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
> index 688466a0e816..b4ad32067fc4 100644
> --- a/include/linux/scmi_protocol.h
> +++ b/include/linux/scmi_protocol.h
> @@ -792,6 +792,8 @@ struct scmi_pinctrl_proto_ops {
> int (*name_get)(const struct scmi_protocol_handle *ph, u32 selector,
> enum scmi_pinctrl_selector_type type,
> const char **name);
> + int (*is_gpio)(const struct scmi_protocol_handle *ph, u32 selector,
> + enum scmi_pinctrl_selector_type type);
Doxygen comment above too please...
With that fixed, LGTM.
Reviewed-by: Cristian Marussi <cristian.marussi at arm.com>
Thanks,
Cristian
More information about the linux-arm-kernel
mailing list