[U-Boot,1/2] i2c-mux-gpio: Fix GPIO request flag issue
diff mbox series

Message ID 1562754169-45024-1-git-send-email-ye.li@nxp.com
State Awaiting Upstream
Delegated to: Heiko Schocher
Headers show
Series
  • [U-Boot,1/2] i2c-mux-gpio: Fix GPIO request flag issue
Related show

Commit Message

Ye Li July 10, 2019, 10:23 a.m. UTC
When requesting GPIO, the GPIOD_IS_OUT is missed in flag, so the GPIO
is set the input mode not output and cause mux not work.

Signed-off-by: Ye Li <ye.li@nxp.com>
---
 drivers/i2c/muxes/i2c-mux-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heiko Schocher Aug. 27, 2019, 9:45 a.m. UTC | #1
Hello Ye Li,

Am 10.07.2019 um 12:23 schrieb Ye Li:
> When requesting GPIO, the GPIOD_IS_OUT is missed in flag, so the GPIO
> is set the input mode not output and cause mux not work.
> 
> Signed-off-by: Ye Li <ye.li@nxp.com>
> ---
>   drivers/i2c/muxes/i2c-mux-gpio.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-i2c master

Thanks!

bye,
Heiko

Patch
diff mbox series

diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 28f6400..e8b124f 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -106,7 +106,7 @@  static int i2c_mux_gpio_probe(struct udevice *dev)
 	}
 
 	ret = gpio_request_list_by_name(dev, "mux-gpios", gpios, mux->n_gpios,
-					GPIOD_IS_OUT_ACTIVE);
+					GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
 	if (ret <= 0) {
 		dev_err(dev, "Failed to request mux-gpios\n");
 		return ret;