]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/phy/phy-generic.c
ENGR00291282-6 usb: phy-nop: add the implementation of .set_suspend
[karo-tx-linux.git] / drivers / usb / phy / phy-generic.c
index 7594e5069ae59d2f621054ff7f6cd7331022f5a2..47233d47d18c16f8171b0ce489ee46d0bfbee05f 100644 (file)
@@ -56,6 +56,16 @@ EXPORT_SYMBOL_GPL(usb_phy_generic_unregister);
 
 static int nop_set_suspend(struct usb_phy *x, int suspend)
 {
+       struct nop_usb_xceiv *nop = dev_get_drvdata(x->dev);
+
+       if (IS_ERR(nop->clk))
+               return 0;
+
+       if (suspend)
+               clk_disable_unprepare(nop->clk);
+       else
+               clk_prepare_enable(nop->clk);
+
        return 0;
 }