get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1005889,
    "url": "http://patchwork.ozlabs.org/api/patches/1005889/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1543597332-27719-1-git-send-email-meenakshi.aggarwal@nxp.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": "<1543597332-27719-1-git-send-email-meenakshi.aggarwal@nxp.com>",
    "list_archive_url": null,
    "date": "2018-11-30T17:02:11",
    "name": "[U-Boot,1/2] armv8: emc2305: add support for fan controller",
    "commit_ref": "e088e587eda7a8813c977ddee84207ca728f87c5",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c46e4cb1aeac14d24aea6f09841cd7c09cb21b99",
    "submitter": {
        "id": 75448,
        "url": "http://patchwork.ozlabs.org/api/people/75448/?format=api",
        "name": "Meenakshi Aggarwal",
        "email": "meenakshi.aggarwal@nxp.com"
    },
    "delegate": {
        "id": 2467,
        "url": "http://patchwork.ozlabs.org/api/users/2467/?format=api",
        "username": "prabhu_kush",
        "first_name": "Prabhakar",
        "last_name": "Kushwaha",
        "email": "prabhakar@freescale.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1543597332-27719-1-git-send-email-meenakshi.aggarwal@nxp.com/mbox/",
    "series": [
        {
            "id": 79004,
            "url": "http://patchwork.ozlabs.org/api/series/79004/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=79004",
            "date": "2018-11-30T17:02:11",
            "name": "[U-Boot,1/2] armv8: emc2305: add support for fan controller",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/79004/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1005889/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1005889/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\tdmarc=fail (p=none dis=none) header.from=nxp.com"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 435sJx0zt8z9s3Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 30 Nov 2018 22:16:17 +1100 (AEDT)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid D2AFCC2244F; Fri, 30 Nov 2018 11:16:10 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 41168C21EFB;\n\tFri, 30 Nov 2018 11:16:07 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 238ADC21F47; Fri, 30 Nov 2018 11:16:06 +0000 (UTC)",
            "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n\tby lists.denx.de (Postfix) with ESMTPS id B33F1C21EFB\n\tfor <u-boot@lists.denx.de>; Fri, 30 Nov 2018 11:16:05 +0000 (UTC)",
            "from inva020.nxp.com (localhost [127.0.0.1])\n\tby inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E7C211A04EA;\n\tFri, 30 Nov 2018 12:16:04 +0100 (CET)",
            "from inv0113.in-blr01.nxp.com (inv0113.in-blr01.nxp.com\n\t[165.114.116.118])\n\tby inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id B853A1A04E5;\n\tFri, 30 Nov 2018 12:16:04 +0100 (CET)",
            "from uefi-OptiPlex-790.ap.freescale.net\n\t(uefi-OptiPlex-790.ap.freescale.net [10.232.132.78])\n\tby inv0113.in-blr01.nxp.com (Postfix) with ESMTP id D99C334F;\n\tFri, 30 Nov 2018 16:46:03 +0530 (IST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de",
        "X-Spam-Level": "**",
        "X-Spam-Status": "No, score=2.4 required=5.0 tests=DATE_IN_FUTURE_03_06\n\tautolearn=no autolearn_force=no version=3.4.0",
        "From": "Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>",
        "To": "u-boot@lists.denx.de,\n\tyork.sun@nxp.com",
        "Date": "Fri, 30 Nov 2018 22:32:11 +0530",
        "Message-Id": "<1543597332-27719-1-git-send-email-meenakshi.aggarwal@nxp.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[U-Boot] [PATCH 1/2] armv8: emc2305: add support for fan controller",
        "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": "Add support for fan controller emc2305.\n\nSigned-off-by: Sriram Dash <sriram.dash@nxp.com>\nSigned-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>\n---\n arch/arm/cpu/armv8/fsl-layerscape/Kconfig |  6 +++++\n board/freescale/common/Makefile           |  2 ++\n board/freescale/common/emc2305.c          | 41 +++++++++++++++++++++++++++++++\n board/freescale/common/emc2305.h          | 23 +++++++++++++++++\n 4 files changed, 72 insertions(+)\n create mode 100644 board/freescale/common/emc2305.c\n create mode 100644 board/freescale/common/emc2305.h",
    "diff": "diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig\nindex 5dba2af..b0e779d 100644\n--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig\n+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig\n@@ -346,6 +346,12 @@ config MAX_CPUS\n \t  cores, count the reserved ports. This will allocate enough memory\n \t  in spin table to properly handle all cores.\n \n+config EMC2305\n+\tbool \"Fan controller\"\n+\thelp\n+\t Enable the EMC2305 fan controller for configuration of fan\n+\t speed.\n+\n config SECURE_BOOT\n \tbool \"Secure Boot\"\n \thelp\ndiff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile\nindex e3c5eae..a9d61a8 100644\n--- a/board/freescale/common/Makefile\n+++ b/board/freescale/common/Makefile\n@@ -64,6 +64,8 @@ obj-$(CONFIG_POWER_MC34VR500)\t+= mc34vr500.o\n \n obj-$(CONFIG_LS102XA_STREAM_ID)\t+= ls102xa_stream_id.o\n \n+obj-$(CONFIG_EMC2305)              += emc2305.o\n+\n # deal with common files for P-series corenet based devices\n obj-$(CONFIG_TARGET_P2041RDB)\t+= p_corenet/\n obj-$(CONFIG_TARGET_P3041DS)\t+= p_corenet/\ndiff --git a/board/freescale/common/emc2305.c b/board/freescale/common/emc2305.c\nnew file mode 100644\nindex 0000000..8523084\n--- /dev/null\n+++ b/board/freescale/common/emc2305.c\n@@ -0,0 +1,41 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/*\n+ * Copyright 2018 NXP.\n+ *\n+ * SPDX-License-Identifier:     GPL-2.0+\n+ */\n+\n+#include <common.h>\n+#include <command.h>\n+#include <i2c.h>\n+#include <asm/io.h>\n+\n+#include \"emc2305.h\"\n+\n+DECLARE_GLOBAL_DATA_PTR;\n+\n+void set_fan_speed(u8 data)\n+{\n+\tu8 index;\n+\tu8 Fan[NUM_OF_FANS] = {I2C_EMC2305_FAN1,\n+\t\t\t       I2C_EMC2305_FAN2,\n+\t\t\t       I2C_EMC2305_FAN3,\n+\t\t\t       I2C_EMC2305_FAN4,\n+\t\t\t       I2C_EMC2305_FAN5};\n+\n+\tfor (index = 0; index < NUM_OF_FANS; index++) {\n+\t\tif (i2c_write(I2C_EMC2305_ADDR, Fan[index], 1, &data, 1) != 0) {\n+\t\t\tprintf(\"Error: failed to change fan speed @%x\\n\",\n+\t\t\t       Fan[index]);\n+\t\t}\n+\t}\n+}\n+\n+void emc2305_init(void)\n+{\n+\tu8 data;\n+\n+\tdata = I2C_EMC2305_CMD;\n+\tif (i2c_write(I2C_EMC2305_ADDR, I2C_EMC2305_CONF, 1, &data, 1) != 0)\n+\t\tprintf(\"Error: failed to configure EMC2305\\n\");\n+}\ndiff --git a/board/freescale/common/emc2305.h b/board/freescale/common/emc2305.h\nnew file mode 100644\nindex 0000000..eddf537\n--- /dev/null\n+++ b/board/freescale/common/emc2305.h\n@@ -0,0 +1,23 @@\n+/* SPDX-License-Identifier: GPL-2.0+ */\n+/*\n+ * Copyright 2018 NXP\n+ *\n+ * SPDX-License-Identifier:     GPL-2.0+\n+ */\n+\n+#ifndef __EMC2305_H_\n+#define __EMC2305_H_\n+\n+#define I2C_EMC2305_CONF\t\t0x20\n+#define I2C_EMC2305_FAN1\t\t0x30\n+#define I2C_EMC2305_FAN2\t\t0x40\n+#define I2C_EMC2305_FAN3\t\t0x50\n+#define I2C_EMC2305_FAN4\t\t0x60\n+#define I2C_EMC2305_FAN5\t\t0x70\n+\n+#define NUM_OF_FANS\t\t\t5\n+\n+void emc2305_init(void);\n+void set_fan_speed(u8 data);\n+\n+#endif  /* __EMC2305_H_ */\n",
    "prefixes": [
        "U-Boot",
        "1/2"
    ]
}