pinctrl: armada-37xx: Fix direction_output() callback behavior
authorGregory CLEMENT <gregory.clement@free-electrons.com>
Tue, 14 Nov 2017 16:51:50 +0000 (17:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:52:49 +0000 (09:52 +0100)
commit6c802ac42f970976d26241068e7202a84c9fd8b7
tree752bcc2c5a46d42d0e15b885704d234e32996782
parentb13ec02ab4a24192ad56b47e39a82269cc4825ca
pinctrl: armada-37xx: Fix direction_output() callback behavior

commit 6702abb3bf2394f250af0ee04070227bb5dda788 upstream.

The direction_output callback of the gpio_chip structure is supposed to
set the output direction but also to set the value of the gpio. For the
armada-37xx driver this callback acted as the gpio_set_direction callback
for the pinctrl.

This patch fixes the behavior of the direction_output callback by also
applying the value received as parameter.

Fixes: 5715092a458c ("pinctrl: armada-37xx: Add gpio support")
Reported-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c