forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/usb/renesas_usbhs/rcar2.c
....@@ -3,10 +3,9 @@
33 * Renesas USB driver R-Car Gen. 2 initialization and power control
44 *
55 * Copyright (C) 2014 Ulrich Hecht
6
+ * Copyright (C) 2019 Renesas Electronics Corporation
67 */
78
8
-#include <linux/gpio.h>
9
-#include <linux/of_gpio.h>
109 #include <linux/phy/phy.h>
1110 #include "common.h"
1211 #include "rcar2.h"
....@@ -33,7 +32,7 @@
3332 struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
3433
3534 if (priv->phy) {
36
- phy_put(priv->phy);
35
+ phy_put(&pdev->dev, priv->phy);
3736 priv->phy = NULL;
3837 }
3938
....@@ -62,14 +61,15 @@
6261 return retval;
6362 }
6463
65
-static int usbhs_rcar2_get_id(struct platform_device *pdev)
66
-{
67
- return USBHS_GADGET;
68
-}
69
-
70
-const struct renesas_usbhs_platform_callback usbhs_rcar2_ops = {
71
- .hardware_init = usbhs_rcar2_hardware_init,
72
- .hardware_exit = usbhs_rcar2_hardware_exit,
73
- .power_ctrl = usbhs_rcar2_power_ctrl,
74
- .get_id = usbhs_rcar2_get_id,
64
+const struct renesas_usbhs_platform_info usbhs_rcar_gen2_plat_info = {
65
+ .platform_callback = {
66
+ .hardware_init = usbhs_rcar2_hardware_init,
67
+ .hardware_exit = usbhs_rcar2_hardware_exit,
68
+ .power_ctrl = usbhs_rcar2_power_ctrl,
69
+ .get_id = usbhs_get_id_as_gadget,
70
+ },
71
+ .driver_param = {
72
+ .has_usb_dmac = 1,
73
+ .has_new_pipe_configs = 1,
74
+ },
7575 };