media: staging: max96712: Document the DEBUG_EXTRA register
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 2 Oct 2024 09:23:30 +0000 (11:23 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 16 Oct 2024 07:32:38 +0000 (09:32 +0200)
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>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/max96712/max96712.c

index 46a6bb018fe2455b6f17fdc1b62b09296e7992a0..0ee66022026e831b526ba50209035b21821e8e46 100644 (file)
 #include <media/v4l2-fwnode.h>
 #include <media/v4l2-subdev.h>
 
+#define DEBUG_EXTRA_REG                        0x09
+#define DEBUG_EXTRA_PCLK_25MHZ         0x00
+#define DEBUG_EXTRA_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_EXTRA_PCLK_75MHZ);
 
        /* Configure Video Timing Generator for 1920x1080 @ 30 fps. */
        max96712_write_bulk_value(priv, 0x1052, 0, 3);