get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 423369,
    "url": "http://patchwork.ozlabs.org/api/patches/423369/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openwrt/patch/88b758def5e2f98565e104e9ff1432d8bb@vittgam.net/",
    "project": {
        "id": 45,
        "url": "http://patchwork.ozlabs.org/api/projects/45/?format=api",
        "name": "OpenWrt development",
        "link_name": "openwrt",
        "list_id": "openwrt-devel.lists.openwrt.org",
        "list_email": "openwrt-devel@lists.openwrt.org",
        "web_url": "http://openwrt.org/",
        "scm_url": "git://git.openwrt.org/openwrt.git",
        "webscm_url": "https://dev.openwrt.org/browser",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<88b758def5e2f98565e104e9ff1432d8bb@vittgam.net>",
    "list_archive_url": null,
    "date": "2014-12-22T11:48:12",
    "name": "[OpenWrt-Devel,BB] Backport: Fix LED definitions for the DRAGINO2 board",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "492e5ce9a5342b11500cbd8e7680a9d7f61d8328",
    "submitter": {
        "id": 65409,
        "url": "http://patchwork.ozlabs.org/api/people/65409/?format=api",
        "name": "Vittorio Gambaletta",
        "email": "openwrt@vittgam.net"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openwrt/patch/88b758def5e2f98565e104e9ff1432d8bb@vittgam.net/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/423369/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/423369/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<openwrt-devel-bounces@lists.openwrt.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Received": [
            "from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176])\n\t(using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 79F3114007D\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 22 Dec 2014 22:49:39 +1100 (AEDT)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 26B0A28BD30;\n\tMon, 22 Dec 2014 12:47:37 +0100 (CET)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 356A228433F\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tMon, 22 Dec 2014 12:47:30 +0100 (CET)",
            "from mail.vittgam.net (server1.vittgam.net [213.239.197.142])\n\tby arrakis.dune.hu (Postfix) with ESMTPS\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tMon, 22 Dec 2014 12:47:28 +0100 (CET)",
            "from mail2.vittgam.net ([10.48.0.5])\n\tby mail.vittgam.net (8.14.4/8.14.4/Debian-2ubuntu2) with ESMTP id\n\tsBMBnK8Q049775\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);\n\tMon, 22 Dec 2014 12:49:21 +0100",
            "from VittGamLaptop2 (VittGamLaptop2.router1net.VittGam.net\n\t[10.48.3.146])\n\tby mail2.vittgam.net (8.14.4/8.14.4/Debian-2ubuntu2) with SMTP id\n\tsBMBmCC1026430; Mon, 22 Dec 2014 12:48:34 +0100"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID,\n\tT_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2",
        "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 CL_IP_EQ_FROM_MX=-3.1; rate: -7.6",
        "X-DKIM": "OpenDKIM Filter v2.4.2 mail.vittgam.net sBMBnK8Q049775",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=vittgam.net;\n\ts=20110809; t=1419248961;\n\tbh=IOj64s3jsdnO/kCCtqgLg02sIe1jVpoD+qGGDC11kUw=;\n\th=Date:Content-Type:MIME-Version:Subject:From:Message-Id:To;\n\tb=SqTDHJKj+gKuTTSgQ8O5mRQ9+HZr5my079IuxwPL3oiLLSoU1xYili7ePAoUI+iei\n\thm03xq9PX6jeUp0743Kh+8m4MGBY6Tb+PkVp+PawLrUXndUcoq/unx2QXfAlEFlQsD\n\tUHRP/X5mgZXra5+x3iwjUdLpgdL1vLd+9hUoEwfU=",
        "Date": "Mon, 22 Dec 2014 12:48:12 +0100",
        "MIME-Version": "1.0",
        "From": "Vittorio Gambaletta <openwrt@vittgam.net>",
        "Message-Id": "<88b758def5e2f98565e104e9ff1432d8bb@vittgam.net>",
        "To": "<openwrt-devel@lists.openwrt.org>",
        "Subject": "[OpenWrt-Devel] [BB] Backport: Fix LED definitions for the DRAGINO2\n\tboard",
        "X-BeenThere": "openwrt-devel@lists.openwrt.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "OpenWrt Development List <openwrt-devel.lists.openwrt.org>",
        "List-Unsubscribe": "<https://lists.openwrt.org/cgi-bin/mailman/options/openwrt-devel>,\n\t<mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.openwrt.org/pipermail/openwrt-devel/>",
        "List-Post": "<mailto:openwrt-devel@lists.openwrt.org>",
        "List-Help": "<mailto:openwrt-devel-request@lists.openwrt.org?subject=help>",
        "List-Subscribe": "<https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel>,\n\t<mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "openwrt-devel-bounces@lists.openwrt.org",
        "Sender": "\"openwrt-devel\" <openwrt-devel-bounces@lists.openwrt.org>"
    },
    "content": "Backport r42897 to Barrier Breaker.\n\nThis patch fixes LED definitions for the DRAGINO2 board.\n\n1. It renames the Router/USB led to System, as it is now marked \"SYS\" on the board.\n2. It gives control of the LAN and WAN leds and some other GPIOs to Linux.\n3. It fixes the active_low property for the LAN and WAN leds.\n4. It sets up WLAN, LAN and WAN leds in the UCI defaults.\n5. It allows usage of the System led by the diag.sh script, so it will be used to indicate boot and failsafe status.\n\nSigned-off-by: Vittorio Gambaletta <openwrt@vittgam.net>",
    "diff": "--- a/target/linux/ar71xx/base-files/etc/diag.sh\n+++ b/target/linux/ar71xx/base-files/etc/diag.sh\n@@ -62,6 +62,9 @@ get_status_led() {\n \tdir-835-a1)\n \t\tstatus_led=\"d-link:amber:power\"\n \t\t;;\n+\tdragino2)\n+\t\tstatus_led=\"dragino2:red:system\"\n+\t\t;;\n \teap300v2)\n \t\tstatus_led=\"engenius:blue:power\"\n \t\t;;\n--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds\n+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds\n@@ -65,6 +65,12 @@ db120)\n \tucidef_set_led_usbdev \"usb\" \"USB\" \"db120:green:usb\" \"1-1\"\n \t;;\n \n+dragino2)\n+\tucidef_set_led_wlan \"wlan\" \"WLAN\" \"dragino2:red:wlan\" \"phy0tpt\"\n+\tucidef_set_led_netdev \"lan\" \"LAN\" \"dragino2:red:lan\" \"eth0\"\n+\tucidef_set_led_netdev \"wan\" \"WAN\" \"dragino2:red:wan\" \"eth1\"\n+\t;;\n+\n eap300v2)\n \tucidef_set_led_netdev \"lan\" \"LAN\" \"engenius:blue:lan\" \"eth0\"\n \tucidef_set_led_wlan \"wlan\" \"WLAN\" \"engenius:blue:wlan\" \"phy0tpt\"\n--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dragino2.c\n+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dragino2.c\n@@ -3,6 +3,7 @@\n  *\n  *  Copyright (C) 2011-2012 Gabor Juhos <juhosg@openwrt.org>\n  *  Copyright (C) 2012 Elektra Wagenrad <elektra@villagetelco.org>\n+ *  Copyright (C) 2014 Vittorio Gambaletta <openwrt@vittgam.net>\n  *\n  *  This program is free software; you can redistribute it and/or modify it\n  *  under the terms of the GNU General Public License version 2 as published\n@@ -27,12 +28,12 @@\n #define DRAGINO2_GPIO_LED_WAN\t\t17\n \n /*\n- * The following GPIO is actually named \"Router\" on the board.\n- * However, since the \"Router\" feature is not supported as of yet\n- * we use it to display USB activity.\n+ * The following GPIO is named \"SYS\" on newer revisions of the the board.\n+ * It was previously used to indicate USB activity, even though it was\n+ * named \"Router\".\n  */\n \n-#define DRAGINO2_GPIO_LED_USB\t\t28\n+#define DRAGINO2_GPIO_LED_SYS\t\t28\n #define DRAGINO2_GPIO_BTN_JUMPSTART\t11\n #define DRAGINO2_GPIO_BTN_RESET\t\t12\n \n@@ -46,23 +47,23 @@\n \n static struct gpio_led dragino2_leds_gpio[] __initdata = {\n \t{\n-\t\t.name\t\t= \"dragino2:red:lan\",\n-\t\t.gpio\t\t= DRAGINO2_GPIO_LED_LAN,\n-\t\t.active_low\t= 0,\n-\t},\n-\t{\n \t\t.name\t\t= \"dragino2:red:wlan\",\n \t\t.gpio\t\t= DRAGINO2_GPIO_LED_WLAN,\n \t\t.active_low\t= 0,\n \t},\n-\t\t{\n+\t{\n \t\t.name\t\t= \"dragino2:red:wan\",\n \t\t.gpio\t\t= DRAGINO2_GPIO_LED_WAN,\n-\t\t.active_low\t= 0,\n+\t\t.active_low\t= 1,\n \t},\n \t{\n-\t\t.name\t\t= \"dragino2:red:usb\",\n-\t\t.gpio\t\t= DRAGINO2_GPIO_LED_USB,\n+\t\t.name\t\t= \"dragino2:red:lan\",\n+\t\t.gpio\t\t= DRAGINO2_GPIO_LED_LAN,\n+\t\t.active_low\t= 1,\n+\t},\n+\t{\n+\t\t.name\t\t= \"dragino2:red:system\",\n+\t\t.gpio\t\t= DRAGINO2_GPIO_LED_SYS,\n \t\t.active_low\t= 0,\n \t},\n };\n@@ -99,15 +100,23 @@ static void __init dragino2_common_setup(void)\n \n \tath79_register_mdio(0, 0x0);\n \n-\t/* Enable GPIO15 and GPIO16 and possibly GPIO26 and GPIO27 */\n-\tath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |\n-\t\t\t\t    AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN);\n+\t/* Enable GPIO13, GPIO14, GPIO15, GPIO16 and GPIO17 */\n+\tath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |\n+\t\t\t\t    AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |\n+\t\t\t\t    AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |\n+\t\t\t\t    AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |\n+\t\t\t\t    AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);\n \n-\t/* LAN ports */\n+\t/* LAN port */\n \tath79_register_eth(1);\n \n \t/* WAN port */\n \tath79_register_eth(0);\n+\n+\t/* Enable GPIO26 and GPIO27 */\n+\tath79_reset_wr(AR933X_RESET_REG_BOOTSTRAP,\n+\t\t       ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP) |\n+\t\t       AR933X_BOOTSTRAP_MDIO_GPIO_EN);\n }\n \n static void __init dragino2_setup(void)\n",
    "prefixes": [
        "OpenWrt-Devel",
        "BB"
    ]
}