Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: ti: phy-j721e-wiz: add resume support

Add resume support.
It has been tested on J7200 SR1.0 and SR2.0.

Co-developed-by: Théo Lebrun <theo.lebrun@bootlin.com>
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://lore.kernel.org/r/20240412-j7200-phy-s2r-v1-3-f15815833974@bootlin.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Thomas Richard and committed by
Vinod Koul
b5539abd 3c4e13cf

+29
+29
drivers/phy/ti/phy-j721e-wiz.c
··· 1659 1659 pm_runtime_disable(dev); 1660 1660 } 1661 1661 1662 + static int wiz_resume_noirq(struct device *dev) 1663 + { 1664 + struct device_node *node = dev->of_node; 1665 + struct wiz *wiz = dev_get_drvdata(dev); 1666 + int ret; 1667 + 1668 + /* Enable supplemental Control override if available */ 1669 + if (wiz->sup_legacy_clk_override) 1670 + regmap_field_write(wiz->sup_legacy_clk_override, 1); 1671 + 1672 + wiz_clock_init(wiz); 1673 + 1674 + ret = wiz_init(wiz); 1675 + if (ret) { 1676 + dev_err(dev, "WIZ initialization failed\n"); 1677 + goto err_wiz_init; 1678 + } 1679 + 1680 + return 0; 1681 + 1682 + err_wiz_init: 1683 + wiz_clock_cleanup(wiz, node); 1684 + 1685 + return ret; 1686 + } 1687 + 1688 + static DEFINE_NOIRQ_DEV_PM_OPS(wiz_pm_ops, NULL, wiz_resume_noirq); 1689 + 1662 1690 static struct platform_driver wiz_driver = { 1663 1691 .probe = wiz_probe, 1664 1692 .remove_new = wiz_remove, 1665 1693 .driver = { 1666 1694 .name = "wiz", 1667 1695 .of_match_table = wiz_id_table, 1696 + .pm = pm_sleep_ptr(&wiz_pm_ops), 1668 1697 }, 1669 1698 }; 1670 1699 module_platform_driver(wiz_driver);