summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/intel/pinctrl-baytrail.c
diff options
context:
space:
mode:
authorMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>2019-12-12 09:35:52 +0300
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-12-13 17:48:47 +0300
commitfaf86c0c572ad134003a5f5895a42a4749dae5f3 (patch)
tree4e0e6cc5bc61b5116495c65774f91c27777db744 /drivers/pinctrl/intel/pinctrl-baytrail.c
parente70982b3abec4fb6e2ce9489f071080ca84e4bc7 (diff)
downloadlinux-faf86c0c572ad134003a5f5895a42a4749dae5f3.tar.xz
pinctrl: baytrail: 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> Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/pinctrl/intel/pinctrl-baytrail.c')
-rw-r--r--drivers/pinctrl/intel/pinctrl-baytrail.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index ea61a19857c1..0e131d2e094d 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -1162,9 +1162,9 @@ static int byt_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
raw_spin_unlock_irqrestore(&byt_lock, flags);
if (!(value & BYT_OUTPUT_EN))
- return 0;
+ return GPIO_LINE_DIRECTION_OUT;
if (!(value & BYT_INPUT_EN))
- return 1;
+ return GPIO_LINE_DIRECTION_IN;
return -EINVAL;
}