Skip to content

Commit 48ed324

Browse files
shenkigregkh
authored andcommitted
usb: gadget: aspeed: Fix probe regression
Since commit fc274c1 ("USB: gadget: Add a new bus for gadgets"), the gadget devices are proper driver core devices, which caused each device to request pinmux settings: aspeed_vhub 1e6a0000.usb-vhub: Initialized virtual hub in USB2 mode aspeed-g5-pinctrl 1e6e2080.pinctrl: pin A7 already requested by 1e6a0000.usb-vhub; cannot claim for gadget.0 aspeed-g5-pinctrl 1e6e2080.pinctrl: pin-232 (gadget.0) status -22 aspeed-g5-pinctrl 1e6e2080.pinctrl: could not request pin 232 (A7) from group USB2AD on device aspeed-g5-pinctrl g_mass_storage gadget.0: Error applying setting, reverse things back The vhub driver has already claimed the pins, so prevent the gadgets from requesting them too by setting the magic of_node_reused flag. This causes the driver core to skip the mux request. Reported-by: Zev Weiss <[email protected]> Reported-by: Jae Hyun Yoo <[email protected]> Fixes: fc274c1 ("USB: gadget: Add a new bus for gadgets") Cc: [email protected] Signed-off-by: Joel Stanley <[email protected]> Tested-by: Zev Weiss <[email protected]> Tested-by: Jae Hyun Yoo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b57b08e commit 48ed324

File tree

1 file changed

+1
-0
lines changed
  • drivers/usb/gadget/udc/aspeed-vhub

1 file changed

+1
-0
lines changed

drivers/usb/gadget/udc/aspeed-vhub/dev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ int ast_vhub_init_dev(struct ast_vhub *vhub, unsigned int idx)
591591
d->gadget.max_speed = USB_SPEED_HIGH;
592592
d->gadget.speed = USB_SPEED_UNKNOWN;
593593
d->gadget.dev.of_node = vhub->pdev->dev.of_node;
594+
d->gadget.dev.of_node_reused = true;
594595

595596
rc = usb_add_gadget_udc(d->port_dev, &d->gadget);
596597
if (rc != 0)

0 commit comments

Comments
 (0)