dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+kernel@armlinux.org.uk>
To: David Airlie <airlied@linux.ie>, Hans Verkuil <hverkuil@xs4all.nl>
Cc: dri-devel@lists.freedesktop.org
Subject: [PATCH 2/6] drm/i2c: tda998x: move CEC device initialisation later
Date: Tue, 28 Nov 2017 23:17:44 +0000	[thread overview]
Message-ID: <E1eJp8K-0003FX-M4@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <20171128231712.GB8356@n2100.armlinux.org.uk>

We no longer use the CEC client to access the CEC part itself, so we can
move this later in the initialisation sequence.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/gpu/drm/i2c/tda998x_drv.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 7f4dbca7f7f4..4aeac2127974 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -1490,9 +1490,6 @@ static int tda998x_create(struct i2c_client *client, struct tda998x_priv *priv)
 	priv->cec_addr = 0x34 + (client->addr & 0x03);
 	priv->current_page = 0xff;
 	priv->hdmi = client;
-	priv->cec = i2c_new_dummy(client->adapter, priv->cec_addr);
-	if (!priv->cec)
-		return -ENODEV;
 
 	/* wake up the device: */
 	cec_write(priv, REG_CEC_ENAMODS,
@@ -1546,6 +1543,10 @@ static int tda998x_create(struct i2c_client *client, struct tda998x_priv *priv)
 			CEC_FRO_IM_CLK_CTRL_GHOST_DIS | CEC_FRO_IM_CLK_CTRL_IMCLK_SEL);
 
 	/* initialize the optional IRQ */
+	priv->cec = i2c_new_dummy(client->adapter, priv->cec_addr);
+	if (!priv->cec)
+		return -ENODEV;
+
 	if (client->irq) {
 		unsigned long irq_flags;
 
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-11-28 23:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 23:17 [PATCH 0/6] TDA998x CEC support Russell King - ARM Linux
2017-11-28 23:17 ` [PATCH 1/6] drm/i2c: tda998x: move mutex/waitqueue/timer/work init early Russell King
2017-11-28 23:17 ` Russell King [this message]
2017-11-28 23:17 ` [PATCH 3/6] drm/i2c: tda998x: fix error cleanup paths Russell King
2017-11-28 23:17 ` [PATCH 4/6] drm/i2c: tda998x: always disable and clear interrupts at probe Russell King
2017-11-28 23:18 ` [PATCH 5/6] drm/i2c: tda9950: add CEC driver Russell King
2017-11-28 23:18 ` [PATCH 6/6] drm/i2c: tda998x: add CEC support Russell King
2017-11-29  7:41 ` [PATCH 0/6] TDA998x " Hans Verkuil
2017-11-29  7:57   ` Hans Verkuil
2017-11-29 10:02     ` Daniel Vetter
2017-11-29 10:05       ` Daniel Stone
2017-11-29  9:11   ` Russell King - ARM Linux
2017-11-29 10:23     ` Russell King - ARM Linux
2017-11-29 12:43     ` Hans Verkuil
2017-11-29 13:45       ` Russell King - ARM Linux
2017-11-29 14:40         ` Hans Verkuil
     [not found] ` <20171128231712.GB8356-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-11-29 10:30   ` [PATCH 7/6] dt-bindings: tda998x: add the calibration gpio Russell King
     [not found]     ` <E1eJzdE-0000PJ-3V-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org>
2017-12-01  2:08       ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1eJp8K-0003FX-M4@rmk-PC.armlinux.org.uk \
    --to=rmk+kernel@armlinux.org.uk \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hverkuil@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox