diff options
author | Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> | 2019-12-12 07:34:32 +0100 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-12-13 15:48:47 +0100 |
commit | 6a304752eb6934e4bfa236a346ae440c74e02e07 (patch) | |
tree | 903c88ffd8a3fc83638ff02076aa07f4e6c3ab41 /drivers/pinctrl | |
parent | pinctrl: cherryview: Use GPIO direction definitions (diff) | |
download | linux-6a304752eb6934e4bfa236a346ae440c74e02e07.tar.xz linux-6a304752eb6934e4bfa236a346ae440c74e02e07.zip |
pinctrl: intel: Use GPIO direction definitions
Use new GPIO_LINE_DIRECTION_IN and GPIO_LINE_DIRECTION_OUT when
returning GPIO direction to GPIO framework.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-intel.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index 4860bc9a4e48..2ba2ad8a55d9 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -944,7 +944,10 @@ static int intel_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) if (padcfg0 & PADCFG0_PMODE_MASK) return -EINVAL; - return !!(padcfg0 & PADCFG0_GPIOTXDIS); + if (padcfg0 & PADCFG0_GPIOTXDIS) + return GPIO_LINE_DIRECTION_IN; + + return GPIO_LINE_DIRECTION_OUT; } static int intel_gpio_direction_input(struct gpio_chip *chip, unsigned int offset) |