Skip to content

Commit 4a039e7

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 cfe137c commit 4a039e7

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
@@ -545,8 +545,6 @@ static const struct imx477_reg mode_common_regs[] = {
545545
{0xb21f, 0x04},
546546
{0xb35c, 0x00},
547547
{0xb35e, 0x08},
548-
{0x0112, 0x0c},
549-
{0x0113, 0x0c},
550548
{0x0114, 0x01},
551549
{0x0350, 0x00},
552550
{0xbcf1, 0x02},
@@ -555,8 +553,8 @@ static const struct imx477_reg mode_common_regs[] = {
555553

556554
/* 12 mpix 10fps */
557555
static const struct imx477_reg mode_4056x3040_regs[] = {
558-
{0x0342, 0x5d},
559-
{0x0343, 0xc0},
556+
{0x0112, 0x0c},
557+
{0x0113, 0x0c},
560558
{0x0344, 0x00},
561559
{0x0345, 0x00},
562560
{0x0346, 0x00},
@@ -665,8 +663,8 @@ static const struct imx477_reg mode_4056x3040_regs[] = {
665663

666664
/* 2x2 binned. 40fps */
667665
static const struct imx477_reg mode_2028x1520_regs[] = {
668-
{0x0342, 0x31},
669-
{0x0343, 0xc4},
666+
{0x0112, 0x0c},
667+
{0x0113, 0x0c},
670668
{0x0344, 0x00},
671669
{0x0345, 0x00},
672670
{0x0346, 0x00},
@@ -764,8 +762,8 @@ static const struct imx477_reg mode_2028x1520_regs[] = {
764762

765763
/* 1080p cropped mode */
766764
static const struct imx477_reg mode_2028x1080_regs[] = {
767-
{0x0342, 0x31},
768-
{0x0343, 0xc4},
765+
{0x0112, 0x0c},
766+
{0x0113, 0x0c},
769767
{0x0344, 0x00},
770768
{0x0345, 0x00},
771769
{0x0346, 0x01},
@@ -863,6 +861,8 @@ static const struct imx477_reg mode_2028x1080_regs[] = {
863861

864862
/* 4x4 binned. 120fps */
865863
static const struct imx477_reg mode_1332x990_regs[] = {
864+
{0x0112, 0x0a},
865+
{0x0113, 0x0a},
866866
{0x420b, 0x01},
867867
{0x990c, 0x00},
868868
{0x990d, 0x08},
@@ -875,13 +875,6 @@ static const struct imx477_reg mode_1332x990_regs[] = {
875875
{0x9a4b, 0x06},
876876
{0x9a4c, 0x06},
877877
{0x9a4d, 0x06},
878-
{0x0112, 0x0a},
879-
{0x0113, 0x0a},
880-
{0x0114, 0x01},
881-
{0x0342, 0x1a},
882-
{0x0343, 0x08},
883-
{0x0340, 0x04},
884-
{0x0341, 0x1a},
885878
{0x0344, 0x00},
886879
{0x0345, 0x00},
887880
{0x0346, 0x02},

0 commit comments

Comments
 (0)