Re: [PATCH 5/5 v8] usb: musb: da8xx: Add DT support for the DA8xx driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 3/7/2016 2:20 PM, Petr Kulhavy wrote:

This adds DT support for TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver

Signed-off-by: Petr Kulhavy <petr@xxxxxxxxx>
Tested-by: Petr Kulhavy <petr@xxxxxxxxx>
Acked-by: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>
[...]

diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index b03d3b8..bbd8cac 100644
--- a/drivers/usb/musb/da8xx.c
+++ b/drivers/usb/musb/da8xx.c
[...]
@@ -544,17 +643,25 @@ static int da8xx_probe(struct platform_device *pdev)
  	pinfo.data = pdata;
  	pinfo.size_data = sizeof(*pdata);

+	ret = regulator_enable(glue->vbus_supply);

   What does this achieve with a regulator that can't be explicitly controlled?

+	if (ret) {
+		dev_err(&pdev->dev, "failed to enable power: %d\n", ret);
+		goto err6;
+	}
+
  	glue->musb = musb = platform_device_register_full(&pinfo);
  	if (IS_ERR(musb)) {
  		ret = PTR_ERR(musb);
  		dev_err(&pdev->dev, "failed to register musb device: %d\n", ret);
-		goto err6;
+		goto err7;
  	}

  	return 0;
+err7:
+	usb_phy_generic_unregister(glue->phy);

  err6:
-	usb_phy_generic_unregister(glue->phy);
+	regulator_disable(glue->vbus_supply);

   How's that? Aren't you envaling Vbus regulator *after* registering PHY?

[...]
@@ -582,11 +690,20 @@ static int da8xx_remove(struct platform_device *pdev)
  	return 0;
  }

+static const struct of_device_id da8xx_id_table[] = {
+	{
+		.compatible = "ti,da830-musb",
+	},
+	{},
+};
+MODULE_DEVICE_TABLE(of, da8xx_id_table);
+
  static struct platform_driver da8xx_driver = {
  	.probe		= da8xx_probe,
  	.remove		= da8xx_remove,
  	.driver		= {
  		.name	= "musb-da8xx",
+		.of_match_table = of_match_ptr(da8xx_id_table),

   Doesn't this cause a warning about in non-DT case?

[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux