Show a patch.

GET /api/patches/3737/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 3737,
    "url": "https://patchwork.libcamera.org/api/patches/3737/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3737/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20200509090456.3496481-13-jacopo@jmondi.org>",
    "date": "2020-05-09T09:04:55",
    "name": "[libcamera-devel,v11,12/13] media: i2c: imx219: Parse and register properties",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "7e022cb0bf318c70e8e7927937eaf702d2320d9d",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3737/mbox/",
    "series": [
        {
            "id": 889,
            "url": "https://patchwork.libcamera.org/api/series/889/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=889",
            "date": "2020-05-09T09:04:43",
            "name": "media: report camera properties",
            "version": 11,
            "mbox": "https://patchwork.libcamera.org/series/889/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3737/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3737/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B078961690\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  9 May 2020 11:02:26 +0200 (CEST)",
            "from uno.homenet.telecomitalia.it (a-ur1-85.tin.it\n\t[212.216.150.148]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 7EC921C0004;\n\tSat,  9 May 2020 09:02:24 +0000 (UTC)"
        ],
        "X-Originating-IP": "212.216.150.148",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "linux-media@vger.kernel.org (open list:MEDIA INPUT INFRASTRUCTURE\n\t(V4L/DVB)), libcamera-devel@lists.libcamera.org,\n\tMauro 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>",
        "Cc": "Jacopo Mondi <jacopo@jmondi.org>,\n\ttfiga@google.com,\n\tpavel@ucw.cz",
        "Date": "Sat,  9 May 2020 11:04:55 +0200",
        "Message-Id": "<20200509090456.3496481-13-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.26.1",
        "In-Reply-To": "<20200509090456.3496481-1-jacopo@jmondi.org>",
        "References": "<20200509090456.3496481-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v11 12/13] media: i2c: imx219: 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": "Sat, 09 May 2020 09:02:26 -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/imx219.c | 12 +++++++++++-\n 1 file changed, 11 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c\nindex cb03bdec1f9c8..8f72ff5c1585e 100644\n--- a/drivers/media/i2c/imx219.c\n+++ b/drivers/media/i2c/imx219.c\n@@ -1171,11 +1171,12 @@ static int imx219_init_controls(struct imx219 *imx219)\n \tstruct i2c_client *client = v4l2_get_subdevdata(&imx219->sd);\n \tstruct v4l2_ctrl_handler *ctrl_hdlr;\n \tunsigned int height = imx219->mode->height;\n+\tstruct v4l2_fwnode_device_properties props;\n \tint exposure_max, exposure_def, hblank;\n \tint i, ret;\n \n \tctrl_hdlr = &imx219->ctrl_handler;\n-\tret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);\n+\tret = v4l2_ctrl_handler_init(ctrl_hdlr, 11);\n \tif (ret)\n \t\treturn ret;\n \n@@ -1254,6 +1255,15 @@ static int imx219_init_controls(struct imx219 *imx219)\n \t\tgoto error;\n \t}\n \n+\tret = v4l2_fwnode_device_parse(&client->dev, &props);\n+\tif (ret)\n+\t\tgoto error;\n+\n+\tret = v4l2_ctrl_new_fwnode_properties(ctrl_hdlr, &imx219_ctrl_ops,\n+\t\t\t\t\t      &props);\n+\tif (ret)\n+\t\tgoto error;\n+\n \timx219->sd.ctrl_handler = ctrl_hdlr;\n \n \treturn 0;\n",
    "prefixes": [
        "libcamera-devel",
        "v11",
        "12/13"
    ]
}