From: Chen-Yu Tsai <wens@csie.org>
To: Steve Longerbeam <slongerbeam@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Chen-Yu Tsai <wens@csie.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Maxime Ripard <maxime.ripard@bootlin.com>
Subject: [PATCH 1/6] media: ov5640: Move test_pattern_menu before ov5640_set_ctrl_test_pattern
Date: Fri, 18 Jan 2019 16:52:01 +0800 [thread overview]
Message-ID: <20190118085206.2598-2-wens@csie.org> (raw)
In-Reply-To: <20190118085206.2598-1-wens@csie.org>
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>
---
drivers/media/i2c/ov5640.c | 10 +++++-----
1 file 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;
--
2.20.1
next prev parent reply other threads:[~2019-01-18 8:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-18 8:52 [PATCH 0/6] media: ov5640: JPEG and test pattern improvements Chen-Yu Tsai
2019-01-18 8:52 ` Chen-Yu Tsai [this message]
2019-01-18 8:52 ` [PATCH 2/6] media: ov5640: Add register definition for test pattern register Chen-Yu Tsai
2019-01-18 8:52 ` [PATCH 3/6] media: ov5640: Disable transparent feature for test pattern Chen-Yu Tsai
2019-01-18 8:52 ` [PATCH 4/6] media: ov5640: Add three more test patterns Chen-Yu Tsai
2019-01-18 8:52 ` [PATCH 5/6] media: ov5640: Set JPEG output timings when outputting JPEG data Chen-Yu Tsai
2019-01-18 8:52 ` [PATCH 6/6] media: ov5640: Consolidate JPEG compression mode setting Chen-Yu Tsai
2019-02-05 8:55 ` Sakari Ailus
2019-02-05 13:50 ` Chen-Yu Tsai
2019-02-05 16:08 ` Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190118085206.2598-2-wens@csie.org \
--to=wens@csie.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=maxime.ripard@bootlin.com \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=slongerbeam@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®