| 12345678910111213141516171819202122232425262728293031323334 |
- From d7c2b0b6da75b86cf5ddbcd51a74d74e19bbf178 Mon Sep 17 00:00:00 2001
- From: Linus Walleij <[email protected]>
- Date: Wed, 18 Jan 2023 08:09:20 +0100
- Subject: [PATCH 20/29] usb: fotg210-udc: Assign of_node and speed on start
- Follow the example set by other drivers to assign of_node
- and speed to the driver when binding, also print bound
- info akin to other UDC drivers.
- Signed-off-by: Linus Walleij <[email protected]>
- Link: https://lore.kernel.org/r/[email protected]
- Signed-off-by: Greg Kroah-Hartman <[email protected]>
- ---
- --- a/drivers/usb/fotg210/fotg210-udc.c
- +++ b/drivers/usb/fotg210/fotg210-udc.c
- @@ -1028,6 +1028,10 @@ static int fotg210_udc_start(struct usb_
-
- /* hook up the driver */
- fotg210->driver = driver;
- + fotg210->gadget.dev.of_node = fotg210->dev->of_node;
- + fotg210->gadget.speed = USB_SPEED_UNKNOWN;
- +
- + dev_info(fotg210->dev, "bound driver %s\n", driver->driver.name);
-
- if (!IS_ERR_OR_NULL(fotg210->phy)) {
- ret = otg_set_peripheral(fotg210->phy->otg,
- @@ -1084,6 +1088,7 @@ static int fotg210_udc_stop(struct usb_g
-
- fotg210_init(fotg210);
- fotg210->driver = NULL;
- + fotg210->gadget.speed = USB_SPEED_UNKNOWN;
-
- spin_unlock_irqrestore(&fotg210->lock, flags);
-
|