Lines Matching full:conn

45 	struct display_connector *conn = to_display_connector(bridge);  in display_connector_detect()  local
47 if (conn->hpd_gpio) { in display_connector_detect()
48 if (gpiod_get_value_cansleep(conn->hpd_gpio)) in display_connector_detect()
54 if (conn->bridge.ddc && drm_probe_ddc(conn->bridge.ddc)) in display_connector_detect()
57 switch (conn->bridge.type) { in display_connector_detect()
87 struct display_connector *conn = to_display_connector(bridge); in display_connector_get_edid() local
89 return drm_get_edid(connector, conn->bridge.ddc); in display_connector_get_edid()
109 struct drm_connector *conn = conn_state->connector; in display_connector_get_output_bus_fmts() local
117 if (conn->display_info.num_bus_formats && in display_connector_get_output_bus_fmts()
118 conn->display_info.bus_formats) in display_connector_get_output_bus_fmts()
119 out_bus_fmts[0] = conn->display_info.bus_formats[0]; in display_connector_get_output_bus_fmts()
185 struct display_connector *conn = arg; in display_connector_hpd_irq() local
186 struct drm_bridge *bridge = &conn->bridge; in display_connector_hpd_irq()
194 struct display_connector *conn, in display_connector_get_supply() argument
197 conn->supply = devm_regulator_get_optional(&pdev->dev, name); in display_connector_get_supply()
199 if (conn->supply == ERR_PTR(-ENODEV)) in display_connector_get_supply()
200 conn->supply = NULL; in display_connector_get_supply()
202 return PTR_ERR_OR_ZERO(conn->supply); in display_connector_get_supply()
207 struct display_connector *conn; in display_connector_probe() local
212 conn = devm_kzalloc(&pdev->dev, sizeof(*conn), GFP_KERNEL); in display_connector_probe()
213 if (!conn) in display_connector_probe()
216 platform_set_drvdata(pdev, conn); in display_connector_probe()
228 conn->bridge.type = DRM_MODE_CONNECTOR_DVIA; in display_connector_probe()
230 conn->bridge.type = DRM_MODE_CONNECTOR_DVID; in display_connector_probe()
232 conn->bridge.type = DRM_MODE_CONNECTOR_DVII; in display_connector_probe()
252 conn->bridge.type = DRM_MODE_CONNECTOR_HDMIA; in display_connector_probe()
254 conn->bridge.type = DRM_MODE_CONNECTOR_HDMIB; in display_connector_probe()
266 conn->bridge.type = type; in display_connector_probe()
271 conn->bridge.interlace_allowed = true; in display_connector_probe()
283 conn->hpd_gpio = devm_gpiod_get_optional(&pdev->dev, "hpd", in display_connector_probe()
285 if (IS_ERR(conn->hpd_gpio)) in display_connector_probe()
286 return dev_err_probe(&pdev->dev, PTR_ERR(conn->hpd_gpio), in display_connector_probe()
289 conn->hpd_irq = gpiod_to_irq(conn->hpd_gpio); in display_connector_probe()
291 conn->hpd_irq = -EINVAL; in display_connector_probe()
294 if (conn->hpd_irq >= 0) { in display_connector_probe()
295 ret = devm_request_threaded_irq(&pdev->dev, conn->hpd_irq, in display_connector_probe()
300 "HPD", conn); in display_connector_probe()
304 conn->hpd_irq = -EINVAL; in display_connector_probe()
316 conn->bridge.ddc = of_get_i2c_adapter_by_node(phandle); in display_connector_probe()
318 if (!conn->bridge.ddc) in display_connector_probe()
330 ret = display_connector_get_supply(pdev, conn, "dp-pwr"); in display_connector_probe()
339 conn->ddc_en = devm_gpiod_get_optional(&pdev->dev, "ddc-en", in display_connector_probe()
342 if (IS_ERR(conn->ddc_en)) { in display_connector_probe()
344 return PTR_ERR(conn->ddc_en); in display_connector_probe()
347 ret = display_connector_get_supply(pdev, conn, "hdmi-pwr"); in display_connector_probe()
352 if (conn->supply) { in display_connector_probe()
353 ret = regulator_enable(conn->supply); in display_connector_probe()
360 conn->bridge.funcs = &display_connector_bridge_funcs; in display_connector_probe()
361 conn->bridge.of_node = pdev->dev.of_node; in display_connector_probe()
363 if (conn->bridge.ddc) in display_connector_probe()
364 conn->bridge.ops |= DRM_BRIDGE_OP_EDID in display_connector_probe()
366 if (conn->hpd_gpio) in display_connector_probe()
367 conn->bridge.ops |= DRM_BRIDGE_OP_DETECT; in display_connector_probe()
368 if (conn->hpd_irq >= 0) in display_connector_probe()
369 conn->bridge.ops |= DRM_BRIDGE_OP_HPD; in display_connector_probe()
373 drm_get_connector_type_name(conn->bridge.type), in display_connector_probe()
375 conn->bridge.ddc ? "with" : "without", in display_connector_probe()
376 conn->hpd_gpio ? "with" : "without", in display_connector_probe()
377 conn->bridge.ops); in display_connector_probe()
379 drm_bridge_add(&conn->bridge); in display_connector_probe()
386 struct display_connector *conn = platform_get_drvdata(pdev); in display_connector_remove() local
388 if (conn->ddc_en) in display_connector_remove()
389 gpiod_set_value(conn->ddc_en, 0); in display_connector_remove()
391 if (conn->supply) in display_connector_remove()
392 regulator_disable(conn->supply); in display_connector_remove()
394 drm_bridge_remove(&conn->bridge); in display_connector_remove()
396 if (!IS_ERR(conn->bridge.ddc)) in display_connector_remove()
397 i2c_put_adapter(conn->bridge.ddc); in display_connector_remove()