summaryrefslogtreecommitdiff
path: root/include/linux/leds.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2019-10-03 11:28:09 +0300
committerPavel <pavel@ucw.cz>2020-01-06 02:20:06 +0300
commit699a8c7c4bd376aee4808e6272188319e900c8af (patch)
treeb35f95250a065850ed2a35cf22ceb0209fc4c164 /include/linux/leds.h
parent31e065c4e8bac71be29a9d4d65ea62f5c9ec17b3 (diff)
downloadlinux-699a8c7c4bd376aee4808e6272188319e900c8af.tar.xz
leds: Add of_led_get() and led_put()
This patch adds basic support for a kernel driver to get a LED device. This will be used by the led-backlight driver. Only OF version is implemented for now, and the behavior is similar to PWM's of_pwm_get() and pwm_put(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'include/linux/leds.h')
-rw-r--r--include/linux/leds.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 242258f7d837..dcfb6a325866 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -20,6 +20,7 @@
struct device;
struct led_pattern;
+struct device_node;
/*
* LED Core
*/
@@ -196,6 +197,9 @@ void devm_led_classdev_unregister(struct device *parent,
void led_classdev_suspend(struct led_classdev *led_cdev);
void led_classdev_resume(struct led_classdev *led_cdev);
+extern struct led_classdev *of_led_get(struct device_node *np, int index);
+extern void led_put(struct led_classdev *led_cdev);
+
/**
* led_blink_set - set blinking with software fallback
* @led_cdev: the LED to start blinking