get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 806416,
    "url": "http://patchwork.ozlabs.org/api/patches/806416/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1503905040-17618-3-git-send-email-eddie.cai.linux@gmail.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": "<1503905040-17618-3-git-send-email-eddie.cai.linux@gmail.com>",
    "list_archive_url": null,
    "date": "2017-08-28T07:23:58",
    "name": "[U-Boot,V8,2/4] usb: rockchip: add rockusb command",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "6d0a745fbe67507144ff61dff5e4fc7fc2e7ffb4",
    "submitter": {
        "id": 70800,
        "url": "http://patchwork.ozlabs.org/api/people/70800/?format=api",
        "name": "Eddie Cai",
        "email": "eddie.cai.linux@gmail.com"
    },
    "delegate": {
        "id": 69486,
        "url": "http://patchwork.ozlabs.org/api/users/69486/?format=api",
        "username": "ptomsich",
        "first_name": "Philipp",
        "last_name": "Tomsich",
        "email": "philipp.tomsich@theobroma-systems.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1503905040-17618-3-git-send-email-eddie.cai.linux@gmail.com/mbox/",
    "series": [
        {
            "id": 93,
            "url": "http://patchwork.ozlabs.org/api/series/93/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=93",
            "date": "2017-08-28T07:23:56",
            "name": "introduce Rockchip rockusb",
            "version": 8,
            "mbox": "http://patchwork.ozlabs.org/series/93/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/806416/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/806416/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;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"cGlVCs5F\"; dkim-atps=neutral"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xgk1m01P4z9sNq\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 28 Aug 2017 17:30:03 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 70B5DC22490; Mon, 28 Aug 2017 07:30:01 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 7EDB8C22478;\n\tMon, 28 Aug 2017 07:25:08 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 94137C22457; Mon, 28 Aug 2017 07:24:52 +0000 (UTC)",
            "from mail-pg0-f67.google.com (mail-pg0-f67.google.com\n\t[74.125.83.67])\n\tby lists.denx.de (Postfix) with ESMTPS id 978BBC22457\n\tfor <u-boot@lists.denx.de>; Mon, 28 Aug 2017 07:24:50 +0000 (UTC)",
            "by mail-pg0-f67.google.com with SMTP id t193so2763770pgc.4\n\tfor <u-boot@lists.denx.de>; Mon, 28 Aug 2017 00:24:50 -0700 (PDT)",
            "from localhost.localdomain ([103.29.142.67])\n\tby smtp.gmail.com with ESMTPSA id\n\tf16sm22860100pfd.55.2017.08.28.00.24.43\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 28 Aug 2017 00:24:47 -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=FREEMAIL_FROM,\n\tKHOP_BIG_TO_CC, \n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=blnFlFzGKrZqCoK6vR0pIpNh67i8s51WI1+zkZMkV0A=;\n\tb=cGlVCs5FlHVZ0nlKTMKhg4UbSP8F4+kxx/nTwhBqNEuo2MYFKhueWlmXPSWXc/NrAO\n\tT9rcezOfDmuGD4STONxRnHiB9+WwSQwzjvuYU/sywW65A1WpaG1rYW5Jk44aBWu4Y8p8\n\t0MIAom8uTjFNqeHmwbTNvmHslBOOUgRHnp+Ps5QUF3PxlFib1YYSHzL1jjjRJy78+PGq\n\tKydUsrvQEls9DbZ27ip52rUlbFnR6kTfr/uVoPUDH/HkdR/kYbRdf/YHatmrxhG/647E\n\te8c75nkAyizSHOZHW5SvFOyZKZH6tlWbGeZCsylg1fad91n/bdObanN/X1eJ1xoufuDP\n\tLIdA==",
        "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;\n\tbh=blnFlFzGKrZqCoK6vR0pIpNh67i8s51WI1+zkZMkV0A=;\n\tb=K0PaGg3PIUtDVzbF49il2o4h2++uSySF7Gu0Tn/N7O67+qYl9siFhRejdJR3f7mQql\n\tKm3oHYKC1XoW8uVAh8GW9MPxW0dXVA4+RbohFILXvlPtQxHz/UYWdziGWabd80LGbvB2\n\t2ZHTYCzb7rnUWqHYKW8aW1AdFO6ghql05lOtvwGL7Hjkbnf/LCh9ZL/Zh903kB2u3HZj\n\tNwfS8sOQa0CKt7w6GXKvreWIeUukZbYCFCzcrt3c0f5Hj4qadrpvBsmNBjyVom1r7S9d\n\tHle+c9d1hCkThObCH7LLHRl7u5Tx55MrFvYLT8wuzrd3FIuQnDcpASdy+DnGC5isloA/\n\txnfw==",
        "X-Gm-Message-State": "AHYfb5imam3deyXCZ+7D8JhJh0ZRlkk3p5RSnI3LxpzYczf/ztMSMmJf\n\tmi+jbXV6SwQ+bA==",
        "X-Received": "by 10.98.29.68 with SMTP id d65mr3928561pfd.6.1503905089115;\n\tMon, 28 Aug 2017 00:24:49 -0700 (PDT)",
        "From": "Eddie Cai <eddie.cai.linux@gmail.com>",
        "To": "lukma@denx.de, sjg@chromium.org, marex@denx.de, trini@konsulko.com,\n\twilliam.wu@rock-chips.com, yamada.masahiro@socionext.com,\n\tmaxime.ripard@free-electrons.com, agraf@suse.de, bmeng.cn@gmail.com, \n\tyanmiaobest@gmail.com, dinguyen@kernel.org,\n\tboris.brezillon@free-electrons.com, sr@denx.de,\n\turi.mashiach@compulab.co.il, michal.simek@xilinx.com",
        "Date": "Mon, 28 Aug 2017 15:23:58 +0800",
        "Message-Id": "<1503905040-17618-3-git-send-email-eddie.cai.linux@gmail.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1503905040-17618-1-git-send-email-eddie.cai.linux@gmail.com>",
        "References": "<1503905040-17618-1-git-send-email-eddie.cai.linux@gmail.com>",
        "Cc": "u-boot@lists.denx.de",
        "Subject": "[U-Boot] [PATCH V8 2/4] usb: rockchip: add rockusb command",
        "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>",
        "MIME-Version": "1.0",
        "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": "this patch add rockusb command. the usage is\nrockusb <USB_controller> <devtype> <dev[:part]>\ne.g. rockusb 0 mmc 0\n\nSigned-off-by: Eddie Cai <eddie.cai.linux@gmail.com>\nReviewed-by: Simon Glass <sjg@chromium.org>\n\nChanges in v8:                                                                  \n-none\n\nChanges in v7:\n-none\n\nChanges in v6:\n-none\n\nChanges in v5:\n-none\n\nChanges in v4:\n-move USB_FUNCTION_ROCKUSB to drivers/usb/gadget/Kconfig\n-modify the dependence\n\nChanges in v3:\n-fix comment from Simon and Lukasz\n-fix checkpactch error\n\n---\n cmd/Kconfig   |  9 ++++++++\n cmd/Makefile  |  1 +\n cmd/rockusb.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 84 insertions(+)\n create mode 100644 cmd/rockusb.c",
    "diff": "diff --git a/cmd/Kconfig b/cmd/Kconfig\nindex 42d955c..5be9e14 100644\n--- a/cmd/Kconfig\n+++ b/cmd/Kconfig\n@@ -895,6 +895,15 @@ config CMD_USB\n \thelp\n \t  USB support.\n \n+config CMD_ROCKUSB\n+\tbool \"rockusb\"\n+\tdepends on USB_FUNCTION_ROCKUSB\n+\thelp\n+          Rockusb protocol is widely used by Rockchip SoC based devices. It can\n+\t  read/write info, image to/from devices. This enable rockusb command\n+\t  support to comunication with rockusb device. for more detail about\n+\t  this command, please read doc/README.rockusb.\n+\n config CMD_USB_MASS_STORAGE\n \tbool \"UMS usb mass storage\"\n \thelp\ndiff --git a/cmd/Makefile b/cmd/Makefile\nindex 4a865bd..37cdc03 100644\n--- a/cmd/Makefile\n+++ b/cmd/Makefile\n@@ -104,6 +104,7 @@ obj-$(CONFIG_CMD_READ) += read.o\n obj-$(CONFIG_CMD_REGINFO) += reginfo.o\n obj-$(CONFIG_CMD_REISER) += reiser.o\n obj-$(CONFIG_CMD_REMOTEPROC) += remoteproc.o\n+obj-$(CONFIG_CMD_ROCKUSB) += rockusb.o\n obj-$(CONFIG_SANDBOX) += host.o\n obj-$(CONFIG_CMD_SATA) += sata.o\n obj-$(CONFIG_CMD_NVME) += nvme.o\ndiff --git a/cmd/rockusb.c b/cmd/rockusb.c\nnew file mode 100644\nindex 0000000..ae2baa6\n--- /dev/null\n+++ b/cmd/rockusb.c\n@@ -0,0 +1,74 @@\n+/*\n+ * Copyright (C) 2017 Eddie Cai <eddie.cai.linux@gmail.com>\n+ *\n+ * SPDX-License-Identifier:\tGPL-2.0+\n+ */\n+\n+#include <common.h>\n+#include <command.h>\n+#include <console.h>\n+#include <g_dnl.h>\n+#include <usb.h>\n+#include <asm/arch/f_rockusb.h>\n+\n+static int do_rockusb(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])\n+{\n+\tint controller_index, dev_index;\n+\tchar *usb_controller;\n+\tchar *devtype;\n+\tchar *devnum;\n+\tint ret;\n+\n+\tif (argc < 2)\n+\t\treturn CMD_RET_USAGE;\n+\n+\tusb_controller = argv[1];\n+\tcontroller_index = simple_strtoul(usb_controller, NULL, 0);\n+\n+\tif (argc >= 4) {\n+\t\tdevtype = argv[2];\n+\t\tdevnum  = argv[3];\n+\t} else {\n+\t\treturn CMD_RET_USAGE;\n+\t}\n+\tdev_index = simple_strtoul(devnum, NULL, 0);\n+\trockusb_dev_init(devtype, dev_index);\n+\n+\tret = board_usb_init(controller_index, USB_INIT_DEVICE);\n+\tif (ret) {\n+\t\terror(\"USB init failed: %d\", ret);\n+\t\treturn CMD_RET_FAILURE;\n+\t}\n+\n+\tg_dnl_clear_detach();\n+\tret = g_dnl_register(\"usb_dnl_rockusb\");\n+\tif (ret)\n+\t\treturn CMD_RET_FAILURE;\n+\n+\tif (!g_dnl_board_usb_cable_connected()) {\n+\t\tputs(\"\\rUSB cable not detected, Command exit.\\n\");\n+\t\tret = CMD_RET_FAILURE;\n+\t\tgoto exit;\n+\t}\n+\n+\twhile (1) {\n+\t\tif (g_dnl_detach())\n+\t\t\tbreak;\n+\t\tif (ctrlc())\n+\t\t\tbreak;\n+\t\tusb_gadget_handle_interrupts(controller_index);\n+\t}\n+\tret = CMD_RET_SUCCESS;\n+\n+exit:\n+\tg_dnl_unregister();\n+\tg_dnl_clear_detach();\n+\tboard_usb_cleanup(controller_index, USB_INIT_DEVICE);\n+\n+\treturn ret;\n+}\n+\n+U_BOOT_CMD(rockusb, 4, 1, do_rockusb,\n+\t   \"use the rockusb protocol\",\n+\t   \"<USB_controller> <devtype> <dev[:part]>  e.g. rockusb 0 mmc 0\\n\"\n+);\n",
    "prefixes": [
        "U-Boot",
        "V8",
        "2/4"
    ]
}