Lines Matching refs:hdmi_dev

289 static int hdmi_conf_apply(struct hdmi_device *hdmi_dev)  in hdmi_conf_apply()  argument
291 struct device *dev = hdmi_dev->dev; in hdmi_conf_apply()
292 const struct hdmi_preset_conf *conf = hdmi_dev->cur_conf; in hdmi_conf_apply()
299 hdmi_write_mask(hdmi_dev, HDMI_PHY_RSTOUT, ~0, HDMI_PHY_SW_RSTOUT); in hdmi_conf_apply()
301 hdmi_write_mask(hdmi_dev, HDMI_PHY_RSTOUT, 0, HDMI_PHY_SW_RSTOUT); in hdmi_conf_apply()
305 preset.preset = hdmi_dev->cur_preset; in hdmi_conf_apply()
306 ret = v4l2_subdev_call(hdmi_dev->phy_sd, video, s_dv_preset, &preset); in hdmi_conf_apply()
313 hdmi_write_mask(hdmi_dev, HDMI_CORE_RSTOUT, 0, HDMI_CORE_SW_RSTOUT); in hdmi_conf_apply()
315 hdmi_write_mask(hdmi_dev, HDMI_CORE_RSTOUT, ~0, HDMI_CORE_SW_RSTOUT); in hdmi_conf_apply()
318 hdmi_reg_init(hdmi_dev); in hdmi_conf_apply()
321 hdmi_timing_apply(hdmi_dev, conf); in hdmi_conf_apply()
872 struct hdmi_device *hdmi_dev = NULL; in hdmi_probe() local
878 hdmi_dev = kzalloc(sizeof(*hdmi_dev), GFP_KERNEL); in hdmi_probe()
879 if (!hdmi_dev) { in hdmi_probe()
885 hdmi_dev->dev = dev; in hdmi_probe()
887 ret = hdmi_resources_init(hdmi_dev); in hdmi_probe()
899 hdmi_dev->regs = ioremap(res->start, resource_size(res)); in hdmi_probe()
900 if (hdmi_dev->regs == NULL) { in hdmi_probe()
913 ret = request_irq(res->start, hdmi_irq_handler, 0, "hdmi", hdmi_dev); in hdmi_probe()
918 hdmi_dev->irq = res->start; in hdmi_probe()
921 strlcpy(hdmi_dev->v4l2_dev.name, dev_name(dev), in hdmi_probe()
922 sizeof(hdmi_dev->v4l2_dev.name)); in hdmi_probe()
924 ret = v4l2_device_register(NULL, &hdmi_dev->v4l2_dev); in hdmi_probe()
939 hdmi_dev->phy_sd = v4l2_i2c_new_subdev_board(&hdmi_dev->v4l2_dev, in hdmi_probe()
943 if (hdmi_dev->phy_sd == NULL) { in hdmi_probe()
949 clk_enable(hdmi_dev->res.hdmi); in hdmi_probe()
953 sd = &hdmi_dev->sd; in hdmi_probe()
958 hdmi_dev->cur_preset = HDMI_DEFAULT_PRESET; in hdmi_probe()
960 hdmi_dev->cur_conf = hdmi_preset2conf(hdmi_dev->cur_preset); in hdmi_probe()
970 v4l2_device_unregister(&hdmi_dev->v4l2_dev); in hdmi_probe()
973 free_irq(hdmi_dev->irq, hdmi_dev); in hdmi_probe()
976 iounmap(hdmi_dev->regs); in hdmi_probe()
979 hdmi_resources_cleanup(hdmi_dev); in hdmi_probe()
982 kfree(hdmi_dev); in hdmi_probe()
993 struct hdmi_device *hdmi_dev = sd_to_hdmi_dev(sd); in hdmi_remove() local
996 clk_disable(hdmi_dev->res.hdmi); in hdmi_remove()
997 v4l2_device_unregister(&hdmi_dev->v4l2_dev); in hdmi_remove()
998 disable_irq(hdmi_dev->irq); in hdmi_remove()
999 free_irq(hdmi_dev->irq, hdmi_dev); in hdmi_remove()
1000 iounmap(hdmi_dev->regs); in hdmi_remove()
1001 hdmi_resources_cleanup(hdmi_dev); in hdmi_remove()
1002 kfree(hdmi_dev); in hdmi_remove()