Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/bridge: display-connector: add ddc-en gpio support

"hdmi-connector.yaml" bindings defines an optional property
"ddc-en-gpios" for a single gpio to enable DDC operation.

Usually this controls +5V power on the HDMI connector.
This +5V may also be needed for HPD.

This was not reflected in code but is needed to make the CI20
board work.

Now, the driver activates the ddc gpio after probe and
deactivates after remove so it is "almost on".

But only if this driver is loaded (and not e.g. blacklisted
as module).

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://patchwork.freedesktop.org/patch/msgid/3607e924b7c0cf0be956c0d49894be1442dbda41.1649330171.git.hns@goldelico.com

authored by

H. Nikolaus Schaller and committed by
Paul Cercueil
6de79dd3 d72dcbe9

+15
+15
drivers/gpu/drm/bridge/display-connector.c
··· 24 24 int hpd_irq; 25 25 26 26 struct regulator *dp_pwr; 27 + struct gpio_desc *ddc_en; 27 28 }; 28 29 29 30 static inline struct display_connector * ··· 346 345 } 347 346 } 348 347 348 + /* enable DDC */ 349 + if (type == DRM_MODE_CONNECTOR_HDMIA) { 350 + conn->ddc_en = devm_gpiod_get_optional(&pdev->dev, "ddc-en", 351 + GPIOD_OUT_HIGH); 352 + 353 + if (IS_ERR(conn->ddc_en)) { 354 + dev_err(&pdev->dev, "Couldn't get ddc-en gpio\n"); 355 + return PTR_ERR(conn->ddc_en); 356 + } 357 + } 358 + 349 359 conn->bridge.funcs = &display_connector_bridge_funcs; 350 360 conn->bridge.of_node = pdev->dev.of_node; 351 361 ··· 384 372 static int display_connector_remove(struct platform_device *pdev) 385 373 { 386 374 struct display_connector *conn = platform_get_drvdata(pdev); 375 + 376 + if (conn->ddc_en) 377 + gpiod_set_value(conn->ddc_en, 0); 387 378 388 379 if (conn->dp_pwr) 389 380 regulator_disable(conn->dp_pwr);