diff mbox series

media: rcar-csi2: fix R8A77980 support

Message ID 20210924090244.3459-1-nikita.yoush@cogentembedded.com (mailing list archive)
State New
Delegated to: Kieran Bingham
Headers show
Series media: rcar-csi2: fix R8A77980 support | expand

Commit Message

Nikita Yushchenko Sept. 24, 2021, 9:02 a.m. UTC
From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>

Add missing initialization of num_channels field.

Fixes: 3ba37c2bcb0c ("media: rcar-csi2: add R8A77980 support")
Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
 drivers/media/platform/rcar-vin/rcar-csi2.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Niklas Söderlund Sept. 24, 2021, 9:43 a.m. UTC | #1
Hello Nikita and Vladimir,

Thanks for your work.

On 2021-09-24 12:02:45 +0300, Nikita Yushchenko wrote:
> From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> 
> Add missing initialization of num_channels field.

The num_channels field is intentionally left out here, and therefore 
initialized to 0.

The reason for this is that tho even if the VCDT and VCDT2 register 
exists on V3H the datasheet states that the value written to them should 
always be 0. As the only usage of num_channels is to create the content 
to write to these registers in rcsi2_start_receiver() setting it to 0 
does the correct thing for V3H.

Nacked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> 
> Fixes: 3ba37c2bcb0c ("media: rcar-csi2: add R8A77980 support")
> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
> ---
>  drivers/media/platform/rcar-vin/rcar-csi2.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c b/drivers/media/platform/rcar-vin/rcar-csi2.c
> index e28eff039688..f4d3c6dead30 100644
> --- a/drivers/media/platform/rcar-vin/rcar-csi2.c
> +++ b/drivers/media/platform/rcar-vin/rcar-csi2.c
> @@ -1146,6 +1146,7 @@ static const struct rcar_csi2_info rcar_csi2_info_r8a77980 = {
>  	.init_phtw = rcsi2_init_phtw_h3_v3h_m3n,
>  	.hsfreqrange = hsfreqrange_h3_v3h_m3n,
>  	.csi0clkfreqrange = 0x20,
> +	.num_channels = 4,
>  	.clear_ulps = true,
>  };
>  
> -- 
> 2.30.2
>
diff mbox series

Patch

diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c b/drivers/media/platform/rcar-vin/rcar-csi2.c
index e28eff039688..f4d3c6dead30 100644
--- a/drivers/media/platform/rcar-vin/rcar-csi2.c
+++ b/drivers/media/platform/rcar-vin/rcar-csi2.c
@@ -1146,6 +1146,7 @@  static const struct rcar_csi2_info rcar_csi2_info_r8a77980 = {
 	.init_phtw = rcsi2_init_phtw_h3_v3h_m3n,
 	.hsfreqrange = hsfreqrange_h3_v3h_m3n,
 	.csi0clkfreqrange = 0x20,
+	.num_channels = 4,
 	.clear_ulps = true,
 };