public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: dgreid@chromium.org (Dylan Reid)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] drm/tegra: Enable HDMI_5V_CON regulator
Date: Sat, 17 May 2014 11:21:21 -0700	[thread overview]
Message-ID: <1400350881-22008-2-git-send-email-dgreid@chromium.org> (raw)
In-Reply-To: <1400350881-22008-1-git-send-email-dgreid@chromium.org>

The DDC bus uses this for it's supply, enable it so EDID can be read.
This eliminates I2C read timeouts on Venice2 and EDID can be verified
with i2cdump.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
---
 drivers/gpu/drm/tegra/hdmi.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
index 6928015..3d3cd7e 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -44,6 +44,7 @@ struct tegra_hdmi {
 
 	struct regulator *vdd;
 	struct regulator *pll;
+	struct regulator *hdmi_5v;
 
 	void __iomem *regs;
 	unsigned int irq;
@@ -1263,6 +1264,13 @@ static int tegra_hdmi_init(struct host1x_client *client)
 		return err;
 	}
 
+	err = regulator_enable(hdmi->hdmi_5v);
+	if (err < 0) {
+		dev_err(client->dev, "failed to enable HDMI 5V regulator: %d\n",
+			err);
+		return err;
+	}
+
 	hdmi->output.type = TEGRA_OUTPUT_HDMI;
 	hdmi->output.dev = client->dev;
 	hdmi->output.ops = &hdmi_ops;
@@ -1307,6 +1315,7 @@ static int tegra_hdmi_exit(struct host1x_client *client)
 	}
 
 	regulator_disable(hdmi->vdd);
+	regulator_disable(hdmi->hdmi_5v);
 
 	return 0;
 }
@@ -1411,6 +1420,12 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
 		return PTR_ERR(hdmi->pll);
 	}
 
+	hdmi->hdmi_5v = devm_regulator_get(&pdev->dev, "hdmi");
+	if (IS_ERR(hdmi->hdmi_5v)) {
+		dev_err(&pdev->dev, "failed to get HDMI 5V regulator\n");
+		return PTR_ERR(hdmi->hdmi_5v);
+	}
+
 	hdmi->output.dev = &pdev->dev;
 
 	err = tegra_output_probe(&hdmi->output);
-- 
1.8.1.3.605.g02339dd

  reply	other threads:[~2014-05-17 18:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-17 18:21 [PATCH 1/2] ARM: tegra: Mark Tegra124 HDMI compatible with Tegra114 Dylan Reid
2014-05-17 18:21 ` Dylan Reid [this message]
2014-05-17 21:34   ` [PATCH 2/2] drm/tegra: Enable HDMI_5V_CON regulator Thierry Reding
2014-05-17 21:33 ` [PATCH 1/2] ARM: tegra: Mark Tegra124 HDMI compatible with Tegra114 Thierry Reding
2014-05-18  2:28   ` Dylan Reid

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=1400350881-22008-2-git-send-email-dgreid@chromium.org \
    --to=dgreid@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.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