Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50aa46c4 authored by Dan Murphy's avatar Dan Murphy Committed by Jacek Anaszewski
Browse files

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: default avatarDan Murphy <dmurphy@ti.com>
Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
parent 3829a7e3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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",