Lines Matching full:hdmi_phy

27 	struct mtk_hdmi_phy *hdmi_phy = phy_get_drvdata(phy);  in mtk_hdmi_phy_power_on()  local
30 ret = clk_prepare_enable(hdmi_phy->pll); in mtk_hdmi_phy_power_on()
34 hdmi_phy->conf->hdmi_phy_enable_tmds(hdmi_phy); in mtk_hdmi_phy_power_on()
40 struct mtk_hdmi_phy *hdmi_phy = phy_get_drvdata(phy); in mtk_hdmi_phy_power_off() local
42 hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy); in mtk_hdmi_phy_power_off()
43 clk_disable_unprepare(hdmi_phy->pll); in mtk_hdmi_phy_power_off()
50 struct mtk_hdmi_phy *hdmi_phy = phy_get_drvdata(phy); in mtk_hdmi_phy_configure() local
52 if (hdmi_phy->conf->hdmi_phy_configure) in mtk_hdmi_phy_configure()
53 return hdmi_phy->conf->hdmi_phy_configure(phy, opts); in mtk_hdmi_phy_configure()
59 mtk_hdmi_phy_dev_get_ops(const struct mtk_hdmi_phy *hdmi_phy) in mtk_hdmi_phy_dev_get_ops() argument
61 if (hdmi_phy && hdmi_phy->conf && in mtk_hdmi_phy_dev_get_ops()
62 hdmi_phy->conf->hdmi_phy_enable_tmds && in mtk_hdmi_phy_dev_get_ops()
63 hdmi_phy->conf->hdmi_phy_disable_tmds) in mtk_hdmi_phy_dev_get_ops()
66 if (hdmi_phy) in mtk_hdmi_phy_dev_get_ops()
67 dev_err(hdmi_phy->dev, "Failed to get dev ops of phy\n"); in mtk_hdmi_phy_dev_get_ops()
71 static void mtk_hdmi_phy_clk_get_data(struct mtk_hdmi_phy *hdmi_phy, in mtk_hdmi_phy_clk_get_data() argument
74 clk_init->flags = hdmi_phy->conf->flags; in mtk_hdmi_phy_clk_get_data()
75 clk_init->ops = hdmi_phy->conf->hdmi_phy_clk_ops; in mtk_hdmi_phy_clk_get_data()
81 struct mtk_hdmi_phy *hdmi_phy; in mtk_hdmi_phy_probe() local
93 hdmi_phy = devm_kzalloc(dev, sizeof(*hdmi_phy), GFP_KERNEL); in mtk_hdmi_phy_probe()
94 if (!hdmi_phy) in mtk_hdmi_phy_probe()
97 hdmi_phy->regs = devm_platform_ioremap_resource(pdev, 0); in mtk_hdmi_phy_probe()
98 if (IS_ERR(hdmi_phy->regs)) in mtk_hdmi_phy_probe()
99 return PTR_ERR(hdmi_phy->regs); in mtk_hdmi_phy_probe()
113 hdmi_phy->dev = dev; in mtk_hdmi_phy_probe()
114 hdmi_phy->conf = in mtk_hdmi_phy_probe()
116 mtk_hdmi_phy_clk_get_data(hdmi_phy, &clk_init); in mtk_hdmi_phy_probe()
117 hdmi_phy->pll_hw.init = &clk_init; in mtk_hdmi_phy_probe()
118 hdmi_phy->pll = devm_clk_register(dev, &hdmi_phy->pll_hw); in mtk_hdmi_phy_probe()
119 if (IS_ERR(hdmi_phy->pll)) in mtk_hdmi_phy_probe()
120 return dev_err_probe(dev, PTR_ERR(hdmi_phy->pll), in mtk_hdmi_phy_probe()
124 &hdmi_phy->ibias); in mtk_hdmi_phy_probe()
129 &hdmi_phy->ibias_up); in mtk_hdmi_phy_probe()
134 hdmi_phy->drv_imp_clk = 0x30; in mtk_hdmi_phy_probe()
135 hdmi_phy->drv_imp_d2 = 0x30; in mtk_hdmi_phy_probe()
136 hdmi_phy->drv_imp_d1 = 0x30; in mtk_hdmi_phy_probe()
137 hdmi_phy->drv_imp_d0 = 0x30; in mtk_hdmi_phy_probe()
139 phy = devm_phy_create(dev, NULL, mtk_hdmi_phy_dev_get_ops(hdmi_phy)); in mtk_hdmi_phy_probe()
143 phy_set_drvdata(phy, hdmi_phy); in mtk_hdmi_phy_probe()
150 if (hdmi_phy->conf->pll_default_off) in mtk_hdmi_phy_probe()
151 hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy); in mtk_hdmi_phy_probe()
154 hdmi_phy->pll); in mtk_hdmi_phy_probe()