diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-16 23:40:32 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-17 15:11:22 +0200 |
commit | 20ea6adbf199097c4f5f591ffee088340630dae4 (patch) | |
tree | d6719d95e136611a1c25bbf7789652d6d402779d /target/linux/bcm27xx/patches-5.15/950-0370-media-i2c-ov5647-Parse-and-register-properties.patch | |
parent | bca05bd072180dc38ef740b37ded9572a6db1981 (diff) | |
download | upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.gz upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.bz2 upstream-20ea6adbf199097c4f5f591ffee088340630dae4.zip |
bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0370-media-i2c-ov5647-Parse-and-register-properties.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0370-media-i2c-ov5647-Parse-and-register-properties.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0370-media-i2c-ov5647-Parse-and-register-properties.patch b/target/linux/bcm27xx/patches-5.15/950-0370-media-i2c-ov5647-Parse-and-register-properties.patch new file mode 100644 index 0000000000..40a7972dc6 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0370-media-i2c-ov5647-Parse-and-register-properties.patch @@ -0,0 +1,49 @@ +From c9ec0108b09b7222be4146d8fe543cf1def5cf69 Mon Sep 17 00:00:00 2001 +From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> +Date: Sat, 4 Jul 2020 01:45:08 +0300 +Subject: [PATCH] media: i2c: ov5647: Parse and register properties + +Parse device properties and register controls for them using the V4L2 +fwnode properties helpers. + +Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> +--- + drivers/media/i2c/ov5647.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/drivers/media/i2c/ov5647.c ++++ b/drivers/media/i2c/ov5647.c +@@ -1291,10 +1291,11 @@ static const struct v4l2_ctrl_ops ov5647 + .s_ctrl = ov5647_s_ctrl, + }; + +-static int ov5647_init_controls(struct ov5647 *sensor) ++static int ov5647_init_controls(struct ov5647 *sensor, struct device *dev) + { + struct i2c_client *client = v4l2_get_subdevdata(&sensor->sd); + int hblank, exposure_max, exposure_def; ++ struct v4l2_fwnode_device_properties props; + + v4l2_ctrl_handler_init(&sensor->ctrls, 8); + +@@ -1340,6 +1341,11 @@ static int ov5647_init_controls(struct o + sensor->mode->vts - + sensor->mode->format.height); + ++ v4l2_fwnode_device_parse(dev, &props); ++ ++ v4l2_ctrl_new_fwnode_properties(&sensor->ctrls, &ov5647_ctrl_ops, ++ &props); ++ + if (sensor->ctrls.error) + goto handler_free; + +@@ -1426,7 +1432,7 @@ static int ov5647_probe(struct i2c_clien + + sensor->mode = OV5647_DEFAULT_MODE; + +- ret = ov5647_init_controls(sensor); ++ ret = ov5647_init_controls(sensor, dev); + if (ret) + goto mutex_destroy; + |