[PATCH] drm: tda998x: Add support for CEC address 0x35

Mark Brown broonie at kernel.org
Mon May 19 17:20:23 PDT 2014


From: Liviu Dudau <Liviu.Dudau at 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 at arm.com>
Signed-off-by: Jon Medhurst <tixy at linaro.org>
Signed-off-by: Mark Brown <broonie at 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 --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;
-- 
2.0.0.rc2



More information about the dri-devel mailing list