mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-22 21:26:59 +08:00

These patches were generated from: https://github.com/raspberrypi/linux/commits/rpi-6.12.y With the following command: git format-patch -N v6.12.27..HEAD (HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e) Exceptions: - (def)configs patches - github workflows patches - applied & reverted patches - readme patches - wireless patches Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
49 lines
1.5 KiB
Diff
49 lines
1.5 KiB
Diff
From 7ae04a0d0b34b6d93890631e39386a1497bad0b3 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] 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(-)
|
|
|
|
--- a/drivers/media/i2c/ov7251.c
|
|
+++ b/drivers/media/i2c/ov7251.c
|
|
@@ -1564,7 +1564,7 @@ static int ov7251_init_ctrls(struct ov72
|
|
s64 pixel_rate;
|
|
int hblank;
|
|
|
|
- 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,
|
|
@@ -1623,6 +1623,7 @@ static int ov7251_init_ctrls(struct ov72
|
|
|
|
static int ov7251_probe(struct i2c_client *client)
|
|
{
|
|
+ struct v4l2_fwnode_device_properties props;
|
|
struct device *dev = &client->dev;
|
|
struct ov7251 *ov7251;
|
|
unsigned int rate = 0, clk_rate = 0;
|
|
@@ -1713,6 +1714,15 @@ static int ov7251_probe(struct i2c_clien
|
|
goto destroy_mutex;
|
|
}
|
|
|
|
+ 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.internal_ops = &ov7251_internal_ops;
|
|
ov7251->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|