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>
This commit is contained in:
Matti Vaittinen 2019-12-12 08:35:52 +02:00 committed by Andy Shevchenko
parent e70982b3ab
commit faf86c0c57
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}