summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-wcd934x.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2020-01-31 20:29:17 +0800
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2020-02-10 10:50:58 +0100
commit47d7d116661993499d626f7ec6f7679e83d59f15 (patch)
treee2001e15d6a4f5e223bb8af6f4e1ccd5c9279361 /drivers/gpio/gpio-wcd934x.c
parenta630fe34ddc09ec9b82df4867a8680d0929fe926 (diff)
gpio: wcd934x: Don't change gpio direction in wcd_gpio_set
The .set callback should just set output value. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio/gpio-wcd934x.c')
-rw-r--r--drivers/gpio/gpio-wcd934x.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-wcd934x.c b/drivers/gpio/gpio-wcd934x.c
index 74913f2e5697..9d4ec8941b9b 100644
--- a/drivers/gpio/gpio-wcd934x.c
+++ b/drivers/gpio/gpio-wcd934x.c
@@ -66,7 +66,10 @@ static int wcd_gpio_get(struct gpio_chip *chip, unsigned int pin)
static void wcd_gpio_set(struct gpio_chip *chip, unsigned int pin, int val)
{
- wcd_gpio_direction_output(chip, pin, val);
+ struct wcd_gpio_data *data = gpiochip_get_data(chip);
+
+ regmap_update_bits(data->map, WCD_REG_VAL_CTL_OFFSET,
+ WCD_PIN_MASK(pin), val ? WCD_PIN_MASK(pin) : 0);
}
static int wcd_gpio_probe(struct platform_device *pdev)