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]

 





On 07.03.2016 18:56, Sergei Shtylyov wrote:
On 03/07/2016 07:08 PM, Petr Kulhavy wrote:
Hello

On 07.03.2016 14:29, Sergei Shtylyov wrote:
Hello.

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

@@ -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 this is a _real_ regulator, then it needs to be enabled by somebody,
doesn't it?


Well, it's possible that Vbus is controlled via GPIO like on DaVinci DM644x. But so far we haven't seen this on DA8xx...


No, as you can see just a few lines above in the patch.

I'm seeing exactly opposite -- you're enabling the regulator right before registering the platform device, so after registering generic PHY. It's therefore not at all clear why you've exchanged the calls above. I can't ACK this patch.

You are right. I'm wondering that this might be anyway incorrect, since the Vbus should be provided in host mode only. We're back at the issue of the missing PHY. And on DA8xx the Vbus is (supposed to be) controlled via the DRVVBUS pin. So it's probably better to not to touch the regulator at all, what do you think?


[...]
@@ -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?

No, the of_match_table is defined independent of the CONFIG_OF.

   But of_match_ptr() depends on it, IIRC.

In include/linux/of.h I do see:

#ifdef (CONFIG_OF)
[...]

#defineof_match_ptr <http://lxr.free-electrons.com/ident?i=of_match_ptr>(_ptr)      (_ptr)

[...]
#else
[...]

#defineof_match_ptr <http://lxr.free-electrons.com/ident?i=of_match_ptr>(_ptr)NULL <http://lxr.free-electrons.com/ident?i=NULL>
[...]
#endif


Regards
Petr
--
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