Skip to content

Commit 03fc72e

Browse files
committed
media: i2c: imx477: Clean up duplicated registers
Registers 0x0342 / 0x0343 are set via IMX477_REG_LINE_LENGTH as V4L2_CID_HBLANK, so shouldn't be in the register tables. Registers 0x0340 / 0x0341 are set via IMX477_REG_FRAME_LENGTH as V4L2_CID_VBLANK so shouldn't be in the register tables. Registers 0x0112 and 0x0113 set the bit depth, so should be per mode rather than in the common table and overridden for the 10bit mode(s). Signed-off-by: Dave Stevenson <[email protected]>
1 parent 9c09b75 commit 03fc72e

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

drivers/media/i2c/imx477.c

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,6 @@ static const struct imx477_reg mode_common_regs[] = {
548548
{0xb21f, 0x04},
549549
{0xb35c, 0x00},
550550
{0xb35e, 0x08},
551-
{0x0112, 0x0c},
552-
{0x0113, 0x0c},
553551
{0x0114, 0x01},
554552
{0x0350, 0x00},
555553
{0xbcf1, 0x02},
@@ -558,8 +556,8 @@ static const struct imx477_reg mode_common_regs[] = {
558556

559557
/* 12 mpix 10fps */
560558
static const struct imx477_reg mode_4056x3040_regs[] = {
561-
{0x0342, 0x5d},
562-
{0x0343, 0xc0},
559+
{0x0112, 0x0c},
560+
{0x0113, 0x0c},
563561
{0x0344, 0x00},
564562
{0x0345, 0x00},
565563
{0x0346, 0x00},
@@ -668,8 +666,8 @@ static const struct imx477_reg mode_4056x3040_regs[] = {
668666

669667
/* 2x2 binned. 40fps */
670668
static const struct imx477_reg mode_2028x1520_regs[] = {
671-
{0x0342, 0x31},
672-
{0x0343, 0xc4},
669+
{0x0112, 0x0c},
670+
{0x0113, 0x0c},
673671
{0x0344, 0x00},
674672
{0x0345, 0x00},
675673
{0x0346, 0x00},
@@ -767,8 +765,8 @@ static const struct imx477_reg mode_2028x1520_regs[] = {
767765

768766
/* 1080p cropped mode */
769767
static const struct imx477_reg mode_2028x1080_regs[] = {
770-
{0x0342, 0x31},
771-
{0x0343, 0xc4},
768+
{0x0112, 0x0c},
769+
{0x0113, 0x0c},
772770
{0x0344, 0x00},
773771
{0x0345, 0x00},
774772
{0x0346, 0x01},
@@ -866,6 +864,8 @@ static const struct imx477_reg mode_2028x1080_regs[] = {
866864

867865
/* 4x4 binned. 120fps */
868866
static const struct imx477_reg mode_1332x990_regs[] = {
867+
{0x0112, 0x0a},
868+
{0x0113, 0x0a},
869869
{0x420b, 0x01},
870870
{0x990c, 0x00},
871871
{0x990d, 0x08},
@@ -878,13 +878,6 @@ static const struct imx477_reg mode_1332x990_regs[] = {
878878
{0x9a4b, 0x06},
879879
{0x9a4c, 0x06},
880880
{0x9a4d, 0x06},
881-
{0x0112, 0x0a},
882-
{0x0113, 0x0a},
883-
{0x0114, 0x01},
884-
{0x0342, 0x1a},
885-
{0x0343, 0x08},
886-
{0x0340, 0x04},
887-
{0x0341, 0x1a},
888881
{0x0344, 0x00},
889882
{0x0345, 0x00},
890883
{0x0346, 0x02},

0 commit comments

Comments
 (0)