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

phy: rockchip-typec: add pm runtime support

Adds pm_runtime support for rockchip Type-C, so that power domain is
enabled only when there is a transaction going on to help save power.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Chris Zhong and committed by
Kishon Vijay Abraham I
2a4d5962 cddbc4b7

+10
+10
drivers/phy/phy-rockchip-typec.c
··· 960 960 return PTR_ERR(tcphy->extcon); 961 961 } 962 962 963 + pm_runtime_enable(dev); 964 + 963 965 for_each_available_child_of_node(np, child_np) { 964 966 struct phy *phy; 965 967 ··· 992 990 return 0; 993 991 } 994 992 993 + static int rockchip_typec_phy_remove(struct platform_device *pdev) 994 + { 995 + pm_runtime_disable(&pdev->dev); 996 + 997 + return 0; 998 + } 999 + 995 1000 static const struct of_device_id rockchip_typec_phy_dt_ids[] = { 996 1001 { .compatible = "rockchip,rk3399-typec-phy" }, 997 1002 {} ··· 1008 999 1009 1000 static struct platform_driver rockchip_typec_phy_driver = { 1010 1001 .probe = rockchip_typec_phy_probe, 1002 + .remove = rockchip_typec_phy_remove, 1011 1003 .driver = { 1012 1004 .name = "rockchip-typec-phy", 1013 1005 .of_match_table = rockchip_typec_phy_dt_ids,