[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260124194827.GA3395783@ragnatech.se>
Date: Sat, 24 Jan 2026 20:48:27 +0100
From: Niklas Söderlund <niklas.soderlund@...natech.se>
To: Tomi Valkeinen <tomi.valkeinen+renesas@...asonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
linux-media@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] media: rcar-csi2: Improve FLD_FLD_EN macros
Hi Tomi,
Thanks for your work.
On 2026-01-15 12:06:58 +0200, Tomi Valkeinen wrote:
> Instead of having four macros for FLD_FLD_EN for different channels,
> have just one FLD_FLD_EN(ch).
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@...asonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>
> ---
> drivers/media/platform/renesas/rcar-csi2.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/media/platform/renesas/rcar-csi2.c b/drivers/media/platform/renesas/rcar-csi2.c
> index d1b31ab8b8c4..3cd35adb6803 100644
> --- a/drivers/media/platform/renesas/rcar-csi2.c
> +++ b/drivers/media/platform/renesas/rcar-csi2.c
> @@ -71,10 +71,7 @@ struct rcar_csi2;
> #define FLD_REG 0x1c
> #define FLD_FLD_NUM(n) (((n) & 0xff) << 16)
> #define FLD_DET_SEL(n) (((n) & 0x3) << 4)
> -#define FLD_FLD_EN4 BIT(3)
> -#define FLD_FLD_EN3 BIT(2)
> -#define FLD_FLD_EN2 BIT(1)
> -#define FLD_FLD_EN BIT(0)
> +#define FLD_FLD_EN(ch) BIT(ch)
>
> /* Automatic Standby Control */
> #define ASTBY_REG 0x20
> @@ -1082,8 +1079,8 @@ static int rcsi2_start_receiver_gen3(struct rcar_csi2 *priv,
> }
>
> if (fmt->field == V4L2_FIELD_ALTERNATE)
> - fld = FLD_DET_SEL(1) | FLD_FLD_EN4 | FLD_FLD_EN3 | FLD_FLD_EN2
> - | FLD_FLD_EN;
> + fld = FLD_DET_SEL(1) | FLD_FLD_EN(3) | FLD_FLD_EN(2) |
> + FLD_FLD_EN(1) | FLD_FLD_EN(0);
>
> /*
> * Get the number of active data lanes inspecting the remote mbus
>
> --
> 2.43.0
>
--
Kind Regards,
Niklas Söderlund
Powered by blists - more mailing lists