Skip to content

Commit 5feb272

Browse files
committed
media: imx355: Remove the duplication between width/height and x/y_out_size
The register settings x_out_size and y_out_size are just width-1 and height-1, so drop the values. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent a168fa0 commit 5feb272

1 file changed

Lines changed: 2 additions & 32 deletions

File tree

drivers/media/i2c/imx355.c

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ struct imx355_mode {
114114
u16 y_add_start;
115115
u16 x_add_end;
116116
u16 y_add_end;
117-
u16 x_out_size;
118-
u16 y_out_size;
119117
};
120118

121119
struct imx355_clk_params {
@@ -440,8 +438,6 @@ static const struct imx355_mode supported_modes[] = {
440438
.y_add_start = 0x0000,
441439
.x_add_end = 0x0ccf,
442440
.y_add_end = 0x099f,
443-
.x_out_size = 0x0cd0,
444-
.y_out_size = 0x09a0,
445441
},
446442
{
447443
.width = 3268,
@@ -458,8 +454,6 @@ static const struct imx355_mode supported_modes[] = {
458454
.y_add_start = 0x0008,
459455
.x_add_end = 0x0ccb,
460456
.y_add_end = 0x997,
461-
.x_out_size = 0x0cc4,
462-
.y_out_size = 0x0990,
463457
},
464458
{
465459
.width = 3264,
@@ -476,8 +470,6 @@ static const struct imx355_mode supported_modes[] = {
476470
.y_add_start = 0x0008,
477471
.x_add_end = 0x0cc7,
478472
.y_add_end = 0x0997,
479-
.x_out_size = 0x0cc0,
480-
.y_out_size = 0x0990,
481473
},
482474
{
483475
.width = 1940,
@@ -494,8 +486,6 @@ static const struct imx355_mode supported_modes[] = {
494486
.y_add_start = 0x02ac,
495487
.x_add_end = 0x0a33,
496488
.y_add_end = 0x06f3
497-
.x_out_size = 0x0794,
498-
.y_out_size = 0x0448,
499489
},
500490
{
501491
.width = 1936,
@@ -512,8 +502,6 @@ static const struct imx355_mode supported_modes[] = {
512502
.y_add_start = 0x02ac,
513503
.x_add_end = 0x0a2f,
514504
.y_add_end = 0x06f3,
515-
.x_out_size = 0x0790,
516-
.y_out_size = 0x0448,
517505
},
518506
{
519507
.width = 1924,
@@ -530,8 +518,6 @@ static const struct imx355_mode supported_modes[] = {
530518
.y_add_start = 0x02b4,
531519
.x_add_end = 0x0a2b,
532520
.y_add_end = 0x06eb,
533-
.x_out_size = 0x0784,
534-
.y_out_size = 0x0438,
535521
},
536522
{
537523
.width = 1920,
@@ -548,8 +534,6 @@ static const struct imx355_mode supported_modes[] = {
548534
.y_add_start = 0x02b4,
549535
.x_add_end = 0x0a27,
550536
.y_add_end = 0x06eb,
551-
.x_out_size = 0x0780,
552-
.y_out_size = 0x0438,
553537
},
554538
{
555539
.width = 1640,
@@ -566,8 +550,6 @@ static const struct imx355_mode supported_modes[] = {
566550
.y_add_start = 0x0000,
567551
.x_add_end = 0x0ccf,
568552
.y_add_end = 0x099f,
569-
.x_out_size = 0x0668,
570-
.y_out_size = 0x04d0,
571553
},
572554
{
573555
.width = 1640,
@@ -584,8 +566,6 @@ static const struct imx355_mode supported_modes[] = {
584566
.y_add_start = 0x0130,
585567
.x_add_end = 0x0ccf,
586568
.y_add_end = 0x0863,
587-
.x_out_size = 0x0668,
588-
.y_out_size = 0x039a,
589569
},
590570
{
591571
.width = 1300,
@@ -602,8 +582,6 @@ static const struct imx355_mode supported_modes[] = {
602582
.y_add_start = 0x01f0,
603583
.x_add_end = 0x0b7f,
604584
.y_add_end = 0x07af,
605-
.x_out_size = 0x0514,
606-
.y_out_size = 0x02e0,
607585
},
608586
{
609587
.width = 1296,
@@ -620,8 +598,6 @@ static const struct imx355_mode supported_modes[] = {
620598
.y_add_start = 0x01f0,
621599
.x_add_end = 0x0b77,
622600
.y_add_end = 0x07af,
623-
.x_out_size = 0x0510,
624-
.y_out_size = 0x02e0,
625601
},
626602
{
627603
.width = 1284,
@@ -638,8 +614,6 @@ static const struct imx355_mode supported_modes[] = {
638614
.y_add_start = 0x0200,
639615
.x_add_end = 0x0b6f,
640616
.y_add_end = 0x079f,
641-
.x_out_size = 0x0504,
642-
.y_out_size = 0x02d0,
643617
},
644618
{
645619
.width = 1280,
@@ -656,8 +630,6 @@ static const struct imx355_mode supported_modes[] = {
656630
.y_add_start = 0x0200,
657631
.x_add_end = 0x0b67,
658632
.y_add_end = 0x079f,
659-
.x_out_size = 0x0500,
660-
.y_out_size = 0x02d0,
661633
},
662634
{
663635
.width = 820,
@@ -674,8 +646,6 @@ static const struct imx355_mode supported_modes[] = {
674646
.y_add_start = 0x0000,
675647
.x_add_end = 0x0ccf,
676648
.y_add_end = 0x099f,
677-
.x_out_size = 0x0334,
678-
.y_out_size = 0x0268,
679649
},
680650
};
681651

@@ -1044,11 +1014,11 @@ static int imx355_start_streaming(struct imx355 *imx355)
10441014
if (ret)
10451015
return ret;
10461016
ret = imx355_write_reg(imx355, IMX355_REG_X_OUT_SIZE, 2,
1047-
mode->x_out_size);
1017+
mode->width - 1);
10481018
if (ret)
10491019
return ret;
10501020
ret = imx355_write_reg(imx355, IMX355_REG_Y_OUT_SIZE, 2,
1051-
mode->y_out_size);
1021+
mode->height - 1);
10521022
if (ret)
10531023
return ret;
10541024

0 commit comments

Comments
 (0)