]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: i2c: imx334: add support for additional test patterns
authorShravan Chippa <shravan.chippa@microchip.com>
Tue, 24 Jun 2025 06:54:38 +0000 (12:24 +0530)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 25 Aug 2025 13:40:36 +0000 (15:40 +0200)
Added support for three additional test patterns in the
IMX334 driver: Black and Grey Bars, Black Color, and White Color.

Signed-off-by: Shravan Chippa <shravan.chippa@microchip.com>
[Sakari Ailus: Fix hexadecimal value.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/i2c/imx334.c

index 7a9b14d102c99b2b9998b20e9b41ae44725728be..1cf0241aae77407baa52e8cf126cd6540ea17825 100644 (file)
 #define IMX334_REG_TP                  CCI_REG8(0x329e)
 #define IMX334_TP_COLOR_HBARS          0xa
 #define IMX334_TP_COLOR_VBARS          0xb
+#define IMX334_TP_BLACK                        0x0
+#define IMX334_TP_WHITE                        0x1
+#define IMX334_TP_BLACK_GREY           0xc
 
 #define IMX334_TPG_EN_DOUT             CCI_REG8(0x329c)
 #define IMX334_TP_ENABLE               0x1
@@ -398,12 +401,18 @@ static const char * const imx334_test_pattern_menu[] = {
        "Disabled",
        "Vertical Color Bars",
        "Horizontal Color Bars",
+       "Black and Grey Bars",
+       "Black Color",
+       "White Color",
 };
 
 static const int imx334_test_pattern_val[] = {
        IMX334_TP_DISABLE,
        IMX334_TP_COLOR_HBARS,
        IMX334_TP_COLOR_VBARS,
+       IMX334_TP_BLACK_GREY,
+       IMX334_TP_BLACK,
+       IMX334_TP_WHITE,
 };
 
 static const struct cci_reg_sequence raw10_framefmt_regs[] = {