]> git.karo-electronics.de Git - linux-beck.git/commit
pinctrl: rockchip: Don't call pinctrl_gpio_direction_output() in pin_config_set()
authorDoug Anderson <dianders@chromium.org>
Tue, 21 Oct 2014 17:47:33 +0000 (10:47 -0700)
committerHeiko Stuebner <heiko@sntech.de>
Wed, 29 Oct 2014 20:06:21 +0000 (21:06 +0100)
commite5c2c9db0a2cff4d4df4b94f91146b26a0f0adc7
treede56d37cd83b68cce00ad1c0e45bfec59194bfe6
parent876d716ba9af205f46b7e911d39482e627aea0e8
pinctrl: rockchip: Don't call pinctrl_gpio_direction_output() in pin_config_set()

The Rockchip pinctrl driver was calling
rockchip_gpio_direction_output() in the pin_config_set() callback.
This was just a shortcut for:
* rockchip_gpio_set()
* pinctrl_gpio_direction_output()

Unfortunately it's not so good to call pinctrl_gpio_direction_output()
from pin_config_set().  Specifically when initting hogs you'll get an
error.

Let's refactor a little so we can call
_rockchip_pmx_gpio_set_direction() directly.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Tested-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
drivers/pinctrl/pinctrl-rockchip.c