Patch Detail
Show a patch.
GET /api/1.1/patches/3419/?format=api
{ "id": 3419, "url": "https://patchwork.libcamera.org/api/1.1/patches/3419/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3419/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20200407163825.1766483-11-jacopo@jmondi.org>", "date": "2020-04-07T16:38:24", "name": "[libcamera-devel,v8,10/11] media: i2c: ov5670: Parse and register properties", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "b52b898935ee55d33dfc0c0ba326764e95372ffc", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": { "id": 15, "url": "https://patchwork.libcamera.org/api/1.1/users/15/?format=api", "username": "jmondi", "first_name": "Jacopo", "last_name": "Mondi", "email": "jacopo@jmondi.org" }, "mbox": "https://patchwork.libcamera.org/patch/3419/mbox/", "series": [ { "id": 801, "url": "https://patchwork.libcamera.org/api/1.1/series/801/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=801", "date": "2020-04-07T16:38:14", "name": "media: Report camera sensor properties", "version": 8, "mbox": "https://patchwork.libcamera.org/series/801/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3419/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3419/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3FF0F62826\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 7 Apr 2020 18:35:49 +0200 (CEST)", "from localhost.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 9172940008;\n\tTue, 7 Apr 2020 16:35:47 +0000 (UTC)" ], "X-Originating-IP": "2.224.242.101", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "Mauro Carvalho Chehab <mchehab@kernel.org>,\n\tHans Verkuil <hverkuil-cisco@xs4all.nl>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>, tfiga@google.com,\n\tpavel@ucw.cz", "Cc": "Jacopo Mondi <jacopo@jmondi.org>,\n\tlinux-media@vger.kernel.org (open list:MEDIA INPUT INFRASTRUCTURE\n\t(V4L/DVB)), libcamera-devel@lists.libcamera.org", "Date": "Tue, 7 Apr 2020 18:38:24 +0200", "Message-Id": "<20200407163825.1766483-11-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.26.0", "In-Reply-To": "<20200407163825.1766483-1-jacopo@jmondi.org>", "References": "<20200407163825.1766483-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v8 10/11] media: i2c: ov5670: Parse and\n\tregister properties", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "X-List-Received-Date": "Tue, 07 Apr 2020 16:35:49 -0000" }, "content": "Parse device properties and register controls for them using the newly\nintroduced helpers.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n drivers/media/i2c/ov5670.c | 12 ++++++++++++\n 1 file changed, 12 insertions(+)", "diff": "diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c\nindex 041fcbb4eebd..f118d44b0889 100644\n--- a/drivers/media/i2c/ov5670.c\n+++ b/drivers/media/i2c/ov5670.c\n@@ -7,6 +7,7 @@\n #include <linux/pm_runtime.h>\n #include <media/v4l2-ctrls.h>\n #include <media/v4l2-device.h>\n+#include <media/v4l2-fwnode.h>\n \n #define OV5670_REG_CHIP_ID\t\t0x300a\n #define OV5670_CHIP_ID\t\t\t0x005670\n@@ -2059,6 +2060,8 @@ static const struct v4l2_ctrl_ops ov5670_ctrl_ops = {\n /* Initialize control handlers */\n static int ov5670_init_controls(struct ov5670 *ov5670)\n {\n+\tstruct i2c_client *client = v4l2_get_subdevdata(&ov5670->sd);\n+\tstruct v4l2_fwnode_device_properties props;\n \tstruct v4l2_ctrl_handler *ctrl_hdlr;\n \ts64 vblank_max;\n \ts64 vblank_def;\n@@ -2129,6 +2132,15 @@ static int ov5670_init_controls(struct ov5670 *ov5670)\n \t\tgoto error;\n \t}\n \n+\tret = v4l2_fwnode_device_parse(&client->dev, &props);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = v4l2_ctrl_new_fwnode_properties(ctrl_hdlr, &ov5670_ctrl_ops,\n+\t\t\t\t\t &props);\n+\tif (ret)\n+\t\treturn ret;\n+\n \tov5670->sd.ctrl_handler = ctrl_hdlr;\n \n \treturn 0;\n", "prefixes": [ "libcamera-devel", "v8", "10/11" ] }