bcm27xx: 6.1: add kernel patches
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-6.1 / 950-0435-media-i2c-arducam-pivariety-Add-custom-controls.patch
1 From b319421a01177d883539b2f25302300e9544afb0 Mon Sep 17 00:00:00 2001
2 From: Lee Jackson <info@arducam.com>
3 Date: Fri, 26 Aug 2022 11:41:49 +0800
4 Subject: [PATCH] media: i2c: arducam-pivariety: Add custom controls
5
6 Add support for strobe_shift, strobe_width and mode custom controls.
7
8 Signed-off-by: Lee Jackson <info@arducam.com>
9 ---
10 drivers/media/i2c/arducam-pivariety.c | 6 ++++++
11 drivers/media/i2c/arducam-pivariety.h | 3 +++
12 2 files changed, 9 insertions(+)
13
14 --- a/drivers/media/i2c/arducam-pivariety.c
15 +++ b/drivers/media/i2c/arducam-pivariety.c
16 @@ -1140,6 +1140,12 @@ static const char *pivariety_ctrl_get_na
17 return "trigger_mode";
18 case V4L2_CID_ARDUCAM_IRCUT:
19 return "ircut";
20 + case V4L2_CID_ARDUCAM_STROBE_SHIFT:
21 + return "strobe_shift";
22 + case V4L2_CID_ARDUCAM_STROBE_WIDTH:
23 + return "strobe_width";
24 + case V4L2_CID_ARDUCAM_MODE:
25 + return "mode";
26 default:
27 return NULL;
28 }
29 --- a/drivers/media/i2c/arducam-pivariety.h
30 +++ b/drivers/media/i2c/arducam-pivariety.h
31 @@ -52,6 +52,9 @@
32 #define V4L2_CID_ARDUCAM_BASE (V4L2_CID_USER_BASE + 0x1000)
33 #define V4L2_CID_ARDUCAM_EXT_TRI (V4L2_CID_ARDUCAM_BASE + 1)
34 #define V4L2_CID_ARDUCAM_IRCUT (V4L2_CID_ARDUCAM_BASE + 8)
35 +#define V4L2_CID_ARDUCAM_STROBE_SHIFT (V4L2_CID_ARDUCAM_BASE + 14)
36 +#define V4L2_CID_ARDUCAM_STROBE_WIDTH (V4L2_CID_ARDUCAM_BASE + 15)
37 +#define V4L2_CID_ARDUCAM_MODE (V4L2_CID_ARDUCAM_BASE + 16)
38
39 enum image_dt {
40 IMAGE_DT_YUV420_8 = 0x18,