gpio: regmap: Always set gpio_chip get_direction
authorWilliam Breathitt Gray <william.gray@linaro.org>
Tue, 27 Dec 2022 14:09:39 +0000 (09:09 -0500)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 30 Jan 2023 14:55:27 +0000 (15:55 +0100)
commit8978277c229b9502aba4654b1d6ec59c819e82ea
tree889414c98483f5935d711c865eb17b4ac0b6c62f
parent9eeaa60ead4b6dc84cef012aa9aee3eb48dc4930
gpio: regmap: Always set gpio_chip get_direction

If you only have reg_dat_base set, then it is input-only; if you only
have reg_set_base set, then it is output-only. Thus, we can always set
gpio_chip get_direction to gpio_regmap_get_direction and return
GPIO_LINE_DIRECTION_IN/GPIO_LINE_DIRECTION_OUT given the respective
register base addresses configuration.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Michael Walle <michael@walle.cc>
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-regmap.c