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()
882 struct hdmi_device *hdmi_dev = NULL; in hdmi_probe() local
894 hdmi_dev = devm_kzalloc(&pdev->dev, sizeof(*hdmi_dev), GFP_KERNEL); in hdmi_probe()
895 if (!hdmi_dev) { in hdmi_probe()
901 hdmi_dev->dev = dev; in hdmi_probe()
903 ret = hdmi_resources_init(hdmi_dev); in hdmi_probe()
915 hdmi_dev->regs = devm_ioremap(&pdev->dev, res->start, in hdmi_probe()
917 if (hdmi_dev->regs == NULL) { in hdmi_probe()
931 "hdmi", hdmi_dev); in hdmi_probe()
936 hdmi_dev->irq = res->start; in hdmi_probe()
939 strlcpy(hdmi_dev->v4l2_dev.name, dev_name(dev), in hdmi_probe()
940 sizeof(hdmi_dev->v4l2_dev.name)); in hdmi_probe()
942 ret = v4l2_device_register(NULL, &hdmi_dev->v4l2_dev); in hdmi_probe()
962 hdmi_dev->phy_sd = v4l2_i2c_new_subdev_board(&hdmi_dev->v4l2_dev, in hdmi_probe()
966 if (hdmi_dev->phy_sd == NULL) { in hdmi_probe()
981 hdmi_dev->mhl_sd = v4l2_i2c_new_subdev_board( in hdmi_probe()
982 &hdmi_dev->v4l2_dev, adapter, in hdmi_probe()
986 if (hdmi_dev->mhl_sd == NULL) { in hdmi_probe()
993 clk_enable(hdmi_dev->res.hdmi); in hdmi_probe()
997 sd = &hdmi_dev->sd; in hdmi_probe()
1002 hdmi_dev->cur_timings = in hdmi_probe()
1005 hdmi_dev->cur_conf = in hdmi_probe()
1007 hdmi_dev->cur_conf_dirty = 1; in hdmi_probe()
1017 v4l2_device_unregister(&hdmi_dev->v4l2_dev); in hdmi_probe()
1020 hdmi_resources_cleanup(hdmi_dev); in hdmi_probe()
1031 struct hdmi_device *hdmi_dev = sd_to_hdmi_dev(sd); in hdmi_remove() local
1034 clk_disable(hdmi_dev->res.hdmi); in hdmi_remove()
1035 v4l2_device_unregister(&hdmi_dev->v4l2_dev); in hdmi_remove()
1036 disable_irq(hdmi_dev->irq); in hdmi_remove()
1037 hdmi_resources_cleanup(hdmi_dev); in hdmi_remove()