On 6/7/22 7:06 PM, Andre Przywara wrote: > The Allwinner USB PHY driver is still using the legacy GPIO interface, > which is now implemented by the DM_GPIO compat functions. > Those seem to have some design flaws, as setting the direction, then > later setting the value will not work, if the DM_GPIO driver is > implementing set_flags. > > Fix this by using the dm_ version of the direct GPIO interface, which > uses struct gpio_desc structs to handle requested GPIOs, and actually > keeps the flags we set earlier. > > This fixes USB operation on boards which need to toggle the VBUS supply > via a GPIO, like the Teres-I laptop or the BananaPi M2 Berry board. > > Signed-off-by: Andre Przywara <andre.przyw...@arm.com> > Reported-by: Milan P. Stanić <m...@arvanta.net>
Reviewed-by: Samuel Holland <sam...@sholland.org> It looks like the other users of sunxi_name_to_gpio are unaffected because they call only gpio_direction_output (sometimes repeatedly), never gpio_set_value. Regards, Samuel