[Letux-kernel] [PATCH] usb3503: Fix reset polarity

H. Nikolaus Schaller hns at goldelico.com
Thu Jul 23 17:29:32 CEST 2020


Hi Dave,

> Am 23.07.2020 um 16:31 schrieb David Shah <dave at ds0.me>:
> 
> It appears that the users of usb3503_reset expect state to be the
> original active-low value.
> 
> Signed-off-by: David Shah <dave at ds0.me>
> ---
> drivers/usb/misc/usb3503.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c
> index e0c11331632a..9a228bc0566c 100644
> --- a/drivers/usb/misc/usb3503.c
> +++ b/drivers/usb/misc/usb3503.c
> @@ -62,7 +62,7 @@ static int usb3503_reset(struct usb3503 *hub, int state)
> 		gpiod_set_value_cansleep(hub->connect, 0);
> 
> 	if (hub->reset)
> -		gpiod_set_value_cansleep(hub->reset, !state);
> +		gpiod_set_value_cansleep(hub->reset, state);

good finding!

Seems that it should have a

Fixes: 51d22e855ea3 ("usb: usb3503: Convert to use GPIO descriptors")

because it looks as if it was probably introduced there as a typo...

> 
> 	/* Wait T_HUBINIT == 4ms for hub logic to stabilize */
> 	if (state)
> -- 
> 2.27.0

I'll pick it to all branches that contain 51d22e855ea3

BR and thanks,
Nikolaus



More information about the Letux-kernel mailing list