
18 Oct
2023
18 Oct
'23
11 a.m.
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