Subject: Re: [PATCH v4 4/6] usb: dwc3: Add Amlogic A1 DWC3 glue

From: Felipe Balbi <[email-masked]>
Date: Wed, 15 Jan 2020 10:44:23 +0200

Hi,

Hanjie Lin <[email-masked]> writes:

> Adds support for Amlogic A1 USB Control Glue HW.
>
> The Amlogic A1 SoC Family embeds 1 USB Controllers:
> - a DWC3 IP configured as Host for USB2 and USB3
>
> A glue connects the controllers to the USB2 PHY of A1 SoC.
>
> Signed-off-by: Hanjie Lin <[email-masked]>
> Signed-off-by: Yue Wang <[email-masked]>

you're not really adding a new glue. Rather, you're adding support for a
new platform in an existing glue. Make sure subject is clearer

> @@ -409,17 +426,32 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev)
>  		priv->vbus = NULL;
>  	}
>  
> -	priv->clk = devm_clk_get(dev, NULL);
> -	if (IS_ERR(priv->clk))
> -		return PTR_ERR(priv->clk);
> +	priv->soc_id = (enum meson_soc_id)of_device_get_match_data(&pdev->dev);
> +
> +	if (priv->soc_id == MESON_SOC_G12A) {

you can use of_device_is_compatible() and get rid of the enumeration you added.

-- 
balbi
_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel