From 62b7f5931c54e96fca56dd8761b0e466d355c881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 18 Feb 2021 18:04:33 +0100 Subject: bcm27xx: import latest patches from the RPi foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G bcm2710: boot tested on RPi 3B v1.2 bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas (cherry-picked from commit f07e572f64) --- ...-i2c-imx477-Parse-and-register-properties.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.4/950-0911-media-i2c-imx477-Parse-and-register-properties.patch (limited to 'target/linux/bcm27xx/patches-5.4/950-0911-media-i2c-imx477-Parse-and-register-properties.patch') diff --git a/target/linux/bcm27xx/patches-5.4/950-0911-media-i2c-imx477-Parse-and-register-properties.patch b/target/linux/bcm27xx/patches-5.4/950-0911-media-i2c-imx477-Parse-and-register-properties.patch new file mode 100644 index 0000000000..fe022c9b57 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0911-media-i2c-imx477-Parse-and-register-properties.patch @@ -0,0 +1,45 @@ +From df12dbc41bbdb2b949eb395088f9d6b197d9db8a Mon Sep 17 00:00:00 2001 +From: Laurent Pinchart +Date: Sat, 4 Jul 2020 01:45:08 +0300 +Subject: [PATCH] media: i2c: imx477: Parse and register properties + +Parse device properties and register controls for them using the V4L2 +fwnode properties helpers. + +Signed-off-by: Laurent Pinchart +--- + drivers/media/i2c/imx477.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +--- a/drivers/media/i2c/imx477.c ++++ b/drivers/media/i2c/imx477.c +@@ -1957,11 +1957,12 @@ static int imx477_init_controls(struct i + { + struct v4l2_ctrl_handler *ctrl_hdlr; + struct i2c_client *client = v4l2_get_subdevdata(&imx477->sd); ++ struct v4l2_fwnode_device_properties props; + unsigned int i; + int ret; + + ctrl_hdlr = &imx477->ctrl_handler; +- ret = v4l2_ctrl_handler_init(ctrl_hdlr, 14); ++ ret = v4l2_ctrl_handler_init(ctrl_hdlr, 16); + if (ret) + return ret; + +@@ -2045,6 +2046,15 @@ static int imx477_init_controls(struct i + goto error; + } + ++ ret = v4l2_fwnode_device_parse(&client->dev, &props); ++ if (ret) ++ goto error; ++ ++ ret = v4l2_ctrl_new_fwnode_properties(ctrl_hdlr, &imx477_ctrl_ops, ++ &props); ++ if (ret) ++ goto error; ++ + imx477->sd.ctrl_handler = ctrl_hdlr; + + /* Setup exposure and frame/line length limits. */ -- cgit v1.2.3