Re: [PATCH v2 4/4] x86/geode: use PROPERTY_ENTRY_REF for GPIO properties

Andy Shevchenko
2026-03-30T10:48:21Z

On Sun, Mar 29, 2026 at 07:27:51PM -0700, Dmitry Torokhov wrote:
> Now that the PROPERTY_ENTRY_REF macro can accept a pointer to struct

PROPERTY_ENTRY_REF()

> software_node_ref_args directly, we don't need to use the more
> cumbersome PROPERTY_ENTRY_REF_ARRAY_LEN(..., 1) variant.

...

> int __init geode_create_leds(const char *label, const struct geode_led *leds,

> leds[i].pin,
> GPIO_ACTIVE_LOW);

Wondering if we want to have a wrapper for the above like

#define PROPERTY_ENTRY_GPIO_REF(...) \
SOFTWARE_NODE_REFERENCE(...)

(naming most likely sucks, and yeah, it would make sense if name is shorter
than the currently used one).

> props[i * 3 + 0] =
> - PROPERTY_ENTRY_REF_ARRAY_LEN("gpios", &gpio_refs[i], 1);
> + PROPERTY_ENTRY_REF("gpios", &gpio_refs[i]);

--
With Best Regards,
Andy Shevchenko