]> git.baikalelectronics.ru Git - kernel.git/commit
gpio/rockchip: fix get_direction value handling
authorHeiko Stuebner <heiko@sntech.de>
Mon, 13 Sep 2021 22:49:24 +0000 (00:49 +0200)
committerBartosz Golaszewski <brgl@bgdev.pl>
Wed, 22 Sep 2021 09:31:52 +0000 (11:31 +0200)
commit622d32948713486185fa2c59b1d503b43db0b3fc
treeb13d780651bc908406f133e1f86aad65c8d6602b
parent5a9589440599f685cd27c48652c692d92d8c1834
gpio/rockchip: fix get_direction value handling

The function uses the newly introduced rockchip_gpio_readl_bit()
which directly returns the actual value of the requeste bit.
So using the existing bit-wise check for the bit inside the value
will always return 0.

Fix this by dropping the bit manipulation on the result.

Fixes: c8e994fbf2a8 ("gpio/rockchip: support next version gpio controller")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-rockchip.c