Thanks, Peng.  This is all good feedback and I'll fix it in the
next version.

On Wed, Feb 25, 2026 at 10:03:13PM +0800, Peng Fan wrote:
> >+int scmi_pinctrl_attrs(struct udevice *dev, enum select_type select_type,
> >+                   unsigned int selector, bool *gpio, unsigned int *count,
> >+                   char *name)
> >+{
> >+    struct scmi_pinctrl_attrs_in in;
> >+    struct scmi_pinctrl_attrs_out out;
> >+    struct scmi_msg msg = {
> >+            .protocol_id = SCMI_PROTOCOL_ID_PINCTRL,
> >+            .message_id = SCMI_PINCTRL_ATTRIBUTES,
> >+            .in_msg = (u8 *)&in,
> >+            .in_msg_sz = sizeof(in),
> >+            .out_msg = (u8 *)&out,
> >+            .out_msg_sz = sizeof(out),
> >+    };
> >+    int ret;
> >+
> >+    in.select_type = select_type;
> >+    in.id = selector;
> >+
> >+    ret = devm_scmi_process_msg(dev, &msg);
> >+    if (ret)
> >+            return ret;
> >+    if (out.status)
> >+            return scmi_to_linux_errno(out.status);
> >+
> >+    //estended_name = FIELD_GET(BIT(31), out.attr);
> 
> Drop this?
> 

Yeah.  I don't think anyone cares about the extended name ever.

> >+    if (gpio)
> >+            *gpio = FIELD_GET(BIT(17), out.attr);
> >+    //pin_only = FIELD_GET(BIT(16), out.attr);
> 
> Ditto.
> 

Huh.  Yeah.  It's not really clear how to handle pin only GPIO pins.

[ snip ]

> >+
> >+#define SCMI_PINCTRL_CONFIG_SETTINGS_FUNCTION -2u
> 
> I see spec is using 2, not understand well -2u here.
> When set to 2, no configuration values need to be returned.
> The command only returns the function selected for the pin or the group.
> 

This was just a magic define I used internally.

regards,
dan carpenter

Reply via email to