Re: [PATCHv6 6/8] usb: dwc2: gadget: Do not fail probe if there isn't a clock node
From: Felipe Balbi
Date: Fri Oct 31 2014 - 09:52:50 EST
On Fri, Oct 31, 2014 at 10:38:28AM +0800, Kever Yang wrote:
> Hi Dinh,
>
> On 10/29/2014 07:25 AM, dinguyen@xxxxxxxxxxxxxxxxxxxxx wrote:
> >From: Dinh Nguyen <dinguyen@xxxxxxxxxxxxxxxxxxxxx>
> >
> >Since the dwc2 hcd driver is currently not looking for a clock node during
> >init, we should not completely fail if there isn't a clock provided.
> >For dual-role mode, we will only fail init for a non-clock node error. We
> >then update the HCD to only call gadget funtions if there is a proper clock
> >node.
> We have to add clock management for hcd, and I think it is better to
> do it before more Socs use this driver, isn't it?
> I have do something in my RFC patches, but I think I still do it in a wrong
> way.
> Can we just handle all the clock thing in platform?
>
> Balbi suggested in my patch that we can "hide" clk_enable()/disable() under
> ->runtime_resume()/->runtime_suspend() and linux driver model.
> Can this be in platform driver?
it can and it probably should. Implement
->runtime_resume()/->runtime_suspend()/runtime_idle() in platform.c and
call pm_runtime_enable()/get()/put()/mark_last_busy()/autosuspend()
properly.
--
balbi
Attachment:
signature.asc
Description: Digital signature