From patchwork Tue May 20 00:20:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 4208131 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C6F5FBEEAB for ; Tue, 20 May 2014 09:03:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC3EC201BF for ; Tue, 20 May 2014 09:03:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id EF82B20364 for ; Tue, 20 May 2014 09:03:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B82A56E6CA; Tue, 20 May 2014 02:03:28 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 3211 seconds by postgrey-1.34 at gabe; Mon, 19 May 2014 18:14:15 PDT 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) Received: from cpc11-sgyl31-2-0-cust672.sgyl.cable.virginm.net ([94.175.94.161] helo=debutante.sirena.org.uk) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WmXnD-0002li-Cc; Tue, 20 May 2014 00:20:35 +0000 Received: from broonie by debutante.sirena.org.uk with local (Exim 4.82) (envelope-from ) id 1WmXnA-00071H-Ft; Tue, 20 May 2014 01:20:28 +0100 From: Mark Brown To: Russell King , David Airlie Date: Tue, 20 May 2014 01:20:23 +0100 Message-Id: <1400545223-26929-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.0.0.rc2 X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Subject: [PATCH] drm: tda998x: Add support for CEC address 0x35 X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) X-Mailman-Approved-At: Tue, 20 May 2014 02:03:27 -0700 Cc: Jon Medhurst , linaro-kernel@lists.linaro.org, dri-devel@lists.freedesktop.org, Mark Brown X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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;