mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add kernel 5.15 for RPI4 support
This commit is contained in:
parent
e961d478cd
commit
df88a19bbd
638 changed files with 239907 additions and 0 deletions
|
@ -0,0 +1,53 @@
|
|||
From 157ba6d66c9fe64c7c1e25562d1bb80bff5e003b Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Date: Tue, 3 Aug 2021 11:33:33 +0100
|
||||
Subject: [PATCH 488/634] media: i2c: ov7251: 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/ov7251.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c
|
||||
index ebb299f207e5..083a62b267f2 100644
|
||||
--- a/drivers/media/i2c/ov7251.c
|
||||
+++ b/drivers/media/i2c/ov7251.c
|
||||
@@ -1256,6 +1256,7 @@ static const struct v4l2_subdev_ops ov7251_subdev_ops = {
|
||||
|
||||
static int ov7251_probe(struct i2c_client *client)
|
||||
{
|
||||
+ struct v4l2_fwnode_device_properties props;
|
||||
struct device *dev = &client->dev;
|
||||
struct fwnode_handle *endpoint;
|
||||
struct ov7251 *ov7251;
|
||||
@@ -1341,7 +1342,7 @@ static int ov7251_probe(struct i2c_client *client)
|
||||
|
||||
mutex_init(&ov7251->lock);
|
||||
|
||||
- v4l2_ctrl_handler_init(&ov7251->ctrls, 7);
|
||||
+ v4l2_ctrl_handler_init(&ov7251->ctrls, 9);
|
||||
ov7251->ctrls.lock = &ov7251->lock;
|
||||
|
||||
v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
|
||||
@@ -1377,6 +1378,15 @@ static int ov7251_probe(struct i2c_client *client)
|
||||
goto free_ctrl;
|
||||
}
|
||||
|
||||
+ ret = v4l2_fwnode_device_parse(&client->dev, &props);
|
||||
+ if (ret)
|
||||
+ goto free_ctrl;
|
||||
+
|
||||
+ ret = v4l2_ctrl_new_fwnode_properties(&ov7251->ctrls, &ov7251_ctrl_ops,
|
||||
+ &props);
|
||||
+ if (ret)
|
||||
+ goto free_ctrl;
|
||||
+
|
||||
v4l2_i2c_subdev_init(&ov7251->sd, client, &ov7251_subdev_ops);
|
||||
ov7251->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
ov7251->pad.flags = MEDIA_PAD_FL_SOURCE;
|
||||
--
|
||||
2.33.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue