Lines Matching full:phy
10 static int msm_hdmi_phy_resource_init(struct hdmi_phy *phy) in msm_hdmi_phy_resource_init() argument
12 struct hdmi_phy_cfg *cfg = phy->cfg; in msm_hdmi_phy_resource_init()
13 struct device *dev = &phy->pdev->dev; in msm_hdmi_phy_resource_init()
16 phy->regs = devm_kcalloc(dev, cfg->num_regs, sizeof(phy->regs[0]), in msm_hdmi_phy_resource_init()
18 if (!phy->regs) in msm_hdmi_phy_resource_init()
21 phy->clks = devm_kcalloc(dev, cfg->num_clks, sizeof(phy->clks[0]), in msm_hdmi_phy_resource_init()
23 if (!phy->clks) in msm_hdmi_phy_resource_init()
32 DRM_DEV_ERROR(dev, "failed to get phy regulator: %s (%d)\n", in msm_hdmi_phy_resource_init()
37 phy->regs[i] = reg; in msm_hdmi_phy_resource_init()
43 clk = msm_clk_get(phy->pdev, cfg->clk_names[i]); in msm_hdmi_phy_resource_init()
46 DRM_DEV_ERROR(dev, "failed to get phy clock: %s (%d)\n", in msm_hdmi_phy_resource_init()
51 phy->clks[i] = clk; in msm_hdmi_phy_resource_init()
57 int msm_hdmi_phy_resource_enable(struct hdmi_phy *phy) in msm_hdmi_phy_resource_enable() argument
59 struct hdmi_phy_cfg *cfg = phy->cfg; in msm_hdmi_phy_resource_enable()
60 struct device *dev = &phy->pdev->dev; in msm_hdmi_phy_resource_enable()
66 ret = regulator_enable(phy->regs[i]); in msm_hdmi_phy_resource_enable()
73 ret = clk_prepare_enable(phy->clks[i]); in msm_hdmi_phy_resource_enable()
82 void msm_hdmi_phy_resource_disable(struct hdmi_phy *phy) in msm_hdmi_phy_resource_disable() argument
84 struct hdmi_phy_cfg *cfg = phy->cfg; in msm_hdmi_phy_resource_disable()
85 struct device *dev = &phy->pdev->dev; in msm_hdmi_phy_resource_disable()
89 clk_disable_unprepare(phy->clks[i]); in msm_hdmi_phy_resource_disable()
92 regulator_disable(phy->regs[i]); in msm_hdmi_phy_resource_disable()
97 void msm_hdmi_phy_powerup(struct hdmi_phy *phy, unsigned long int pixclock) in msm_hdmi_phy_powerup() argument
99 if (!phy || !phy->cfg->powerup) in msm_hdmi_phy_powerup()
102 phy->cfg->powerup(phy, pixclock); in msm_hdmi_phy_powerup()
105 void msm_hdmi_phy_powerdown(struct hdmi_phy *phy) in msm_hdmi_phy_powerdown() argument
107 if (!phy || !phy->cfg->powerdown) in msm_hdmi_phy_powerdown()
110 phy->cfg->powerdown(phy); in msm_hdmi_phy_powerdown()
141 struct hdmi_phy *phy; in msm_hdmi_phy_probe() local
144 phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); in msm_hdmi_phy_probe()
145 if (!phy) in msm_hdmi_phy_probe()
148 phy->cfg = (struct hdmi_phy_cfg *)of_device_get_match_data(dev); in msm_hdmi_phy_probe()
149 if (!phy->cfg) in msm_hdmi_phy_probe()
152 phy->mmio = msm_ioremap(pdev, "hdmi_phy", "HDMI_PHY"); in msm_hdmi_phy_probe()
153 if (IS_ERR(phy->mmio)) { in msm_hdmi_phy_probe()
154 DRM_DEV_ERROR(dev, "%s: failed to map phy base\n", __func__); in msm_hdmi_phy_probe()
158 phy->pdev = pdev; in msm_hdmi_phy_probe()
160 ret = msm_hdmi_phy_resource_init(phy); in msm_hdmi_phy_probe()
166 ret = msm_hdmi_phy_resource_enable(phy); in msm_hdmi_phy_probe()
170 ret = msm_hdmi_phy_pll_init(pdev, phy->cfg->type); in msm_hdmi_phy_probe()
173 msm_hdmi_phy_resource_disable(phy); in msm_hdmi_phy_probe()
177 msm_hdmi_phy_resource_disable(phy); in msm_hdmi_phy_probe()
179 platform_set_drvdata(pdev, phy); in msm_hdmi_phy_probe()
192 { .compatible = "qcom,hdmi-phy-8660",
194 { .compatible = "qcom,hdmi-phy-8960",
196 { .compatible = "qcom,hdmi-phy-8974",
198 { .compatible = "qcom,hdmi-phy-8084",
200 { .compatible = "qcom,hdmi-phy-8996",