summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorDan Murphy <dmurphy@ti.com>2017-12-18 14:23:06 -0600
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2018-01-08 21:28:12 +0100
commit50aa46c4bd7b79a57766537dfa8e8c4d8b174a3a (patch)
tree7bd39b54c6b61c9e009e61d5b49f64b8291e8104 /drivers/leds
parent3829a7e360edff8c19ddfcdd09ef3ab7275fc129 (diff)
leds: lp8860: Add DT parsing to retrieve the trigger node
Add the ability to parse the DT and set the default trigger mode for the LED. Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-lp8860.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/leds/leds-lp8860.c b/drivers/leds/leds-lp8860.c
index 1ab5e19c3509..94b996b343ce 100644
--- a/drivers/leds/leds-lp8860.c
+++ b/drivers/leds/leds-lp8860.c
@@ -394,6 +394,10 @@ static int lp8860_probe(struct i2c_client *client,
return -ENOMEM;
for_each_available_child_of_node(np, child_node) {
+ led->led_dev.default_trigger = of_get_property(child_node,
+ "linux,default-trigger",
+ NULL);
+
ret = of_property_read_string(child_node, "label", &name);
if (!ret)
snprintf(led->label, sizeof(led->label), "%s:%s",