From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Robert Foss <robert.foss@linaro.org>,
Paul Boddie <paul@boddie.org.uk>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Paul Cercueil <paul@crapouillou.net>,
Maxime Ripard <maxime@cerno.tech>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-mips@vger.kernel.org, letux-kernel@openphoenux.org
Subject: Re: [PATCH v17 6/6] drm/bridge: display-connector: add ddc-en gpio support
Date: Thu, 7 Apr 2022 10:30:46 +0300 [thread overview]
Message-ID: <Yk6TJgdoSqthWUiz@pendragon.ideasonboard.com> (raw)
In-Reply-To: <bf90de303a5dbc587517fe4a1bb437e198b90198.1649262368.git.hns@goldelico.com>
Hi Nikolaus,
Thank you for the patch.
On Wed, Apr 06, 2022 at 06:26:08PM +0200, H. Nikolaus Schaller wrote:
> "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>
> ---
> drivers/gpu/drm/bridge/display-connector.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/display-connector.c b/drivers/gpu/drm/bridge/display-connector.c
> index d24f5b90feabf..e4d52a7e31b71 100644
> --- a/drivers/gpu/drm/bridge/display-connector.c
> +++ b/drivers/gpu/drm/bridge/display-connector.c
> @@ -24,6 +24,7 @@ struct display_connector {
> int hpd_irq;
>
> struct regulator *dp_pwr;
> + struct gpio_desc *ddc_en;
> };
>
> static inline struct display_connector *
> @@ -345,6 +346,17 @@ static int display_connector_probe(struct platform_device *pdev)
> }
> }
>
> + /* enable DDC */
> + if (type == DRM_MODE_CONNECTOR_HDMIA) {
> + conn->ddc_en = devm_gpiod_get_optional(&pdev->dev, "ddc-en",
> + GPIOD_OUT_HIGH);
> +
> + if (IS_ERR(conn->ddc_en)) {
> + dev_err(&pdev->dev, "Couldn't get ddc-en gpio\n");
> + return PTR_ERR(conn->ddc_en);
> + }
> + }
> +
> conn->bridge.funcs = &display_connector_bridge_funcs;
> conn->bridge.of_node = pdev->dev.of_node;
>
> @@ -373,6 +385,9 @@ static int display_connector_remove(struct platform_device *pdev)
> {
> struct display_connector *conn = platform_get_drvdata(pdev);
>
> + if (conn->ddc_en)
> + gpiod_set_value(conn->ddc_en, 0);
> +
> if (conn->dp_pwr)
> regulator_disable(conn->dp_pwr);
>
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2022-04-07 7:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 16:26 [PATCH v17 0/6] MIPS: JZ4780 and CI20 HDMI H. Nikolaus Schaller
2022-04-06 16:26 ` [PATCH v17 1/6] drm/ingenic: Implement proper .atomic_get_input_bus_fmts H. Nikolaus Schaller
2022-04-06 16:26 ` [PATCH v17 2/6] drm/ingenic: Add dw-hdmi driver specialization for jz4780 H. Nikolaus Schaller
2022-04-06 16:26 ` [PATCH v17 3/6] drm/bridge: dw-hdmi: filter out YUV output formats when DVI H. Nikolaus Schaller
2022-04-06 16:26 ` [PATCH v17 4/6] drm/bridge: dw-hdmi: handle unusable or non-configured CSC module H. Nikolaus Schaller
2022-04-07 8:28 ` Neil Armstrong
2022-04-07 11:15 ` H. Nikolaus Schaller
2022-04-06 16:26 ` [PATCH v17 5/6] drm/bridge: dw-hdmi: add YCBCR formats only if CSC is available H. Nikolaus Schaller
2022-04-07 8:29 ` Neil Armstrong
2022-04-07 11:15 ` H. Nikolaus Schaller
2022-04-06 16:26 ` [PATCH v17 6/6] drm/bridge: display-connector: add ddc-en gpio support H. Nikolaus Schaller
2022-04-07 7:30 ` Laurent Pinchart [this message]
2022-04-07 11:15 ` H. Nikolaus Schaller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yk6TJgdoSqthWUiz@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=andrzej.hajda@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hns@goldelico.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=letux-kernel@openphoenux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=maxime@cerno.tech \
--cc=narmstrong@baylibre.com \
--cc=paul@boddie.org.uk \
--cc=paul@crapouillou.net \
--cc=robert.foss@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®