commit 83c63f0d118 (led: Move OF "label" property parsing to core)
Rasmus Villemoes
rasmus.villemoes at prevas.dk
Wed Oct 18 11:00:41 CEST 2023
On 18/10/2023 09.43, Rasmus Villemoes wrote:
> On 17/10/2023 17.33, Marek Vasut wrote:
>> Which string ? The "bcm6753-led" is driver name , so that would have to
>> be parametrized.
>
> Exactly. The only difference between the two examples (apart from the
> scope of the variables) is the driver name, but I think a
> generic_led_bind() could just do this inside the loop:
>
> device_bind_driver_to_node(parent, parent->driver->name,
> ofnode_get_name(node),
> node, &dev);
>
Ah, no, that won't work for the drivers that do distinguish between the
top-level and child nodes, e.g. the gpio one. Oh well, a one-line
wrapper in each driver is still better than what we have currently.
Rasmus
More information about the U-Boot
mailing list