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

Felipe Balbi balbi at kernel.org
Wed Jan 15 00:44:23 PST 2020


Hi,

Hanjie Lin <hanjie.lin at amlogic.com> 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 <hanjie.lin at amlogic.com>
> Signed-off-by: Yue Wang <yue.wang at amlogic.com>

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200115/009d73ff/attachment.sig>


More information about the linux-arm-kernel mailing list