aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2025-08-25 11:48:44 +0200
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2025-08-25 12:05:37 +0200
commit13ba232ed8455a5decb187d509a0d326fd326b19 (patch)
treed186c94a66e492ecb18e87908c0b9775c1780019 /drivers/gpio
parent16397871b6e35fa46a2bec27b3558f93b050c6fc (diff)
downloadnet-13ba232ed8455a5decb187d509a0d326fd326b19.tar.gz
gpio: hisi: use the BGPIOF_UNREADABLE_REG_DIR flag
There's no reason for this driver to touch the gpio-mmio internals, we have a dedicated flag passed to bgpio_init() indicating to the module that the DIR register is unreadable. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250825-gpio-mmio-gpio-conv-v1-3-356b4b1d5110@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-hisi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-hisi.c b/drivers/gpio/gpio-hisi.c
index ef5cc654a24e23..6016e6f0ed0fb8 100644
--- a/drivers/gpio/gpio-hisi.c
+++ b/drivers/gpio/gpio-hisi.c
@@ -295,7 +295,7 @@ static int hisi_gpio_probe(struct platform_device *pdev)
hisi_gpio->reg_base + HISI_GPIO_SWPORT_DR_CLR_WX,
hisi_gpio->reg_base + HISI_GPIO_SWPORT_DDR_SET_WX,
hisi_gpio->reg_base + HISI_GPIO_SWPORT_DDR_CLR_WX,
- BGPIOF_NO_SET_ON_INPUT);
+ BGPIOF_NO_SET_ON_INPUT | BGPIOF_UNREADABLE_REG_DIR);
if (ret) {
dev_err(dev, "failed to init, ret = %d\n", ret);
return ret;
@@ -303,7 +303,6 @@ static int hisi_gpio_probe(struct platform_device *pdev)
hisi_gpio->chip.set_config = hisi_gpio_set_config;
hisi_gpio->chip.ngpio = hisi_gpio->line_num;
- hisi_gpio->chip.bgpio_dir_unreadable = 1;
hisi_gpio->chip.base = -1;
if (hisi_gpio->irq > 0)