On 14/11/16 10:56, Felipe Balbi wrote: > > Hi, > > Roger Quadros <rogerq@xxxxxx> writes: >>> Peter Chen <peter.chen@xxxxxxx> writes: >>>> Add clock operation at .set_suspend if the PHY has >>>> suspend requirement, it can be benefit of power saving for >>>> phy and the whole system (parent clock may also be disabled). >>>> >>>> Signed-off-by: Peter Chen <peter.chen@xxxxxxx> >>>> --- >>>> drivers/usb/phy/phy-generic.c | 9 +++++++++ >>>> 1 file changed, 9 insertions(+) >>>> >>>> diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c >>>> index 8311ba2..89d6e7a 100644 >>>> --- a/drivers/usb/phy/phy-generic.c >>>> +++ b/drivers/usb/phy/phy-generic.c >>>> @@ -59,6 +59,15 @@ EXPORT_SYMBOL_GPL(usb_phy_generic_unregister); >>>> >>>> static int nop_set_suspend(struct usb_phy *x, int suspend) >>>> { >>>> + struct usb_phy_generic *nop = dev_get_drvdata(x->dev); >>>> + >>>> + if (!IS_ERR(nop->clk)) { >>>> + if (suspend) >>>> + clk_disable_unprepare(nop->clk); >>>> + else >>>> + clk_prepare_enable(nop->clk); >>>> + } >>>> + >>> >>> Bin, Roger, can you make sure this causes no regressions for AM335x >>> devices? >>> >> If I understood right am335x doesn't use nop-phy so this patch shouldn't >> impact AM335x. Bin, do you agree? > > phy-am335x.c uses phy-generic.c as a library. Look for > usb_phy_gen_create_phy(). > OK, but it doesn't seem to use the PHY clocks at all. cheers, -roger
Attachment:
signature.asc
Description: OpenPGP digital signature