get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 110123,
    "url": "http://patchwork.ozlabs.org/api/patches/110123/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1313462214-3716-2-git-send-email-agnel.joel@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": "<1313462214-3716-2-git-send-email-agnel.joel@gmail.com>",
    "list_archive_url": null,
    "date": "2011-08-16T02:36:53",
    "name": "[U-Boot,2/3] BeagleBoard: Added userbutton command",
    "commit_ref": "f835ea7158025818d69384a7ebd8c3de0f10a9f7",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "2860e3e441653206109466c61a3f9b73a9b24e9f",
    "submitter": {
        "id": 8387,
        "url": "http://patchwork.ozlabs.org/api/people/8387/?format=api",
        "name": "Joel Fernandes",
        "email": "agnel.joel@gmail.com"
    },
    "delegate": {
        "id": 1713,
        "url": "http://patchwork.ozlabs.org/api/users/1713/?format=api",
        "username": "spaulraj",
        "first_name": "Sandeep",
        "last_name": "Paulraj",
        "email": "s-paulraj@ti.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1313462214-3716-2-git-send-email-agnel.joel@gmail.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/110123/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/110123/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 E0D94B6F72\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 16 Aug 2011 12:39:02 +1000 (EST)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 2A3CB28083;\n\tTue, 16 Aug 2011 04:39:01 +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 bGnJWcmU32+3; Tue, 16 Aug 2011 04:39:00 +0200 (CEST)",
            "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 1143128084;\n\tTue, 16 Aug 2011 04:38:58 +0200 (CEST)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id B96BD28084\n\tfor <u-boot@lists.denx.de>; Tue, 16 Aug 2011 04:38:56 +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 jnpZwPnvT9Hb for <u-boot@lists.denx.de>;\n\tTue, 16 Aug 2011 04:38:55 +0200 (CEST)",
            "from mail-gy0-f172.google.com (mail-gy0-f172.google.com\n\t[209.85.160.172])\n\tby theia.denx.de (Postfix) with ESMTPS id 95CB128083\n\tfor <u-boot@lists.denx.de>; Tue, 16 Aug 2011 04:38:53 +0200 (CEST)",
            "by gyf3 with SMTP id 3so3319653gyf.3\n\tfor <u-boot@lists.denx.de>; Mon, 15 Aug 2011 19:38:52 -0700 (PDT)",
            "by 10.236.181.4 with SMTP id k4mr5225589yhm.229.1313462332422;\n\tMon, 15 Aug 2011 19:38:52 -0700 (PDT)",
            "from localhost.localdomain\n\t(ip65-46-142-190.z142-46-65.customer.algx.net [65.46.142.190])\n\tby mx.google.com with ESMTPS id r28sm878581yhm.52.2011.08.15.19.37.54\n\t(version=TLSv1/SSLv3 cipher=OTHER);\n\tMon, 15 Aug 2011 19:38:51 -0700 (PDT)"
        ],
        "X-Virus-Scanned": [
            "Debian amavisd-new at theia.denx.de",
            "Debian amavisd-new at theia.denx.de"
        ],
        "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": "Joel A Fernandes <agnel.joel@gmail.com>",
        "To": "u-boot@lists.denx.de",
        "Date": "Mon, 15 Aug 2011 21:36:53 -0500",
        "Message-Id": "<1313462214-3716-2-git-send-email-agnel.joel@gmail.com>",
        "X-Mailer": "git-send-email 1.7.1",
        "In-Reply-To": "<1313462214-3716-1-git-send-email-agnel.joel@gmail.com>",
        "References": "<1313462214-3716-1-git-send-email-agnel.joel@gmail.com>",
        "Cc": "Greg Turner <gregturner@ti.com>, Koen Kooi <koen@dominion.thruhere.net>, \n\tSyed Mohammed Khasim <khasim@ti.com>, k-kooi@ti.com, jdk@ti.com",
        "Subject": "[U-Boot] [PATCH 2/3] BeagleBoard: Added userbutton command",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.9",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<http://lists.denx.de/mailman/listinfo/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>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "u-boot-bounces@lists.denx.de",
        "Errors-To": "u-boot-bounces@lists.denx.de"
    },
    "content": "From: Jason Kridner <jkridner@beagleboard.org>\n\nBased on commit f1099c7c43caf5bac3bf6a65aa266fade4747072\n    Author: Greg Turner <gregturner@ti.com>\n    Date:   Tue May 25 09:19:06 2010 -0500\n\n    New u-boot command for status of USER button on BeagleBoard-xM\n\n         Modified bootcmd to check the staus at boot time and set\n\t filename of the boot script.\n\n* Moved to a BeagleBoard specific file.\n* Removed changes to default boot command from adding userbutton\n  command.\n* Made to handle pre-xM boards.\n* Flipped polarity of the return value to avoid confusion.  Success (0)\n  is when the button is pressed.  Failure (1) is when the button is NOT\n  pressed.\n* Used latest revision getting function.\n* Used latest macros for board revision.\n* Added xM-C revision definition (optional, since it was default)\n* updated default configuration with UserButton functionality\n  * Added a separate bootenv variable to load a user defined .txt file\n  * Added an example, showing how a different environment file can be loaded with\n    the user button pressed\n\nSigned-off-by: Jason Kridner <jkridner@beagleboard.org>\nSigned-off-by: Koen Kooi <koen@dominion.thruhere.net>\nSigned-off-by: Joel A Fernandes <agnel.joel@gmail.com>\nCc: Greg Turner <gregturner@ti.com>\n---\n board/ti/beagle/beagle.c       |   56 ++++++++++++++++++++++++++++++++++++++++\n include/configs/omap3_beagle.h |    7 ++++-\n 2 files changed, 62 insertions(+), 1 deletions(-)",
    "diff": "diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c\nindex a958545..8dc8dfa 100644\n--- a/board/ti/beagle/beagle.c\n+++ b/board/ti/beagle/beagle.c\n@@ -50,6 +50,7 @@ extern struct ehci_hccr *hccr;\n extern volatile struct ehci_hcor *hcor;\n #endif\n #include \"beagle.h\"\n+#include <command.h>\n \n #define pr_debug(fmt, args...) debug(fmt, ##args)\n \n@@ -446,3 +447,58 @@ int ehci_hcd_init(void)\n }\n \n #endif /* CONFIG_USB_EHCI */\n+\n+/*\n+ * This command returns the status of the user button on beagle xM\n+ * Input - none\n+ * Returns - \t1 if button is held down\n+ *\t\t0 if button is not held down\n+ */\n+int do_userbutton (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])\n+{\n+\tint     button = 0;\n+\tint\tgpio;\n+\n+\t/*\n+\t * pass address parameter as argv[0] (aka command name),\n+\t * and all remaining args\n+\t */\n+\tswitch (get_board_revision()) {\n+\tcase REVISION_AXBX:\n+\tcase REVISION_CX:\n+\tcase REVISION_C4:\n+\t\tgpio = 7;\n+\t\tbreak;\n+\tcase REVISION_XM_A:\n+\tcase REVISION_XM_B:\n+\tcase REVISION_XM_C:\n+\tdefault:\n+\t\tgpio = 4;\n+\t\tbreak;\n+\t}\n+\tomap_request_gpio(gpio);\n+\tomap_set_gpio_direction(gpio, 1);\n+\tprintf(\"The user button is currently \");\n+\tif(omap_get_gpio_datain(gpio))\n+\t{\n+\t\tbutton = 1;\n+\t\tprintf(\"PRESSED.\\n\");\n+\t}\n+\telse\n+\t{\n+\t\tbutton = 0;\n+\t\tprintf(\"NOT pressed.\\n\");\n+\t}\n+\n+\tomap_free_gpio(gpio);\n+\n+\treturn !button;\n+}\n+\n+/* -------------------------------------------------------------------- */\n+\n+U_BOOT_CMD(\n+\tuserbutton, CONFIG_SYS_MAXARGS, 1,\tdo_userbutton,\n+\t\"Return the status of the BeagleBoard USER button\",\n+\t\"\"\n+);\ndiff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h\nindex c41d48e..a494f99 100644\n--- a/include/configs/omap3_beagle.h\n+++ b/include/configs/omap3_beagle.h\n@@ -227,7 +227,8 @@\n \t\t\"omapdss.def_disp=${defaultdisplay} \" \\\n \t\t\"root=${nandroot} \" \\\n \t\t\"rootfstype=${nandrootfstype}\\0\" \\\n-\t\"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\\0\" \\\n+\t\"bootenv=uEnv.txt\\0\" \\\n+\t\"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\\0\" \\\n \t\"importbootenv=echo Importing environment from mmc ...; \" \\\n \t\t\"env import -t $loadaddr $filesize\\0\" \\\n \t\"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\\0\" \\\n@@ -241,8 +242,12 @@\n \n #define CONFIG_BOOTCOMMAND \\\n \t\"if mmc rescan ${mmcdev}; then \" \\\n+\t\t\"if userbutton; then \" \\\n+\t\t\t\"setenv bootenv user.txt;\" \\\n+\t\t\"fi;\" \\\n \t\t\"echo SD/MMC found on device ${mmcdev};\" \\\n \t\t\"if run loadbootenv; then \" \\\n+\t\t\t\"echo Loaded environment from ${bootenv};\" \\\n \t\t\t\"run importbootenv;\" \\\n \t\t\"fi;\" \\\n \t\t\"if test -n $uenvcmd; then \" \\\n",
    "prefixes": [
        "U-Boot",
        "2/3"
    ]
}