get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 675290,
    "url": "http://patchwork.ozlabs.org/api/patches/675290/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20160926182917.27531-15-paul.burton@imgtec.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": "<20160926182917.27531-15-paul.burton@imgtec.com>",
    "list_archive_url": null,
    "date": "2016-09-26T18:29:08",
    "name": "[U-Boot,14/23] gpio: Provide dummy get/request & is_valid functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "deferred",
    "archived": false,
    "hash": "1967d715220c9c67d1a3665c7c45daa602c1aa56",
    "submitter": {
        "id": 33698,
        "url": "http://patchwork.ozlabs.org/api/people/33698/?format=api",
        "name": "Paul Burton",
        "email": "paul.burton@imgtec.com"
    },
    "delegate": {
        "id": 4307,
        "url": "http://patchwork.ozlabs.org/api/users/4307/?format=api",
        "username": "danielschwierzeck",
        "first_name": "Daniel",
        "last_name": "Schwierzeck",
        "email": "daniel.schwierzeck@googlemail.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20160926182917.27531-15-paul.burton@imgtec.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/675290/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/675290/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",
        "Received": [
            "from theia.denx.de (theia.denx.de [85.214.87.163])\n\tby ozlabs.org (Postfix) with ESMTP id 3sjXf65pjrz9s3T\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 27 Sep 2016 04:33:18 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id A6D78A763D;\n\tMon, 26 Sep 2016 20:33:09 +0200 (CEST)",
            "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id C7Wwp8O3yhUK; Mon, 26 Sep 2016 20:33:09 +0200 (CEST)",
            "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id BF17EA75E6;\n\tMon, 26 Sep 2016 20:33:08 +0200 (CEST)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 4400FA75E6\n\tfor <u-boot@lists.denx.de>; Mon, 26 Sep 2016 20:33:04 +0200 (CEST)",
            "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 6sYKSRnMtINg for <u-boot@lists.denx.de>;\n\tMon, 26 Sep 2016 20:33:04 +0200 (CEST)",
            "from mailapp01.imgtec.com (mailapp02.imgtec.com [217.156.133.132])\n\tby theia.denx.de (Postfix) with ESMTP id 052A4A7636\n\tfor <u-boot@lists.denx.de>; Mon, 26 Sep 2016 20:33:00 +0200 (CEST)",
            "from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19])\n\tby Forcepoint Email with ESMTPS id E6E86EF831E7D;\n\tMon, 26 Sep 2016 19:32:55 +0100 (IST)",
            "from localhost (10.100.200.111) by HHMAIL01.hh.imgtec.org\n\t(10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0;\n\tMon, 26 Sep 2016 19:32:59 +0100"
        ],
        "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)",
        "From": "Paul Burton <paul.burton@imgtec.com>",
        "To": "<u-boot@lists.denx.de>, Daniel Schwierzeck <daniel.schwierzeck@gmail.com>",
        "Date": "Mon, 26 Sep 2016 19:29:08 +0100",
        "Message-ID": "<20160926182917.27531-15-paul.burton@imgtec.com>",
        "X-Mailer": "git-send-email 2.10.0",
        "In-Reply-To": "<20160926182917.27531-1-paul.burton@imgtec.com>",
        "References": "<20160926182917.27531-1-paul.burton@imgtec.com>",
        "MIME-Version": "1.0",
        "X-Originating-IP": "[10.100.200.111]",
        "Subject": "[U-Boot] [PATCH 14/23] gpio: Provide dummy get/request & is_valid\n\tfunctions",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<http://lists.denx.de/mailman/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": "<http://lists.denx.de/mailman/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>"
    },
    "content": "Allow for drivers to make use of driver model GPIOs when they're enabled\n& available without needing to #ifdef on CONFIG_DM_GPIO by providing\ndummy functions covering GPIO requests. Each will simply return -ENODEV\nor -EINVAL, depending upon which the real implementation returns when a\nGPIO isn't found. Only the driver model versions of the GPIO request\nfunctions are covered & dm_gpio_request is excluded since it's\ndocumented as only being of use for debugging, so drivers shouldn't be\ncalling it anyway.\n\nAlso provide a dummy dm_gpio_is_valid, with the idea that all other GPIO\nfunctions called would be within an if (dm_gpio_is_valid(...)) statement\nand have been optimised out in cases where that returns a compile-time\nconstant false.\n\nThis parallels the clock API, keeping the #ifdefs & checks in a single\nlocation allowing drivers or other code to use GPIOs without needing to\nperform such checks themselves.\n\nSigned-off-by: Paul Burton <paul.burton@imgtec.com>\n\n---\n\n include/asm-generic/gpio.h | 38 ++++++++++++++++++++++++++++++++++++++\n 1 file changed, 38 insertions(+)",
    "diff": "diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h\nindex 4aa0004..f6593a7 100644\n--- a/include/asm-generic/gpio.h\n+++ b/include/asm-generic/gpio.h\n@@ -135,6 +135,9 @@ struct gpio_desc {\n  */\n static inline bool dm_gpio_is_valid(const struct gpio_desc *desc)\n {\n+\tif (!IS_ENABLED(CONFIG_DM_GPIO))\n+\t\treturn false;\n+\n \treturn desc->dev != NULL;\n }\n \n@@ -343,7 +346,14 @@ const char *gpio_get_bank_info(struct udevice *dev, int *offset_count);\n  * @desc:\tReturns description, on success\n  * @return 0 if OK, -ve on error\n  */\n+#ifdef CONFIG_DM_GPIO\n int dm_gpio_lookup_name(const char *name, struct gpio_desc *desc);\n+#else\n+static inline int dm_gpio_lookup_name(const char *name, struct gpio_desc *desc)\n+{\n+\treturn -EINVAL;\n+}\n+#endif\n \n /**\n  * gpio_lookup_name - Look up a GPIO name and return its details\n@@ -356,8 +366,17 @@ int dm_gpio_lookup_name(const char *name, struct gpio_desc *desc);\n  * @offsetp: Returns the offset number within this device\n  * @gpiop: Returns the absolute GPIO number, numbered from 0\n  */\n+#ifdef CONFIG_DM_GPIO\n int gpio_lookup_name(const char *name, struct udevice **devp,\n \t\t     unsigned int *offsetp, unsigned int *gpiop);\n+#else\n+static inline int\n+gpio_lookup_name(const char *name, struct udevice **devp,\n+\t\t unsigned int *offsetp, unsigned int *gpiop)\n+{\n+\treturn -EINVAL;\n+}\n+#endif\n \n /**\n  * gpio_get_values_as_int() - Turn the values of a list of GPIOs into an int\n@@ -428,8 +447,17 @@ int gpio_claim_vector(const int *gpio_num_array, const char *fmt);\n  * something wrong with the list, or other -ve for another error (e.g.\n  * -EBUSY if a GPIO was already requested)\n  */\n+#ifdef CONFIG_DM_GPIO\n int gpio_request_by_name(struct udevice *dev, const char *list_name,\n \t\t\t int index, struct gpio_desc *desc, int flags);\n+#else\n+static inline int\n+gpio_request_by_name(struct udevice *dev, const char *list_name,\n+\t\t     int index, struct gpio_desc *desc, int flags)\n+{\n+\treturn -ENOENT;\n+}\n+#endif\n \n /**\n  * gpio_request_list_by_name() - Request a list of GPIOs\n@@ -452,9 +480,19 @@ int gpio_request_by_name(struct udevice *dev, const char *list_name,\n  * @flags:\tIndicates the GPIO input/output settings (GPIOD_...)\n  * @return number of GPIOs requested, or -ve on error\n  */\n+#ifdef CONFIG_DM_GPIO\n int gpio_request_list_by_name(struct udevice *dev, const char *list_name,\n \t\t\t      struct gpio_desc *desc_list, int max_count,\n \t\t\t      int flags);\n+#else\n+static inline int\n+gpio_request_list_by_name(struct udevice *dev, const char *list_name,\n+\t\t\t  struct gpio_desc *desc_list, int max_count,\n+\t\t\t  int flags)\n+{\n+\treturn -ENOENT;\n+}\n+#endif\n \n /**\n  * dm_gpio_request() - manually request a GPIO\n",
    "prefixes": [
        "U-Boot",
        "14/23"
    ]
}