diff mbox

drm: tda998x: Add support for CEC address 0x35

Message ID 1400545223-26929-1-git-send-email-broonie@kernel.org
State New
Headers show

Commit Message

Mark Brown May 20, 2014, 12:20 a.m. UTC
From: Liviu Dudau <Liviu.Dudau@arm.com>

Currently the tda998x driver only attempts to instantiate the CEC at I2C
address 0x34, meaning that if the CEC is instead at 0x35 (for example,
due to a conflict with another device) we will not be able to use it.
Attempt to handle some such situations by trying to instantiate the CEC
at 0x35 if we fail at 0x34.

[Wrote commit message -- broonie]

Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
---

I'm aware this isn't wonderful and is tied in with the general questions
about how to enumerate decomposed video devices, I'm partly looking for
feedback on the best way forwards here.

 drivers/gpu/drm/i2c/tda998x_drv.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 240c331405b9..a3368e7d12c4 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -1246,6 +1246,8 @@  tda998x_encoder_init(struct i2c_client *client,
 	priv->current_page = 0xff;
 	priv->hdmi = client;
 	priv->cec = i2c_new_dummy(client->adapter, 0x34);
+	if (!priv->cec)
+		priv->cec = i2c_new_dummy(client->adapter, 0x35);
 	if (!priv->cec) {
 		kfree(priv);
 		return -ENODEV;