Commit 23a70045 authored by Stefan Riedmueller's avatar Stefan Riedmueller Committed by Pavel Machek

leds: pca9532: Assign gpio base dynamically

When using devicetree, gpio_base holds its initial zero value which can
lead to a rejection if another gpio controller already occupies this
base. To prevent that collision let the gpio base be assigned dynamically.
Signed-off-by: default avatarStefan Riedmueller <s.riedmueller@phytec.de>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent 5fe09e16
...@@ -480,6 +480,8 @@ pca9532_of_populate_pdata(struct device *dev, struct device_node *np) ...@@ -480,6 +480,8 @@ pca9532_of_populate_pdata(struct device *dev, struct device_node *np)
if (!pdata) if (!pdata)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
pdata->gpio_base = -1;
of_property_read_u8_array(np, "nxp,pwm", &pdata->pwm[0], of_property_read_u8_array(np, "nxp,pwm", &pdata->pwm[0],
ARRAY_SIZE(pdata->pwm)); ARRAY_SIZE(pdata->pwm));
of_property_read_u8_array(np, "nxp,psc", &pdata->psc[0], of_property_read_u8_array(np, "nxp,psc", &pdata->psc[0],
......
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