1 From 22a869d373bc642562e55107028d19926a593984 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Sun, 22 Nov 2020 11:01:08 +0000
4 Subject: [PATCH] media: ov9281: Add 1280x720 and 640x480 modes
6 Breaks out common register set and adds the different registers
7 for 1280x720 (cropped) and 640x480 (skipped) modes
9 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
11 drivers/media/i2c/ov9281.c | 146 ++++++++++++++++++++++++++++++++-----
12 1 file changed, 126 insertions(+), 20 deletions(-)
14 --- a/drivers/media/i2c/ov9281.c
15 +++ b/drivers/media/i2c/ov9281.c
16 @@ -139,7 +139,7 @@ struct ov9281 {
17 * max_framerate 120fps for 10 bit, 144fps for 8 bit.
18 * mipi_datarate per lane 800Mbps
20 -static const struct regval ov9281_1280x800_regs[] = {
21 +static const struct regval ov9281_common_regs[] = {
25 @@ -177,13 +177,35 @@ static const struct regval ov9281_1280x8
57 +static const struct regval ov9281_1280x800_regs[] = {
62 @@ -208,31 +230,83 @@ static const struct regval ov9281_1280x8
94 +static const struct regval ov9281_1280x720_regs[] = {
130 +static const struct regval ov9281_640x400_regs[] = {
164 @@ -263,6 +337,34 @@ static const struct ov9281_mode supporte
166 .reg_list = ov9281_1280x800_regs,
180 + .reg_list = ov9281_1280x720_regs,
194 + .reg_list = ov9281_640x400_regs,
198 static const s64 link_freq_menu_items[] = {
199 @@ -567,6 +669,10 @@ static int __ov9281_start_stream(struct
203 + ret = ov9281_write_array(ov9281->client, ov9281_common_regs);
207 ret = ov9281_write_array(ov9281->client, ov9281->cur_mode->reg_list);