All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Love <brad@nextdimension.cc>
To: linux-media@vger.kernel.org
Cc: Brad Love <brad@nextdimension.cc>
Subject: [PATCH v3 14/14] cx25840: Register labeling, chip specific correction
Date: Thu, 14 Nov 2019 14:04:08 -0600	[thread overview]
Message-ID: <20191114200408.28883-15-brad@nextdimension.cc> (raw)
In-Reply-To: <20191114200408.28883-1-brad@nextdimension.cc>

Remove vbi_regs_offset from a group of registers that are 888 specific,
include those registers names. Sources used for reference are 885 and 888
datasheets.

Add labels to some undocumented registers.

Signed-off-by: Brad Love <brad@nextdimension.cc>
---
Since v2:
- rebase

 drivers/media/i2c/cx25840/cx25840-core.c | 40 ++++++++++++------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/media/i2c/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c
index 0de946fe2109..e2e935f78986 100644
--- a/drivers/media/i2c/cx25840/cx25840-core.c
+++ b/drivers/media/i2c/cx25840/cx25840-core.c
@@ -997,14 +997,14 @@ static void cx23885_initialize(struct i2c_client *client)
 	 */
 	cx25840_write4(client, 0x404, 0x0010253e);
 
-	/* CC on  - Undocumented Register */
+	/* CC on  - VBI_LINE_CTRL3, FLD_VBI_MD_LINE12 */
 	cx25840_write(client, state->vbi_regs_offset + 0x42f, 0x66);
 
 	/* HVR-1250 / HVR1850 DIF related */
 	/* Power everything up */
 	cx25840_write4(client, 0x130, 0x0);
 
-	/* Undocumented */
+	/* SRC_COMB_CFG */
 	if (is_cx23888(state))
 		cx25840_write4(client, 0x454, 0x6628021F);
 	else
@@ -1486,24 +1486,24 @@ static int set_input(struct i2c_client *client,
 			cx25840_write4(client, 0x410, 0xffff0dbf);
 			cx25840_write4(client, 0x414, 0x00137d03);
 
-			cx25840_write4(client, state->vbi_regs_offset + 0x42c,
-				       0x42600000);
-			cx25840_write4(client, state->vbi_regs_offset + 0x430,
-				       0x0000039b);
-			cx25840_write4(client, state->vbi_regs_offset + 0x438,
-				       0x00000000);
-
-			cx25840_write4(client, state->vbi_regs_offset + 0x440,
-				       0xF8E3E824);
-			cx25840_write4(client, state->vbi_regs_offset + 0x444,
-				       0x401040dc);
-			cx25840_write4(client, state->vbi_regs_offset + 0x448,
-				       0xcd3f02a0);
-			cx25840_write4(client, state->vbi_regs_offset + 0x44c,
-				       0x161f1000);
-			cx25840_write4(client, state->vbi_regs_offset + 0x450,
-				       0x00000802);
-
+			if (is_cx23888(state)) {
+				/* 888 MISC_TIM_CTRL */
+				cx25840_write4(client, 0x42c, 0x42600000);
+				/* 888 FIELD_COUNT */
+				cx25840_write4(client, 0x430, 0x0000039b);
+				/* 888 VSCALE_CTRL */
+				cx25840_write4(client, 0x438, 0x00000000);
+				/* 888 DFE_CTRL1 */
+				cx25840_write4(client, 0x440, 0xF8E3E824);
+				/* 888 DFE_CTRL2 */
+				cx25840_write4(client, 0x444, 0x401040dc);
+				/* 888 DFE_CTRL3 */
+				cx25840_write4(client, 0x448, 0xcd3f02a0);
+				/* 888 PLL_CTRL */
+				cx25840_write4(client, 0x44c, 0x161f1000);
+				/* 888 HTL_CTRL */
+				cx25840_write4(client, 0x450, 0x00000802);
+			}
 			cx25840_write4(client, 0x91c, 0x01000000);
 			cx25840_write4(client, 0x8e0, 0x03063870);
 			cx25840_write4(client, 0x8d4, 0x7FFF0024);
-- 
2.23.0


      parent reply	other threads:[~2019-11-14 20:04 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14 20:03 [PATCH v3 00/14] si2157: Analog tuning and optimizations Brad Love
2019-11-14 20:03 ` [PATCH v3 01/14] si2157: Enable tuner status flags Brad Love
2019-11-14 20:03 ` [PATCH v3 02/14] si2157: Check error status bit on cmd execute Brad Love
2019-11-15 11:09   ` Antti Palosaari
2019-11-14 20:03 ` [PATCH v3 03/14] si2157: Better check for running tuner in init Brad Love
2019-11-15 11:16   ` Antti Palosaari
2019-11-14 20:03 ` [PATCH v3 04/14] si2157: Add analog tuning related functions Brad Love
2019-11-24  5:09   ` Antti Palosaari
2019-12-19 13:13     ` Mauro Carvalho Chehab
2019-12-20 15:32       ` Antti Palosaari
2020-02-01 21:20       ` Brad Love
2019-11-14 20:03 ` [PATCH v3 05/14] si2157: Briefly wait for tuning operation to complete Brad Love
2019-11-15 11:31   ` Antti Palosaari
2019-11-14 20:04 ` [PATCH v3 06/14] si2157: module debug option to wait on signal lock Brad Love
2019-11-14 20:04 ` [PATCH v3 07/14] cx23885: Add analog frontend to Hauppauge QuadHD Brad Love
2019-11-14 20:04 ` [PATCH v3 08/14] cx23885: Add analog frontend to 1265_K4 Brad Love
2019-11-14 20:04 ` [PATCH v3 09/14] cx23885: Add analog frontend to HVR5525 Brad Love
2019-11-14 20:04 ` [PATCH v3 10/14] cx23885: Add i2c device analog tuner support Brad Love
2019-11-14 20:04 ` [PATCH v3 11/14] cx231xx: " Brad Love
2019-11-17  6:53   ` kbuild test robot
2019-11-17  6:53   ` [PATCH] cx231xx: fix semicolon.cocci warnings kbuild test robot
2019-11-14 20:04 ` [PATCH v3 12/14] si2157: add on-demand rf strength func Brad Love
2019-11-15 20:23   ` Antti Palosaari
2019-11-14 20:04 ` [PATCH v3 13/14] lgdt3306a: Add CNR v5 stat Brad Love
2019-11-14 20:04 ` Brad Love [this message]

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=20191114200408.28883-15-brad@nextdimension.cc \
    --to=brad@nextdimension.cc \
    --cc=linux-media@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.