Skip to content

Commit 23a7004

Browse files
sriedmuellerpavelmachek
authored andcommitted
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: Stefan Riedmueller <[email protected]> Signed-off-by: Pavel Machek <[email protected]>
1 parent 5fe09e1 commit 23a7004

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/leds/leds-pca9532.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,8 @@ pca9532_of_populate_pdata(struct device *dev, struct device_node *np)
480480
if (!pdata)
481481
return ERR_PTR(-ENOMEM);
482482

483+
pdata->gpio_base = -1;
484+
483485
of_property_read_u8_array(np, "nxp,pwm", &pdata->pwm[0],
484486
ARRAY_SIZE(pdata->pwm));
485487
of_property_read_u8_array(np, "nxp,psc", &pdata->psc[0],

0 commit comments

Comments
 (0)