Show a patch.

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

{
    "id": 8599,
    "url": "https://patchwork.libcamera.org/api/patches/8599/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/8599/",
    "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": "<20200704004028.21153-9-laurent.pinchart@ideasonboard.com>",
    "date": "2020-07-04T00:40:24",
    "name": "[libcamera-devel,08/12] media: i2c: ov5647: Parse and register properties",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "02289e10317053743c3b8d4a7017db0c77588b05",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/8599/mbox/",
    "series": [
        {
            "id": 1080,
            "url": "https://patchwork.libcamera.org/api/series/1080/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1080",
            "date": "2020-07-04T00:40:16",
            "name": "raspberrypi: Report sensor orientation through DT",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1080/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/8599/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/8599/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7CC2FBFFE2\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  4 Jul 2020 00:40:44 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4B23760DE2;\n\tSat,  4 Jul 2020 02:40:44 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 253C460DC9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  4 Jul 2020 02:40:40 +0200 (CEST)",
            "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A610129E;\n\tSat,  4 Jul 2020 02:40:39 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"vhKBleKD\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1593823239;\n\tbh=A1KZolLjwP3OO3E1Njd3pbwnQzM87JrFs3FmDDmJM2M=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=vhKBleKDd9l1aS5rBzKCtGbKFq72p58RkjA7yZDDB3jrqlxGfCen5QVFmAR0805pK\n\tgNpFKQZ3dDGguOTEFIdhocWwPQdqneT1iaaFGwDKihBqkp1/26kTFCCrt2E20Iag4E\n\trXNs+veMYgYqCpWQK7/RFlKhp4A5SkukWlI687MI=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "Dave Stevenson <dave.stevenson@raspberrypi.com>",
        "Date": "Sat,  4 Jul 2020 03:40:24 +0300",
        "Message-Id": "<20200704004028.21153-9-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20200704004028.21153-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20200704004028.21153-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 08/12] media: i2c: ov5647: 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>",
        "Cc": "libcamera-devel@lists.libcamera.org",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Parse device properties and register controls for them using the V4L2\nfwnode properties helpers.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n drivers/media/i2c/ov5647.c | 13 ++++++++++++-\n 1 file changed, 12 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c\nindex 6d84d2785f74..86a821a172b3 100644\n--- a/drivers/media/i2c/ov5647.c\n+++ b/drivers/media/i2c/ov5647.c\n@@ -1501,6 +1501,7 @@ static int ov5647_probe(struct i2c_client *client)\n \tstruct device_node *np = client->dev.of_node;\n \tu32 xclk_freq;\n \tint hblank, exposure_max, exposure_def;\n+\tstruct v4l2_fwnode_device_properties props;\n \n \tsensor = devm_kzalloc(dev, sizeof(*sensor), GFP_KERNEL);\n \tif (!sensor)\n@@ -1534,7 +1535,7 @@ static int ov5647_probe(struct i2c_client *client)\n \tmutex_init(&sensor->lock);\n \n \t/* Initialise controls. */\n-\tv4l2_ctrl_handler_init(&sensor->ctrls, 7);\n+\tv4l2_ctrl_handler_init(&sensor->ctrls, 9);\n \tv4l2_ctrl_new_std(&sensor->ctrls, &ov5647_ctrl_ops,\n \t\t\t  V4L2_CID_AUTOGAIN,\n \t\t\t  0,  /* min */\n@@ -1598,6 +1599,16 @@ static int ov5647_probe(struct i2c_client *client)\n \t\t\t__func__, ret);\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(&sensor->ctrls, &ov5647_ctrl_ops,\n+\t\t\t\t\t      &props);\n+\tif (ret)\n+\t\tgoto error;\n+\n \tsensor->sd.ctrl_handler = &sensor->ctrls;\n \n \t/* Write out the register set over I2C on stream-on. */\n",
    "prefixes": [
        "libcamera-devel",
        "08/12"
    ]
}