summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/usb/renesas_usbhs/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/usb/renesas_usbhs/common.c')
-rw-r--r--kernel/drivers/usb/renesas_usbhs/common.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/kernel/drivers/usb/renesas_usbhs/common.c b/kernel/drivers/usb/renesas_usbhs/common.c
index 0f7e850fd..d82fa36c3 100644
--- a/kernel/drivers/usb/renesas_usbhs/common.c
+++ b/kernel/drivers/usb/renesas_usbhs/common.c
@@ -388,7 +388,7 @@ static void usbhsc_hotplug(struct usbhs_priv *priv)
if (enable && !mod) {
if (priv->edev) {
- cable = extcon_get_cable_state(priv->edev, "USB-HOST");
+ cable = extcon_get_cable_state_(priv->edev, EXTCON_USB_HOST);
if ((cable > 0 && id != USBHS_HOST) ||
(!cable && id != USBHS_GADGET)) {
dev_info(&pdev->dev,
@@ -466,11 +466,20 @@ static int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev)
static const struct of_device_id usbhs_of_match[] = {
{
.compatible = "renesas,usbhs-r8a7790",
- .data = (void *)USBHS_TYPE_R8A7790,
+ .data = (void *)USBHS_TYPE_RCAR_GEN2,
},
{
.compatible = "renesas,usbhs-r8a7791",
- .data = (void *)USBHS_TYPE_R8A7791,
+ .data = (void *)USBHS_TYPE_RCAR_GEN2,
+ },
+ {
+ .compatible = "renesas,usbhs-r8a7794",
+ .data = (void *)USBHS_TYPE_RCAR_GEN2,
+ },
+ {
+ /* Gen3 is compatible with Gen2 */
+ .compatible = "renesas,usbhs-r8a7795",
+ .data = (void *)USBHS_TYPE_RCAR_GEN2,
},
{ },
};
@@ -489,7 +498,7 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
return NULL;
dparam = &info->driver_param;
- dparam->type = of_id ? (u32)of_id->data : 0;
+ dparam->type = of_id ? (uintptr_t)of_id->data : 0;
if (!of_property_read_u32(dev->of_node, "renesas,buswait", &tmp))
dparam->buswait_bwait = tmp;
gpio = of_get_named_gpio_flags(dev->of_node, "renesas,enable-gpio", 0,
@@ -497,14 +506,8 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
if (gpio > 0)
dparam->enable_gpio = gpio;
- switch (dparam->type) {
- case USBHS_TYPE_R8A7790:
- case USBHS_TYPE_R8A7791:
+ if (dparam->type == USBHS_TYPE_RCAR_GEN2)
dparam->has_usb_dmac = 1;
- break;
- default:
- break;
- }
return info;
}
@@ -559,8 +562,7 @@ static int usbhs_probe(struct platform_device *pdev)
sizeof(struct renesas_usbhs_driver_param));
switch (priv->dparam.type) {
- case USBHS_TYPE_R8A7790:
- case USBHS_TYPE_R8A7791:
+ case USBHS_TYPE_RCAR_GEN2:
priv->pfunc = usbhs_rcar2_ops;
if (!priv->dparam.pipe_type) {
priv->dparam.pipe_type = usbhsc_new_pipe_type;