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: 30410 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5CF9C20671 for ; Tue, 20 May 2014 09:03:33 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id m20sf472819qcx.1 for ; Tue, 20 May 2014 02:03:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:subject:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=UsooUNavO997MprwCCuW64RccCN3HPl6XKE0pLJjH/Y=; b=R2u6kZ6gcXTQ49z9JDGWSRin4HfZwx5JwBqBHhm/822GuZX97VIM8aQR6mBP+GZqpS +nIqwafFFUIOU1KKO7Lb9EUuPMPc0OMdBqO/ZcQ7lHNrSdd0fgdg5F26hOpR9Fka/R6L dpOcgPt5rqlqrvvmQpocH8PVQpzFPOv+KzJwF1HI/oHjhXJYFzcmhw7Ohjuxt2NTlIaj 5aXTErcBfXQoYUPxthevIgz01Ea9Ou8uc6jJGM0Pt2xMrre/OSkNjp8o4Btvo4hLef18 OSYYwxBXXILsibBnAao17Pid/ycsUMJoQYAwbpo3605BH6jTBUeTpy6Yi5i9jOXRDlvo exWA== X-Gm-Message-State: ALoCoQm4ximyZJlKGQAxKO7ELMZHkT5gnXrah16W4MjCDbsHdgl66ytz098iZ5O1GU+VPhkIqjvb X-Received: by 10.58.165.33 with SMTP id yv1mr1049210veb.30.1400576613229; Tue, 20 May 2014 02:03:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.46 with SMTP id k43ls159803qgk.58.gmail; Tue, 20 May 2014 02:03:33 -0700 (PDT) X-Received: by 10.58.195.130 with SMTP id ie2mr1854659vec.3.1400576613101; Tue, 20 May 2014 02:03:33 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id sk5si285647vcb.107.2014.05.20.02.03.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 May 2014 02:03:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if17so205877vcb.8 for ; Tue, 20 May 2014 02:03:33 -0700 (PDT) X-Received: by 10.221.4.66 with SMTP id ob2mr2606370vcb.28.1400576612986; Tue, 20 May 2014 02:03:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp13478vcb; Tue, 20 May 2014 02:03:32 -0700 (PDT) X-Received: by 10.66.150.228 with SMTP id ul4mr49741327pab.16.1400576612195; Tue, 20 May 2014 02:03:32 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id tu2si857298pbc.173.2014.05.20.02.03.31 for ; Tue, 20 May 2014 02:03:32 -0700 (PDT) Received-SPF: none (google.com: dri-devel-bounces@lists.freedesktop.org does not designate permitted sender hosts) client-ip=131.252.210.177; 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.2 (2011-06-06) on mezzanine.sirena.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 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: 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: broonie@kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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;