Hi Álvaro, On Fri, 2020-06-19 at 10:51 +0200, Álvaro Fernández Rojas wrote: > Add BCM63xx USBH PHY driver for BMIPS. > > Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com> > --- > v4: several improvements: > - Use devm_platform_ioremap_resource. > - Code cleanups. > - Improve device mode config: > - Move USBH_SWAP_CONTROL device mode value to variant variable. > - Set USBH_UTMI_CONTROL1 register value (variant variable). > v3: introduce changes suggested by Florian: > - Add support for device mode. > v2: introduce changes suggested by Florian: > - Drop OF dependency (use device_get_match_data). > - Drop __initconst from variant tables. > - Use devm_clk_get_optional. > > drivers/phy/broadcom/Kconfig | 9 + > drivers/phy/broadcom/Makefile | 1 + > drivers/phy/broadcom/phy-bcm63xx-usbh.c | 457 ++++++++++++++++++++++++ > 3 files changed, 467 insertions(+) > create mode 100644 drivers/phy/broadcom/phy-bcm63xx-usbh.c > [...] > diff --git a/drivers/phy/broadcom/phy-bcm63xx-usbh.c > b/drivers/phy/broadcom/phy-bcm63xx-usbh.c > new file mode 100644 > index 000000000000..79f913d86def > --- /dev/null > +++ b/drivers/phy/broadcom/phy-bcm63xx-usbh.c [...] > +static int __init bcm63xx_usbh_phy_probe(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct bcm63xx_usbh_phy *usbh; > + const struct bcm63xx_usbh_phy_variant *variant; > + struct phy *phy; > + struct phy_provider *phy_provider; > + > + usbh = devm_kzalloc(dev, sizeof(*usbh), GFP_KERNEL); > + if (!usbh) > + return -ENOMEM; > + > + variant = device_get_match_data(dev); > + if (!variant) > + return -EINVAL; > + usbh->variant = variant; > + > + usbh->base = devm_platform_ioremap_resource(pdev, 0); > + if (IS_ERR(usbh->base)) > + return PTR_ERR(usbh->base); > + > + usbh->reset = devm_reset_control_get(dev, NULL);
Please use devm_reset_control_get_exclusive() instead. regards Philipp