pinctrl: sunxi: fix wrong irq_banks number for H5 pinctrl
authorIcenowy Zheng <icenowy@aosc.io>
Fri, 11 Aug 2017 14:27:34 +0000 (22:27 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 22 Aug 2017 12:48:24 +0000 (14:48 +0200)
commit1899ccc041069e86557d6952d97f3b41b7333d87
tree0c7ca897474becbd327c3be8843324b0ab8b124a
parent5ff56b015e85c4a6761968db369b4b2c9d821c86
pinctrl: sunxi: fix wrong irq_banks number for H5 pinctrl

The pin controller of Allwinner H5 has three IRQ banks, however in old
versions of drivers and device trees, only two are set, which makes
PG bank IRQ not available.

If it's directly set to 3, the old device trees will fail to boot.

Add a workaround (and a warning) for older device trees, and allow new
device trees to use correct 3 IRQ banks.

Fixes: 838adb576d4a ("drivers: pinctrl: add driver for Allwinner H5 SoC")
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c