[v2,3/3] pinctrl: pinctrl-baytrail: Use GPIO direction definitions
diff mbox series

Message ID 0e8c584bff32da970510201b504e43a84a340cae.1576132131.git.matti.vaittinen@fi.rohmeurope.com
State New
Headers show
Series
  • Use new GPIO direction defines for intel pinctrl
Related show

Commit Message

Vaittinen, Matti Dec. 12, 2019, 6:35 a.m. UTC
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>
---
 drivers/pinctrl/intel/pinctrl-baytrail.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Vaittinen, Matti Dec. 12, 2019, 6:37 a.m. UTC | #1
Hello Andy,

On Thu, 2019-12-12 at 08:35 +0200, Matti Vaittinen wrote:
> 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>

I translated your LGTM as an ack. Please let me know if this is not Ok.

Br,
	Matti

Patch
diff mbox series

diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index 9ffb22211d2b..362276ad5640 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -1160,9 +1160,9 @@  static int byt_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
 	raw_spin_unlock_irqrestore(&vg->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;
 }