get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 956004,
    "url": "http://patchwork.ozlabs.org/api/patches/956004/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20180810060711.6547-49-jagan@amarulasolutions.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20180810060711.6547-49-jagan@amarulasolutions.com>",
    "list_archive_url": null,
    "date": "2018-08-10T06:07:06",
    "name": "[U-Boot,v2,48/53] clk: Get the CLK by index without device",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "6fe6bab8403dd50a55e20ed8ee6fe3f3afe14224",
    "submitter": {
        "id": 69820,
        "url": "http://patchwork.ozlabs.org/api/people/69820/?format=api",
        "name": "Jagan Teki",
        "email": "jagan@amarulasolutions.com"
    },
    "delegate": {
        "id": 17739,
        "url": "http://patchwork.ozlabs.org/api/users/17739/?format=api",
        "username": "jagan",
        "first_name": "Jagannadha Sutradharudu",
        "last_name": "Teki",
        "email": "jagannadh.teki@gmail.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20180810060711.6547-49-jagan@amarulasolutions.com/mbox/",
    "series": [
        {
            "id": 60190,
            "url": "http://patchwork.ozlabs.org/api/series/60190/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=60190",
            "date": "2018-08-10T06:06:18",
            "name": "clk: Add Allwinner CLK, RESET support",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/60190/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/956004/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/956004/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=amarulasolutions.com",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=amarulasolutions.com\n\theader.i=@amarulasolutions.com header.b=\"j+sBYSDf\"; \n\tdkim-atps=neutral"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 41mwWD23Zgz9s7Q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 10 Aug 2018 16:41:12 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 080BEC21DAF; Fri, 10 Aug 2018 06:25:08 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id EB3BFC21EA1;\n\tFri, 10 Aug 2018 06:15:13 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 2A91BC21EB4; Fri, 10 Aug 2018 06:10:53 +0000 (UTC)",
            "from mail-pg1-f193.google.com (mail-pg1-f193.google.com\n\t[209.85.215.193])\n\tby lists.denx.de (Postfix) with ESMTPS id 201FEC21EA1\n\tfor <u-boot@lists.denx.de>; Fri, 10 Aug 2018 06:10:45 +0000 (UTC)",
            "by mail-pg1-f193.google.com with SMTP id a11-v6so3892686pgw.6\n\tfor <u-boot@lists.denx.de>; Thu, 09 Aug 2018 23:10:45 -0700 (PDT)",
            "from localhost.localdomain ([183.82.228.250])\n\tby smtp.gmail.com with ESMTPSA id\n\tr23-v6sm16880975pfj.5.2018.08.09.23.10.39\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 09 Aug 2018 23:10:43 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=amarulasolutions.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=DtHdGeZtSBO+LusMhTXGNeCTEoiC42Rx1qqI5GEEzjM=;\n\tb=j+sBYSDfhz3j6ayK/i2l9C1/1k8Y2L7IHkZg5/IvVAOwiVdEaXfKaIRcYg4N4sb0ik\n\t9qPruoi7N7Zq4zY6V/PIAV+wMzTJP0Lowj39Ymu7bU6LArRqUGKrQHML6MjE9PP7Z+vm\n\t9yBwWn6h812ZqnHGcvbXc5WL/cEJvtlOLlbvo=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=DtHdGeZtSBO+LusMhTXGNeCTEoiC42Rx1qqI5GEEzjM=;\n\tb=aPmfVaonZaaZ7bmDjDFIn42rFWEq3Bwaz2aXpZlPjLKdkGPp+Zghoh7OZkalcJF984\n\tnao6NikxK+r4gMymwytS3gY1Q8x4EtL8pX//4VKURpC8QDx9dH+DSdKgcTO9Hsmsslfa\n\tCHXiBSxKZVYbZmLh9AEtFVWCfbktfwmlx9S3Xrp1l+TW3UUiYAvJQVPh7CqqX4j4Ybsf\n\t0MCxr5ywVXQIDm7ZdyXgoQGnJ31VS7uNnwiF/btL3v8f6JLo+0WpLexEiiSgBCEkPLZc\n\tRI6N43RirD/NuE81xqsne5CbNkE8EHDveUsbM7NG3+CgCJTOCjToZgtNyenJT1mMGg83\n\tyC5g==",
        "X-Gm-Message-State": "AOUpUlFYY/kfzCTMqlsML9rt9lY0jwqWKSQ5ILmYIYg50/9T/Iqh1Zmb\n\tvuA2fNlPd60HJ8lUUAEYE3eaGw==",
        "X-Google-Smtp-Source": "AA+uWPxDFbjaG9DZ4hu3JfcBDXK1XDzf8n93PJ0jEHOE5iuBBoyAlQ1SGVIpf9vDK/h8Zgw3plcHJw==",
        "X-Received": "by 2002:a63:5143:: with SMTP id\n\tr3-v6mr5154561pgl.11.1533881443685; \n\tThu, 09 Aug 2018 23:10:43 -0700 (PDT)",
        "From": "Jagan Teki <jagan@amarulasolutions.com>",
        "To": "Maxime Ripard <maxime.ripard@bootlin.com>,\n\tAndre Przywara <andre.przywara@arm.com>, Chen-Yu Tsai <wens@csie.org>,\n\tIcenowy Zheng <icenowy@aosc.io>",
        "Date": "Fri, 10 Aug 2018 11:37:06 +0530",
        "Message-Id": "<20180810060711.6547-49-jagan@amarulasolutions.com>",
        "X-Mailer": "git-send-email 2.18.0.321.gffc6fa0e3",
        "In-Reply-To": "<20180810060711.6547-1-jagan@amarulasolutions.com>",
        "References": "<20180810060711.6547-1-jagan@amarulasolutions.com>",
        "MIME-Version": "1.0",
        "Cc": "Joe Hershberger <joe.hershberger@ni.com>, Tom Rini <trini@konsulko.com>, \n\tu-boot@lists.denx.de",
        "Subject": "[U-Boot] [PATCH v2 48/53] clk: Get the CLK by index without device",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.18",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>"
    },
    "content": "Getting a CLK by index with device is not straight forward\nfor some use-cases like handling clock operations for child\nnode in parent driver. So we need to process the child node\nin parent probe via ofnode and process CLK operation for child\nwithout udevice but with ofnode.\n\nSo add clk_get_by_index_nodev() and move the common code\nin clk_get_by_index_tail() to use for clk_get_by_index()\n\nCc: Simon Glass <sjg@chromium.org>\nCc: Joe Hershberger <joe.hershberger@ni.com>\nSigned-off-by: Jagan Teki <jagan@amarulasolutions.com>\n---\n drivers/clk/clk-uclass.c | 61 +++++++++++++++++++++++++++++++++++++++-\n include/clk.h            | 15 ++++++++++\n 2 files changed, 75 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c\nindex 2b15978e14..8bb41a4de5 100644\n--- a/drivers/clk/clk-uclass.c\n+++ b/drivers/clk/clk-uclass.c\n@@ -98,9 +98,68 @@ static int clk_get_by_indexed_prop(struct udevice *dev, const char *prop_name,\n \treturn clk_request(dev_clk, clk);\n }\n \n+static int clk_get_by_index_tail(int ret, ofnode node,\n+\t\t\t\t struct ofnode_phandle_args *args,\n+\t\t\t\t const char *list_name, int index,\n+\t\t\t\t struct clk *clk)\n+{\n+\tstruct udevice *dev_clk;\n+\tconst struct clk_ops *ops;\n+\n+\tassert(clk);\n+\tclk->dev = NULL;\n+\tif (ret)\n+\t\tgoto err;\n+\n+\tret = uclass_get_device_by_ofnode(UCLASS_CLK, args->node, &dev_clk);\n+\tif (ret) {\n+\t\tdebug(\"%s: uclass_get_device_by_of_offset failed: err=%d\\n\",\n+\t\t      __func__, ret);\n+\t\treturn ret;\n+\t}\n+\n+\tclk->dev = dev_clk;\n+\n+\tops = clk_dev_ops(dev_clk);\n+\n+\tif (ops->of_xlate)\n+\t\tret = ops->of_xlate(clk, args);\n+\telse\n+\t\tret = clk_of_xlate_default(clk, args);\n+\tif (ret) {\n+\t\tdebug(\"of_xlate() failed: %d\\n\", ret);\n+\t\treturn ret;\n+\t}\n+\n+\treturn clk_request(dev_clk, clk);\n+err:\n+\tdebug(\"%s: Node '%s', property '%s', failed to request CLK index %d: %d\\n\",\n+\t       __func__, ofnode_get_name(node), list_name, index, ret);\n+\treturn ret;\n+}\n+\n int clk_get_by_index(struct udevice *dev, int index, struct clk *clk)\n {\n-\treturn clk_get_by_indexed_prop(dev, \"clocks\", index, clk);\n+\tstruct ofnode_phandle_args args;\n+\tint ret;\n+\n+\tret = dev_read_phandle_with_args(dev, \"clocks\", \"#clock-cells\", 0,\n+\t\t\t\t\t index, &args);\n+\n+\treturn clk_get_by_index_tail(ret, dev_ofnode(dev), &args, \"clocks\",\n+\t\t\t\t     index > 0, clk);\n+}\n+\n+int clk_get_by_index_nodev(ofnode node, int index, struct clk *clk)\n+{\n+\tstruct ofnode_phandle_args args;\n+\tint ret;\n+\n+\tret = ofnode_parse_phandle_with_args(node, \"clocks\", \"#clock-cells\", 0,\n+\t\t\t\t\t     index > 0, &args);\n+\n+\treturn clk_get_by_index_tail(ret, node, &args, \"clocks\",\n+\t\t\t\t     index > 0, clk);\n }\n \n int clk_get_bulk(struct udevice *dev, struct clk_bulk *bulk)\ndiff --git a/include/clk.h b/include/clk.h\nindex f6d1cc53a1..1d8478f061 100644\n--- a/include/clk.h\n+++ b/include/clk.h\n@@ -8,6 +8,7 @@\n #ifndef _CLK_H_\n #define _CLK_H_\n \n+#include <dm/ofnode.h>\n #include <linux/errno.h>\n #include <linux/types.h>\n \n@@ -98,6 +99,20 @@ int clk_get_by_index_platdata(struct udevice *dev, int index,\n  */\n int clk_get_by_index(struct udevice *dev, int index, struct clk *clk);\n \n+/**\n+ * clock_get_by_index_nodev - Get/request a clock by integer index\n+ * without a device.\n+ *\n+ * This is a version of clk_get_by_index() that does not use a device.\n+ *\n+ * @node:\tThe client ofnode.\n+ * @index:\tThe index of the clock to request, within the client's list of\n+ *\t\tclocks.\n+ * @clock\tA pointer to a clock struct to initialize.\n+ * @return 0 if OK, or a negative error code.\n+ */\n+int clk_get_by_index_nodev(ofnode node, int index, struct clk *clk);\n+\n /**\n  * clock_get_bulk - Get/request all clocks of a device.\n  *\n",
    "prefixes": [
        "U-Boot",
        "v2",
        "48/53"
    ]
}