ARM i.MX gpio: fix of gpio base
of_alias_get_id() returns the number of the gpio bank, so we have to multiply with 32 to get the gpio base. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
52df7b6184
commit
bad4d7cd75
|
@ -137,6 +137,7 @@ static int imx_gpio_probe(struct device_d *dev)
|
||||||
imxgpio->chip.base = of_alias_get_id(dev->device_node, "gpio");
|
imxgpio->chip.base = of_alias_get_id(dev->device_node, "gpio");
|
||||||
if (imxgpio->chip.base < 0)
|
if (imxgpio->chip.base < 0)
|
||||||
return imxgpio->chip.base;
|
return imxgpio->chip.base;
|
||||||
|
imxgpio->chip.base *= 32;
|
||||||
} else {
|
} else {
|
||||||
imxgpio->chip.base = dev->id * 32;
|
imxgpio->chip.base = dev->id * 32;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue