summaryrefslogtreecommitdiff
path: root/include/led.h
diff options
context:
space:
mode:
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>2023-11-17 12:38:08 +0100
committerTom Rini <trini@konsulko.com>2023-12-13 11:35:13 -0500
commit3bf0515a07f7e82f2cdbf435bfd7fcd66651852d (patch)
tree9a39b70be62893e715bd6d5aeb7ce8fda18eedc9 /include/led.h
parent067e4ce35b944314742cb46b3c82cb9b801c50ca (diff)
downloadu-boot-3bf0515a07f7e82f2cdbf435bfd7fcd66651852d.tar.gz
u-boot-3bf0515a07f7e82f2cdbf435bfd7fcd66651852d.tar.bz2
u-boot-3bf0515a07f7e82f2cdbf435bfd7fcd66651852d.zip
led: introduce led_bind_generic()
All existing drivers in drivers/led/ contain a .bind method that does exactly the same thing, with just the actual driver name differing. Create a helper so all those individual methods can be changed to one-liners. Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Diffstat (limited to 'include/led.h')
-rw-r--r--include/led.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/led.h b/include/led.h
index 329041008c..a635316628 100644
--- a/include/led.h
+++ b/include/led.h
@@ -110,4 +110,12 @@ enum led_state_t led_get_state(struct udevice *dev);
*/
int led_set_period(struct udevice *dev, int period_ms);
+/**
+ * led_bind_generic() - bind children of parent to given driver
+ *
+ * @parent: Top-level LED device
+ * @driver_name: Driver for handling individual child nodes
+ */
+int led_bind_generic(struct udevice *parent, const char *driver_name);
+
#endif