On Tue, Jun 02, 2020 at 06:23:17PM +0300, Andy Shevchenko wrote: > On Tue, Jun 02, 2020 at 02:21:30PM +0200, Hans de Goede wrote: ... > Wouldn't be simple below fix the issue? > > @@ -1171,14 +1171,10 @@ static int byt_gpio_direction_input(struct gpio_chip *chip, unsigned int offset) > static int byt_gpio_direction_output(struct gpio_chip *chip, > unsigned int offset, int value) > { > - int ret = pinctrl_gpio_direction_output(chip->base + offset); > - > - if (ret) > - return ret; > - > + /* Set value first to avoid a glitch */ > byt_gpio_set(chip, offset, value); > > - return 0; > + return pinctrl_gpio_direction_output(chip->base + offset); > } > > > P.S. It's mangled, sorry. Cherrytrail does this way, btw, 549e783f6a1. -- With Best Regards, Andy Shevchenko _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx