From: Mark Brown Subject: [PATCH] drm: tda998x: Add support for CEC address 0x35 Date: Tue, 20 May 2014 01:20:23 +0100 Message-ID: <1400545223-26929-1-git-send-email-broonie@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mezzanine.sirena.org.uk (mezzanine.sirena.org.uk [106.187.55.193]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A62C8938C for ; Mon, 19 May 2014 18:14:15 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Russell King , David Airlie Cc: Jon Medhurst , linaro-kernel@lists.linaro.org, dri-devel@lists.freedesktop.org, Mark Brown List-Id: dri-devel@lists.freedesktop.org From: Liviu Dudau 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 Signed-off-by: Jon Medhurst Signed-off-by: Mark Brown --- 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