Re: [PATCH] usb: host: ehci-platform: add pm_runtime_xx()

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

 



Hi Alan, Rafael, Magnus

Thank you for your reply

> The problem is that the ehci-platform driver currently doesn't know
> anything about clocks or power sources.  We need to add that
> information in a generic fashion, somehow.  Until that's done, you
> can't really use ehci-platform as your driver.
> 
> So for example, if ehci-platform _did_ know about clocks and power 
> sources, then before calling usb_add_hcd() you would do:
> 
> 	ehci_platform_enable_clocks_and_power(dev);
> 	pm_runtime_set_active(&dev->dev);
> 	pm_runtime_enable(&dev->dev);
> 
> But you definitely cannot call pm_runtime_get_aync() or anything
> similar, because the EHCI core resume routine assumes the controller's
> clocks are already running and its power supply is at full power.
> 
> Can you figure out a good way to add clock and power information to the 
> usb_ehci_pdata structure?  Something that will work with a large 
> variety of SoC EHCI controllers?

It is possible to power-on on platform setup level
if Rafael and Magnus don't care this style.
Then, I don't need this patch on ehci/ohci driver.
      
      1) power-on on platform setup timing
      2) use ehci/ohci driver

the other is that add .power callback on usb_ehci_pdata,
and control all power on this.

    -- probe --
   if (pdata->power)
	pdata->power(xxx, 1)

   usb_add_hcd()

   -- remove --
   usb_remove_hcd()

   if (pdata->power)
	pdata->power(xxx, 0)

Best regards
---
Kuninori Morimoto
--
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