diff mbox series

[v3,4/5] media: staging: max96712: Document the DEBUG_EXTRA register

Message ID 20240829165051.2498867-5-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State New
Headers show
Series media: staging: max96712: Add support for MAX96724 | expand

Commit Message

Niklas Söderlund Aug. 29, 2024, 4:50 p.m. UTC
The DEBUG_EXTRA register is not part of soon to be added MAX96724
device. To make it easier to understand the differences when reading the
code prepare for the addition by creating named defines for the
register.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
* Changes since v2
- New in v3.
---
 drivers/staging/media/max96712/max96712.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Geert Uytterhoeven Aug. 30, 2024, 8:15 a.m. UTC | #1
Hi Niklas,

On Thu, Aug 29, 2024 at 6:52 PM Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
> The DEBUG_EXTRA register is not part of soon to be added MAX96724
> device. To make it easier to understand the differences when reading the
> code prepare for the addition by creating named defines for the
> register.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> * Changes since v2
> - New in v3.

Thanks for your patch!

> --- a/drivers/staging/media/max96712/max96712.c
> +++ b/drivers/staging/media/max96712/max96712.c
> @@ -16,6 +16,10 @@
>  #include <media/v4l2-fwnode.h>
>  #include <media/v4l2-subdev.h>
>
> +#define DEBUG_EXTRA_REG                        0x09
> +#define DEBUG_EXTRE_PCLK_25MHZ         0x00
> +#define DEBUG_EXTRE_PCLK_75MHZ         0x01

s/EXTRE/EXTRA/

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/drivers/staging/media/max96712/max96712.c b/drivers/staging/media/max96712/max96712.c
index 46a6bb018fe2..5c15346c05dd 100644
--- a/drivers/staging/media/max96712/max96712.c
+++ b/drivers/staging/media/max96712/max96712.c
@@ -16,6 +16,10 @@ 
 #include <media/v4l2-fwnode.h>
 #include <media/v4l2-subdev.h>
 
+#define DEBUG_EXTRA_REG			0x09
+#define DEBUG_EXTRE_PCLK_25MHZ		0x00
+#define DEBUG_EXTRE_PCLK_75MHZ		0x01
+
 enum max96712_pattern {
 	MAX96712_PATTERN_CHECKERBOARD = 0,
 	MAX96712_PATTERN_GRADIENT,
@@ -170,7 +174,7 @@  static void max96712_pattern_enable(struct max96712_priv *priv, bool enable)
 	}
 
 	/* PCLK 75MHz. */
-	max96712_write(priv, 0x0009, 0x01);
+	max96712_write(priv, DEBUG_EXTRA_REG, DEBUG_EXTRE_PCLK_75MHZ);
 
 	/* Configure Video Timing Generator for 1920x1080 @ 30 fps. */
 	max96712_write_bulk_value(priv, 0x1052, 0, 3);