Skip to content

Commit

Permalink
Merge pull request #77 from eberman-quic/master
Browse files Browse the repository at this point in the history
ftdi_gpio: Turn on OUTPUT_ENABLE first
  • Loading branch information
konradybcio authored Jun 18, 2024
2 parents 6113960 + 2899fbc commit 2f3e661
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/ftdi-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,16 +311,16 @@ static void *ftdi_gpio_open(struct device *dev)
if (ftdi_gpio->options->gpios[GPIO_POWER_KEY].present)
dev->has_power_key = true;

if (ftdi_gpio->options->gpios[GPIO_OUTPUT_ENABLE].present)
ftdi_gpio_toggle_io(ftdi_gpio, GPIO_OUTPUT_ENABLE, 1);

ftdi_gpio_device_power(ftdi_gpio, 0);

if (dev->usb_always_on)
ftdi_gpio_device_usb(ftdi_gpio, 1);
else
ftdi_gpio_device_usb(ftdi_gpio, 0);

if (ftdi_gpio->options->gpios[GPIO_OUTPUT_ENABLE].present)
ftdi_gpio_toggle_io(ftdi_gpio, GPIO_OUTPUT_ENABLE, 1);

usleep(500000);

return ftdi_gpio;
Expand Down

0 comments on commit 2f3e661

Please sign in to comment.