Commit 7ac5338c authored by Markus Moll's avatar Markus Moll Committed by Pavel Machek

leds: pca9532: read pwm settings from device tree

While the two pca9532 pwms can be configured in the platform data
struct, there was no corresponding dt binding. Users need to configure
the pwm if some leds should blink or continue blinking during boot.
Signed-off-by: default avatarMarkus Moll <mmoll@de.pepperl-fuchs.com>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent 2a378856
......@@ -480,6 +480,11 @@ pca9532_of_populate_pdata(struct device *dev, struct device_node *np)
if (!pdata)
return ERR_PTR(-ENOMEM);
of_property_read_u8_array(np, "nxp,pwm", &pdata->pwm[0],
ARRAY_SIZE(pdata->pwm));
of_property_read_u8_array(np, "nxp,psc", &pdata->psc[0],
ARRAY_SIZE(pdata->psc));
for_each_available_child_of_node(np, child) {
if (of_property_read_string(child, "label",
&pdata->leds[i].name))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment