mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
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>
This commit is contained in:
parent
3c4e13cf9e
commit
b5539abdd0
@ -1659,12 +1659,41 @@ static void wiz_remove(struct platform_device *pdev)
|
|||||||
pm_runtime_disable(dev);
|
pm_runtime_disable(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int wiz_resume_noirq(struct device *dev)
|
||||||
|
{
|
||||||
|
struct device_node *node = dev->of_node;
|
||||||
|
struct wiz *wiz = dev_get_drvdata(dev);
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* Enable supplemental Control override if available */
|
||||||
|
if (wiz->sup_legacy_clk_override)
|
||||||
|
regmap_field_write(wiz->sup_legacy_clk_override, 1);
|
||||||
|
|
||||||
|
wiz_clock_init(wiz);
|
||||||
|
|
||||||
|
ret = wiz_init(wiz);
|
||||||
|
if (ret) {
|
||||||
|
dev_err(dev, "WIZ initialization failed\n");
|
||||||
|
goto err_wiz_init;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
err_wiz_init:
|
||||||
|
wiz_clock_cleanup(wiz, node);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static DEFINE_NOIRQ_DEV_PM_OPS(wiz_pm_ops, NULL, wiz_resume_noirq);
|
||||||
|
|
||||||
static struct platform_driver wiz_driver = {
|
static struct platform_driver wiz_driver = {
|
||||||
.probe = wiz_probe,
|
.probe = wiz_probe,
|
||||||
.remove_new = wiz_remove,
|
.remove_new = wiz_remove,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "wiz",
|
.name = "wiz",
|
||||||
.of_match_table = wiz_id_table,
|
.of_match_table = wiz_id_table,
|
||||||
|
.pm = pm_sleep_ptr(&wiz_pm_ops),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
module_platform_driver(wiz_driver);
|
module_platform_driver(wiz_driver);
|
||||||
|
Loading…
Reference in New Issue
Block a user