Lines Matching +full:ddc +full:- +full:i2c +full:- +full:bus

1 /*-
37 #include <sys/bus.h>
43 #include <machine/bus.h>
63 {"fsl,imx6dl-hdmi", 1},
64 {"fsl,imx6q-hdmi", 1},
75 if (sc->i2c_xref == 0) in imx_hdmi_get_i2c_dev()
78 return (OF_device_from_xref(sc->i2c_xref)); in imx_hdmi_get_i2c_dev()
82 * Deferred HDMI init. dwc_hdmi_init() does i2c transfers for DDC/EDID. The imx
83 * i2c devices also use a config_intrhook function to finish their init, because
85 * whether the i2c or our hdmi intrhook function runs first. If we go first we
86 * have to continue waiting until after the i2c driver is ready to do transfers
90 * eventhandler callback function (if necessary), to see if our i2c device is
92 * intrhook function the i2c devices might be ready, in which case we never
95 * i2c device we care about. Once we have our i2c device we unregister from
105 if (OF_device_from_xref(sc->i2c_xref) != NULL) { in imx_hdmi_init()
106 if (sc->eh_tag != NULL) { in imx_hdmi_init()
108 sc->eh_tag); in imx_hdmi_init()
115 device_printf((device_t)dev, "Waiting for DDC i2c device\n"); in imx_hdmi_init()
117 if (sc->eh_tag == NULL) { in imx_hdmi_init()
118 sc->eh_tag = EVENTHANDLER_REGISTER(device_attach, in imx_hdmi_init()
130 if (sc->base.sc_mem_res != NULL) in imx_hdmi_detach()
132 sc->base.sc_mem_rid, sc->base.sc_mem_res); in imx_hdmi_detach()
146 sc->base.sc_dev = dev; in imx_hdmi_attach()
147 sc->base.sc_get_i2c_dev = imx_hdmi_get_i2c_dev; in imx_hdmi_attach()
151 sc->base.sc_mem_rid = 0; in imx_hdmi_attach()
152 sc->base.sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in imx_hdmi_attach()
153 &sc->base.sc_mem_rid, RF_ACTIVE); in imx_hdmi_attach()
154 if (sc->base.sc_mem_res == NULL) { in imx_hdmi_attach()
161 if (OF_getencprop(node, "ddc-i2c-bus", &i2c_xref, sizeof(i2c_xref)) == -1) in imx_hdmi_attach()
162 sc->i2c_xref = 0; in imx_hdmi_attach()
164 sc->i2c_xref = i2c_xref; in imx_hdmi_attach()
173 /* Further HDMI init requires interrupts for i2c transfers. */ in imx_hdmi_attach()
187 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) in imx_hdmi_probe()