Skip to content

Commit 1bcafc0

Browse files
Matthias Kaehlckegregkh
authored andcommitted
usb: misc: onboard_usb_hub: Drop reset delay in onboard_hub_power_off()
onboard_hub_power_off() currently has a delay after asserting the reset of the hub. There is already a delay in onboard_hub_power_on() before de-asserting the reset, which ensures that the reset is asserted for the required time, so the delay in _power_off() is not needed. Skip the reset GPIO check before calling gpiod_set_value_cansleep(), the function returns early when the GPIO descriptor is NULL. Reviewed-By: Alexander Stein <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Matthias Kaehlcke <[email protected]> Link: https://lore.kernel.org/r/20220805111836.1.Id5a4dc0a2c046236116693aa55672295513a0f2a@changeid Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 040f2db commit 1bcafc0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/usb/misc/onboard_usb_hub.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,7 @@ static int onboard_hub_power_off(struct onboard_hub *hub)
7171
{
7272
int err;
7373

74-
if (hub->reset_gpio) {
75-
gpiod_set_value_cansleep(hub->reset_gpio, 1);
76-
fsleep(hub->pdata->reset_us);
77-
}
74+
gpiod_set_value_cansleep(hub->reset_gpio, 1);
7875

7976
err = regulator_disable(hub->vdd);
8077
if (err) {

0 commit comments

Comments
 (0)