Skip to content
Commit f41738d0 authored by Jonas Karlman's avatar Jonas Karlman Committed by Kever Yang
Browse files

gpio: rockchip: Use gpio alias id as gpio bank id



The U-Boot driver try to base the gpio bank id on the gpio-ranges prop
and fall back to base the bank id on the node name. However, the linux
driver try to base the bank id on the gpio alias id and fall back on
node order.

This can cause issues when SoC DT is synced from linux and gpioX@ nodes
has been renamed to gpio@ and gpio-ranges or a SoC specific alias has
not been assigned.

Try to use the gpio alias id as first fallback when a gpio-ranges prop
is missing to ease sync of updated SoC DT. Keep the current fallback on
node name as a third fallback to not affect any existing unsynced DT.

Signed-off-by: default avatarJonas Karlman <jonas@kwiboo.se>
Reviewed-by: default avatarQuentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: default avatarKever Yang <kever.yang@rock-chips.com>
parent 1e21f569
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment