mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add 5.14 patches for RPI
This commit is contained in:
parent
030f2f4fd1
commit
5c593832cc
550 changed files with 224556 additions and 0 deletions
|
@ -0,0 +1,61 @@
|
|||
From 0951bfd998608b91560b533eac795f9debb514ba Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Date: Tue, 3 Aug 2021 11:30:58 +0100
|
||||
Subject: [PATCH 528/552] media: i2c: ov9281: Add fwnode properties controls
|
||||
|
||||
Add call to v4l2_ctrl_new_fwnode_properties to read and
|
||||
create the fwnode based controls.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
---
|
||||
drivers/media/i2c/ov9281.c | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/media/i2c/ov9281.c b/drivers/media/i2c/ov9281.c
|
||||
index c89dc98ad708..e4604746e930 100644
|
||||
--- a/drivers/media/i2c/ov9281.c
|
||||
+++ b/drivers/media/i2c/ov9281.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <media/media-entity.h>
|
||||
#include <media/v4l2-async.h>
|
||||
#include <media/v4l2-ctrls.h>
|
||||
+#include <media/v4l2-fwnode.h>
|
||||
#include <media/v4l2-subdev.h>
|
||||
|
||||
#define OV9281_LINK_FREQ_400MHZ 400000000
|
||||
@@ -1023,6 +1024,7 @@ static const struct v4l2_ctrl_ops ov9281_ctrl_ops = {
|
||||
|
||||
static int ov9281_initialize_controls(struct ov9281 *ov9281)
|
||||
{
|
||||
+ struct v4l2_fwnode_device_properties props;
|
||||
const struct ov9281_mode *mode;
|
||||
struct v4l2_ctrl_handler *handler;
|
||||
struct v4l2_ctrl *ctrl;
|
||||
@@ -1032,7 +1034,7 @@ static int ov9281_initialize_controls(struct ov9281 *ov9281)
|
||||
|
||||
handler = &ov9281->ctrl_handler;
|
||||
mode = ov9281->cur_mode;
|
||||
- ret = v4l2_ctrl_handler_init(handler, 9);
|
||||
+ ret = v4l2_ctrl_handler_init(handler, 11);
|
||||
if (ret)
|
||||
return ret;
|
||||
handler->lock = &ov9281->mutex;
|
||||
@@ -1094,6 +1096,15 @@ static int ov9281_initialize_controls(struct ov9281 *ov9281)
|
||||
goto err_free_handler;
|
||||
}
|
||||
|
||||
+ ret = v4l2_fwnode_device_parse(&ov9281->client->dev, &props);
|
||||
+ if (ret)
|
||||
+ goto err_free_handler;
|
||||
+
|
||||
+ ret = v4l2_ctrl_new_fwnode_properties(handler, &ov9281_ctrl_ops,
|
||||
+ &props);
|
||||
+ if (ret)
|
||||
+ goto err_free_handler;
|
||||
+
|
||||
ov9281->subdev.ctrl_handler = handler;
|
||||
|
||||
return 0;
|
||||
--
|
||||
2.33.0
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue