]> git.dujemihanovic.xyz Git - u-boot.git/commit
rockchip: gpio: rk_gpio: use ROCKCHIP_GPIOS_PER_BANK as divider
authorJohan Jonker <jbx6244@gmail.com>
Sun, 19 Mar 2023 15:02:18 +0000 (16:02 +0100)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 21 Apr 2023 07:16:01 +0000 (15:16 +0800)
commit3c4549771dd0352e893a0bc9d2344cd8ecd8033d
tree867e91c2dc9353e32418ac63c30ab872467b219b
parentba607e2b9a6264ffd0528c1b5b516251d7e7cf2d
rockchip: gpio: rk_gpio: use ROCKCHIP_GPIOS_PER_BANK as divider

The current divider to calculate the bank ID can change.
Given the Rockchip TRM not all gpio-banks have 32 pins per bank.
The "gpio-ranges" syntax allows multiple items with variable number
of pins. Use a constant ROCKCHIP_GPIOS_PER_BANK as fixed divider.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
drivers/gpio/rk_gpio.c