Re: [PATCH 1/2] gpio: wcd934x: Don't change gpio direction in wcd_gpio_set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the patch!

On 31/01/2020 12:29, Axel Lin wrote:
The .set callback should just set output value.

Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>

---
Hi Srinivas,
I don't have this h/w to test, so please help to review and test the patchs.
Thanks,
Axel
  drivers/gpio/gpio-wcd934x.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

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)




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux