]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: Set proper argument value to set_config
authorMaxime Ripard <maxime.ripard@bootlin.com>
Thu, 14 Mar 2019 19:32:50 +0000 (20:32 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 4 Apr 2019 17:04:28 +0000 (00:04 +0700)
commitf268256f5d59152de6f43559a22f82202e7a0a1e
treeaffd978d0121b6727a57ef467a43dfd42243d7e0
parenta5adbb6f394e62746318cdc7ae72fb25ef4887b0
gpio: Set proper argument value to set_config

The gpio_set_config function creates a pinconf configuration for a given
pinc_config_param.

However, it always uses an arg of 0, which might not be a valid argument
for a given param. A good example of that would be the bias parameters,
where 0 means that the pull up or down resistor is null, and the pin is
directly connected to VCC/GND.

The framework uses in some other places the value 1 as a default argument
to enable the pull resistor, so let's use the same one here.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c