mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add a directory by kernel instead of a common root, add qnap-301w and rpi4 kernel 6.1 suppport
This commit is contained in:
parent
e910436a7a
commit
46837ec4c0
9459 changed files with 362648 additions and 116345 deletions
|
|
@ -0,0 +1,75 @@
|
|||
From 9abdf02e0d482beed043b5cf7af0b51955e33018 Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
Date: Sun, 16 Oct 2022 09:15:15 +0300
|
||||
Subject: [PATCH 655/726] media: i2c: imx290: Add exposure time control
|
||||
|
||||
Upstream commit 827c7e69cb2d.
|
||||
|
||||
Support configuring the exposure time, which is expressed as the
|
||||
complement of the exposure time (frame period minus integration time).
|
||||
The frame period is currently fixed.
|
||||
|
||||
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
Acked-by: Alexander Stein <alexander.stein@ew.tq-group.com>
|
||||
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
---
|
||||
drivers/media/i2c/imx290.c | 16 ++++++++++++++--
|
||||
1 file changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
|
||||
index c7b55953f5b1..8c38119b9208 100644
|
||||
--- a/drivers/media/i2c/imx290.c
|
||||
+++ b/drivers/media/i2c/imx290.c
|
||||
@@ -103,6 +103,8 @@
|
||||
#define IMX290_PGCTRL_THRU BIT(1)
|
||||
#define IMX290_PGCTRL_MODE(n) ((n) << 4)
|
||||
|
||||
+#define IMX290_VMAX_DEFAULT 1125
|
||||
+
|
||||
static const char * const imx290_supply_name[] = {
|
||||
"vdda",
|
||||
"vddd",
|
||||
@@ -176,7 +178,7 @@ static const char * const imx290_test_pattern_menu[] = {
|
||||
|
||||
static const struct imx290_regval imx290_global_init_settings[] = {
|
||||
{ IMX290_CTRL_07, IMX290_WINMODE_1080P },
|
||||
- { IMX290_VMAX, 1125 },
|
||||
+ { IMX290_VMAX, IMX290_VMAX_DEFAULT },
|
||||
{ IMX290_EXTCK_FREQ, 0x2520 },
|
||||
{ IMX290_WINWV_OB, 12 },
|
||||
{ IMX290_WINPH, 0 },
|
||||
@@ -480,6 +482,12 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
|
||||
case V4L2_CID_GAIN:
|
||||
ret = imx290_write(imx290, IMX290_GAIN, ctrl->val, NULL);
|
||||
break;
|
||||
+
|
||||
+ case V4L2_CID_EXPOSURE:
|
||||
+ ret = imx290_write(imx290, IMX290_SHS1,
|
||||
+ IMX290_VMAX_DEFAULT - ctrl->val - 1, NULL);
|
||||
+ break;
|
||||
+
|
||||
case V4L2_CID_TEST_PATTERN:
|
||||
if (ctrl->val) {
|
||||
imx290_write(imx290, IMX290_BLKLEVEL, 0, &ret);
|
||||
@@ -1008,12 +1016,16 @@ static int imx290_probe(struct i2c_client *client)
|
||||
*/
|
||||
imx290_entity_init_cfg(&imx290->sd, NULL);
|
||||
|
||||
- v4l2_ctrl_handler_init(&imx290->ctrls, 4);
|
||||
+ v4l2_ctrl_handler_init(&imx290->ctrls, 5);
|
||||
imx290->ctrls.lock = &imx290->lock;
|
||||
|
||||
v4l2_ctrl_new_std(&imx290->ctrls, &imx290_ctrl_ops,
|
||||
V4L2_CID_GAIN, 0, 72, 1, 0);
|
||||
|
||||
+ v4l2_ctrl_new_std(&imx290->ctrls, &imx290_ctrl_ops,
|
||||
+ V4L2_CID_EXPOSURE, 1, IMX290_VMAX_DEFAULT - 2, 1,
|
||||
+ IMX290_VMAX_DEFAULT - 2);
|
||||
+
|
||||
imx290->link_freq =
|
||||
v4l2_ctrl_new_int_menu(&imx290->ctrls, &imx290_ctrl_ops,
|
||||
V4L2_CID_LINK_FREQ,
|
||||
--
|
||||
2.33.1
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue