Lines Matching refs:hdmi_dev

250 static int hdmi_conf_apply(struct hdmi_device *hdmi_dev)  in hdmi_conf_apply()  argument
252 struct device *dev = hdmi_dev->dev; in hdmi_conf_apply()
253 const struct hdmi_timings *conf = hdmi_dev->cur_conf; in hdmi_conf_apply()
259 if (!hdmi_dev->cur_conf_dirty) in hdmi_conf_apply()
263 hdmi_write_mask(hdmi_dev, HDMI_PHY_RSTOUT, ~0, HDMI_PHY_SW_RSTOUT); in hdmi_conf_apply()
265 hdmi_write_mask(hdmi_dev, HDMI_PHY_RSTOUT, 0, HDMI_PHY_SW_RSTOUT); in hdmi_conf_apply()
269 ret = v4l2_subdev_call(hdmi_dev->phy_sd, video, s_dv_timings, in hdmi_conf_apply()
270 &hdmi_dev->cur_timings); in hdmi_conf_apply()
277 hdmi_write_mask(hdmi_dev, HDMI_CORE_RSTOUT, 0, HDMI_CORE_SW_RSTOUT); in hdmi_conf_apply()
279 hdmi_write_mask(hdmi_dev, HDMI_CORE_RSTOUT, ~0, HDMI_CORE_SW_RSTOUT); in hdmi_conf_apply()
282 hdmi_reg_init(hdmi_dev); in hdmi_conf_apply()
285 hdmi_timing_apply(hdmi_dev, conf); in hdmi_conf_apply()
287 hdmi_dev->cur_conf_dirty = 0; in hdmi_conf_apply()
888 struct hdmi_device *hdmi_dev = NULL; in hdmi_probe() local
900 hdmi_dev = devm_kzalloc(&pdev->dev, sizeof(*hdmi_dev), GFP_KERNEL); in hdmi_probe()
901 if (!hdmi_dev) { in hdmi_probe()
907 hdmi_dev->dev = dev; in hdmi_probe()
909 ret = hdmi_resources_init(hdmi_dev); in hdmi_probe()
921 hdmi_dev->regs = devm_ioremap(&pdev->dev, res->start, in hdmi_probe()
923 if (hdmi_dev->regs == NULL) { in hdmi_probe()
937 "hdmi", hdmi_dev); in hdmi_probe()
942 hdmi_dev->irq = res->start; in hdmi_probe()
945 strlcpy(hdmi_dev->v4l2_dev.name, dev_name(dev), in hdmi_probe()
946 sizeof(hdmi_dev->v4l2_dev.name)); in hdmi_probe()
948 ret = v4l2_device_register(NULL, &hdmi_dev->v4l2_dev); in hdmi_probe()
968 hdmi_dev->phy_sd = v4l2_i2c_new_subdev_board(&hdmi_dev->v4l2_dev, in hdmi_probe()
972 if (hdmi_dev->phy_sd == NULL) { in hdmi_probe()
987 hdmi_dev->mhl_sd = v4l2_i2c_new_subdev_board( in hdmi_probe()
988 &hdmi_dev->v4l2_dev, adapter, in hdmi_probe()
992 if (hdmi_dev->mhl_sd == NULL) { in hdmi_probe()
999 clk_enable(hdmi_dev->res.hdmi); in hdmi_probe()
1003 sd = &hdmi_dev->sd; in hdmi_probe()
1008 hdmi_dev->cur_timings = in hdmi_probe()
1011 hdmi_dev->cur_conf = in hdmi_probe()
1013 hdmi_dev->cur_conf_dirty = 1; in hdmi_probe()
1023 v4l2_device_unregister(&hdmi_dev->v4l2_dev); in hdmi_probe()
1026 hdmi_resources_cleanup(hdmi_dev); in hdmi_probe()
1037 struct hdmi_device *hdmi_dev = sd_to_hdmi_dev(sd); in hdmi_remove() local
1040 clk_disable(hdmi_dev->res.hdmi); in hdmi_remove()
1041 v4l2_device_unregister(&hdmi_dev->v4l2_dev); in hdmi_remove()
1042 disable_irq(hdmi_dev->irq); in hdmi_remove()
1043 hdmi_resources_cleanup(hdmi_dev); in hdmi_remove()