summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2019-01-18 03:52:01 -0500
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-02-18 11:27:18 -0500
commit9f6d7bacc726f4809170291072589dd9e62d4a3c (patch)
treea5f1deda7bb275261ee8ca730af2d329920f367e /drivers/media/i2c
parent16597c2744f79aaf5f9ec0107be477639985bf44 (diff)
downloadlinux-9f6d7bacc726f4809170291072589dd9e62d4a3c.tar.gz
linux-9f6d7bacc726f4809170291072589dd9e62d4a3c.tar.bz2
linux-9f6d7bacc726f4809170291072589dd9e62d4a3c.zip
media: ov5640: Move test_pattern_menu before ov5640_set_ctrl_test_pattern
The OV5640 has many options for generating test patterns. Unfortunately there is only one V4L2 control for it. Thus the driver would need to list some or all combinations. Move the test_pattern_menu list before the ov5640_set_ctrl_test_pattern function that programs the hardware. This would allow us to add a matching list of values to program into the hardware, while keeping the two lists together for ease of maintenance. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/ov5640.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 5a909abd0a2d..8e4e8fa3685f 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -2441,6 +2441,11 @@ static int ov5640_set_ctrl_gain(struct ov5640_dev *sensor, bool auto_gain)
return ret;
}
+static const char * const test_pattern_menu[] = {
+ "Disabled",
+ "Color bars",
+};
+
static int ov5640_set_ctrl_test_pattern(struct ov5640_dev *sensor, int value)
{
return ov5640_mod_reg(sensor, OV5640_REG_PRE_ISP_TEST_SET1,
@@ -2585,11 +2590,6 @@ static const struct v4l2_ctrl_ops ov5640_ctrl_ops = {
.s_ctrl = ov5640_s_ctrl,
};
-static const char * const test_pattern_menu[] = {
- "Disabled",
- "Color bars",
-};
-
static int ov5640_init_controls(struct ov5640_dev *sensor)
{
const struct v4l2_ctrl_ops *ops = &ov5640_ctrl_ops;