get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 814421,
    "url": "http://patchwork.ozlabs.org/api/patches/814421/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/devicetree-bindings/patch/20170915233113.17855-2-fancer.lancer@gmail.com/",
    "project": {
        "id": 37,
        "url": "http://patchwork.ozlabs.org/api/projects/37/?format=api",
        "name": "Devicetree Bindings",
        "link_name": "devicetree-bindings",
        "list_id": "devicetree.vger.kernel.org",
        "list_email": "devicetree@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170915233113.17855-2-fancer.lancer@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-15T23:31:09",
    "name": "[1/5] usb: usb251xb: Add USB2517/i hub support",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "ca6ec51a6f9e8155cffaf4438c225957d0618887",
    "submitter": {
        "id": 70038,
        "url": "http://patchwork.ozlabs.org/api/people/70038/?format=api",
        "name": "Serge Semin",
        "email": "fancer.lancer@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/devicetree-bindings/patch/20170915233113.17855-2-fancer.lancer@gmail.com/mbox/",
    "series": [
        {
            "id": 3398,
            "url": "http://patchwork.ozlabs.org/api/series/3398/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/devicetree-bindings/list/?series=3398",
            "date": "2017-09-15T23:31:08",
            "name": "usb: usb251xb: Add USB2517i hub support and fix some bugs",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/3398/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/814421/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/814421/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<devicetree-owner@vger.kernel.org>",
        "X-Original-To": "incoming-dt@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming-dt@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<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=\"SXAsg3yp\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xvBX141CMz9sPk\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tSat, 16 Sep 2017 09:32:33 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751612AbdIOXb1 (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tFri, 15 Sep 2017 19:31:27 -0400",
            "from mail-lf0-f65.google.com ([209.85.215.65]:35645 \"EHLO\n\tmail-lf0-f65.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751229AbdIOXbZ (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Fri, 15 Sep 2017 19:31:25 -0400",
            "by mail-lf0-f65.google.com with SMTP id c8so1874390lfe.2;\n\tFri, 15 Sep 2017 16:31:24 -0700 (PDT)",
            "from linux.local ([95.79.181.62]) by smtp.gmail.com with ESMTPSA id\n\tb75sm351841lff.38.2017.09.15.16.31.22\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 15 Sep 2017 16:31:22 -0700 (PDT)"
        ],
        "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=Z2YFLFrIxeR0JkrWGgOIF2rXZeYjscIxSRJDT2+Jt5o=;\n\tb=SXAsg3ypaDE17qTMsaBtAEsTpWkc5ju9iK9BRQy7cQyMNYGrGNpsLzNskqeb65MI4W\n\tBO8W0F5PQH7qVQke/poh3gyZjNzBraT87WweChlZfvU2SmdowKQQZag/2ETmXHqqzjZn\n\tOAYXvIUO7JZYKQ50Fkeilmc42fh7+ulD8GwD0j0pdOksME+aHqUWLnppkGUmNvFpvEgj\n\tuLRi6U7QsLMJ1Wxjm0DNUefg5W+A6eLlSc8DNfwURBIz+OA4nlY0GxprnZr0kjhsSqrg\n\t9ApqQX9yF1ujVzsBu+tTkjlxzXxQ74o2DaLM7zssHfg1RpEVxNOuz4mBK0nOD1E9wE2L\n\tAlQw==",
        "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=Z2YFLFrIxeR0JkrWGgOIF2rXZeYjscIxSRJDT2+Jt5o=;\n\tb=a5nqhqKemg1bpaAGec0ib5sZ5yEsPqCctR57uH1O9bQ2KGjA9rvOYja3KIPdbo+fVB\n\tDlbar9AlkzmQ8HNWKF2N41K1yxeEsb+bemXCi9m3cFyKx0ACw4NYEd+FKl+PURn1a2Bo\n\tvY40g3/6DwvpByp/pLa2zx8TMFMaFzxJVD9hp8ChIS8hutYXQd8VHE8bXej5TWEJauwx\n\taRL8LD9AGy0oFHszlQlEi2gW66LdUGNhci66OB12Id+cDtj5sDBOwcAxbiHiyLiUgN6G\n\tKky8KvcM8qnTKPGgdAKzBtEOPCjiUbhHGlDsEEC8cRt+5a1WfaYIZZP+KvhkRqGDNNGl\n\tqM/w==",
        "X-Gm-Message-State": "AHPjjUhPQUPO0uf0hW42tb9MJu943hTod7O3NW3NNX/eczGjsh8kNRrB\n\tN1Ob/9eIZzwiag==",
        "X-Google-Smtp-Source": "AOwi7QA+bFwxSsx85DrfOIfTJkMJX3WOAUa8woyIEpmXEsZClm6MPkbuKT5DPERfD8hgGPO3eo6jtw==",
        "X-Received": "by 10.25.211.205 with SMTP id k196mr1163606lfg.210.1505518283783;\n\tFri, 15 Sep 2017 16:31:23 -0700 (PDT)",
        "From": "Serge Semin <fancer.lancer@gmail.com>",
        "To": "richard.leitner@skidata.com, gregkh@linuxfoundation.org,\n\trobh+dt@kernel.org, mark.rutland@arm.com",
        "Cc": "Sergey.Semin@t-platforms.ru, linux-usb@vger.kernel.org,\n\tdevicetree@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tSerge Semin <fancer.lancer@gmail.com>",
        "Subject": "[PATCH 1/5] usb: usb251xb: Add USB2517/i hub support",
        "Date": "Sat, 16 Sep 2017 02:31:09 +0300",
        "Message-Id": "<20170915233113.17855-2-fancer.lancer@gmail.com>",
        "X-Mailer": "git-send-email 2.12.0",
        "In-Reply-To": "<20170915233113.17855-1-fancer.lancer@gmail.com>",
        "References": "<20170915233113.17855-1-fancer.lancer@gmail.com>",
        "Sender": "devicetree-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<devicetree.vger.kernel.org>",
        "X-Mailing-List": "devicetree@vger.kernel.org"
    },
    "content": "USB2517i hubs are very like USB251xb devices series. They have almost\nthe same configuration registers space except number of ports, led\nconfigurations and lack of battery settings. All these peculiarities\nare reflected in this patch.\n\nSigned-off-by: Serge Semin <fancer.lancer@gmail.com>\n---\n Documentation/devicetree/bindings/usb/usb251xb.txt |  4 +-\n drivers/usb/misc/usb251xb.c                        | 84 +++++++++++++++++++---\n 2 files changed, 78 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt\nindex 3957d4eda..3d84626d3 100644\n--- a/Documentation/devicetree/bindings/usb/usb251xb.txt\n+++ b/Documentation/devicetree/bindings/usb/usb251xb.txt\n@@ -6,7 +6,8 @@ Hi-Speed Controller.\n Required properties :\n  - compatible : Should be \"microchip,usb251xb\" or one of the specific types:\n \t\"microchip,usb2512b\", \"microchip,usb2512bi\", \"microchip,usb2513b\",\n-\t\"microchip,usb2513bi\", \"microchip,usb2514b\", \"microchip,usb2514bi\"\n+\t\"microchip,usb2513bi\", \"microchip,usb2514b\", \"microchip,usb2514bi\",\n+\t\"microchip,usb2517\", \"microchip,usb2517i\"\n  - reset-gpios : Should specify the gpio for hub reset\n  - reg : I2C address on the selected bus (default is <0x2C>)\n \n@@ -36,6 +37,7 @@ Optional properties :\n \tan invalid value is given, the default is used instead.\n  - compound-device : indicate the hub is part of a compound device\n  - port-mapping-mode : enable port mapping mode\n+ - speed-led-mode : led speed indiation mode selection (usb2517 only)\n  - string-support : enable string descriptor support (required for manufacturer,\n \tproduct and serial string configuration)\n  - non-removable-ports : Should specify the ports which have a non-removable\ndiff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c\nindex 91f66d68b..2ef22758c 100644\n--- a/drivers/usb/misc/usb251xb.c\n+++ b/drivers/usb/misc/usb251xb.c\n@@ -38,6 +38,7 @@\n #define USB251XB_DEF_PRODUCT_ID_12\t0x2512 /* USB2512B/12Bi */\n #define USB251XB_DEF_PRODUCT_ID_13\t0x2513 /* USB2513B/13Bi */\n #define USB251XB_DEF_PRODUCT_ID_14\t0x2514 /* USB2514B/14Bi */\n+#define USB251XB_DEF_PRODUCT_ID_17\t0x2517 /* USB2517i */\n \n #define USB251XB_ADDR_DEVICE_ID_LSB\t0x04\n #define USB251XB_ADDR_DEVICE_ID_MSB\t0x05\n@@ -48,7 +49,7 @@\n #define USB251XB_ADDR_CONFIG_DATA_2\t0x07\n #define USB251XB_DEF_CONFIG_DATA_2\t0x20\n #define USB251XB_ADDR_CONFIG_DATA_3\t0x08\n-#define USB251XB_DEF_CONFIG_DATA_3\t0x02\n+#define USB251XB_DEF_CONFIG_DATA_3\t0x00\n \n #define USB251XB_ADDR_NON_REMOVABLE_DEVICES\t0x09\n #define USB251XB_DEF_NON_REMOVABLE_DEVICES\t0x00\n@@ -82,7 +83,7 @@\n \n #define USB251XB_ADDR_PRODUCT_STRING_LEN\t0x14\n #define USB251XB_ADDR_PRODUCT_STRING\t\t0x54\n-#define USB251XB_DEF_PRODUCT_STRING\t\t\"USB251xB/xBi\"\n+#define USB251XB_DEF_PRODUCT_STRING\t\t\"USB251xB/xBi/7i\"\n \n #define USB251XB_ADDR_SERIAL_STRING_LEN\t\t0x15\n #define USB251XB_ADDR_SERIAL_STRING\t\t0x92\n@@ -93,8 +94,10 @@\n \n #define USB251XB_ADDR_BOOST_UP\t0xF6\n #define USB251XB_DEF_BOOST_UP\t0x00\n-#define USB251XB_ADDR_BOOST_X\t0xF8\n-#define USB251XB_DEF_BOOST_X\t0x00\n+#define USB251XB_ADDR_BOOST_57\t0xF8\n+#define USB251XB_DEF_BOOST_57\t0x00\n+#define USB251XB_ADDR_BOOST_14\t0xF8\n+#define USB251XB_DEF_BOOST_14\t0x00\n \n #define USB251XB_ADDR_PORT_SWAP\t0xFA\n #define USB251XB_DEF_PORT_SWAP\t0x00\n@@ -102,7 +105,11 @@\n #define USB251XB_ADDR_PORT_MAP_12\t0xFB\n #define USB251XB_DEF_PORT_MAP_12\t0x00\n #define USB251XB_ADDR_PORT_MAP_34\t0xFC\n-#define USB251XB_DEF_PORT_MAP_34\t0x00 /* USB2513B/i & USB2514B/i only */\n+#define USB251XB_DEF_PORT_MAP_34\t0x00 /* USB251{3B/i,4B/i,7/i} only */\n+#define USB251XB_ADDR_PORT_MAP_56\t0xFD\n+#define USB251XB_DEF_PORT_MAP_56\t0x00 /* USB2517/i only */\n+#define USB251XB_ADDR_PORT_MAP_7\t0xFE\n+#define USB251XB_DEF_PORT_MAP_7\t\t0x00 /* USB2517/i only */\n \n #define USB251XB_ADDR_STATUS_COMMAND\t\t0xFF\n #define USB251XB_STATUS_COMMAND_SMBUS_DOWN\t0x04\n@@ -144,48 +151,88 @@ struct usb251xb {\n \tchar serial[USB251XB_STRING_BUFSIZE];\n \tu8  bat_charge_en;\n \tu8  boost_up;\n-\tu8  boost_x;\n+\tu8  boost_57;\n+\tu8  boost_14;\n \tu8  port_swap;\n \tu8  port_map12;\n \tu8  port_map34;\n+\tu8  port_map56;\n+\tu8  port_map7;\n \tu8  status;\n };\n \n struct usb251xb_data {\n \tu16 product_id;\n+\tu8 port_cnt;\n+\tbool led_support;\n+\tbool bat_support;\n \tchar product_str[USB251XB_STRING_BUFSIZE / 2]; /* ASCII string */\n };\n \n static const struct usb251xb_data usb2512b_data = {\n \t.product_id = 0x2512,\n+\t.port_cnt = 2,\n+\t.led_support = false,\n+\t.bat_support = true,\n \t.product_str = \"USB2512B\",\n };\n \n static const struct usb251xb_data usb2512bi_data = {\n \t.product_id = 0x2512,\n+\t.port_cnt = 2,\n+\t.led_support = false,\n+\t.bat_support = true,\n \t.product_str = \"USB2512Bi\",\n };\n \n static const struct usb251xb_data usb2513b_data = {\n \t.product_id = 0x2513,\n+\t.port_cnt = 3,\n+\t.led_support = false,\n+\t.bat_support = true,\n \t.product_str = \"USB2513B\",\n };\n \n static const struct usb251xb_data usb2513bi_data = {\n \t.product_id = 0x2513,\n+\t.port_cnt = 3,\n+\t.led_support = false,\n+\t.bat_support = true,\n \t.product_str = \"USB2513Bi\",\n };\n \n static const struct usb251xb_data usb2514b_data = {\n \t.product_id = 0x2514,\n+\t.port_cnt = 4,\n+\t.led_support = false,\n+\t.bat_support = true,\n \t.product_str = \"USB2514B\",\n };\n \n static const struct usb251xb_data usb2514bi_data = {\n \t.product_id = 0x2514,\n+\t.port_cnt = 4,\n+\t.led_support = false,\n+\t.bat_support = true,\n \t.product_str = \"USB2514Bi\",\n };\n \n+static const struct usb251xb_data usb2517_data = {\n+\t.product_id = 0x2517,\n+\t.port_cnt = 7,\n+\t.led_support = true,\n+\t.bat_support = false,\n+\t.product_str = \"USB2517\",\n+};\n+\n+static const struct usb251xb_data usb2517i_data = {\n+\t.product_id = 0x2517,\n+\t.port_cnt = 7,\n+\t.led_support = true,\n+\t.bat_support = false,\n+\t.product_str = \"USB2517i\",\n+};\n+\n static void usb251xb_reset(struct usb251xb *hub, int state)\n {\n \tif (!gpio_is_valid(hub->gpio_reset))\n@@ -254,10 +301,13 @@ static int usb251xb_connect(struct usb251xb *hub)\n \t       USB251XB_STRING_BUFSIZE);\n \ti2c_wb[USB251XB_ADDR_BATTERY_CHARGING_ENABLE] = hub->bat_charge_en;\n \ti2c_wb[USB251XB_ADDR_BOOST_UP]          = hub->boost_up;\n-\ti2c_wb[USB251XB_ADDR_BOOST_X]           = hub->boost_x;\n+\ti2c_wb[USB251XB_ADDR_BOOST_57]          = hub->boost_57;\n+\ti2c_wb[USB251XB_ADDR_BOOST_14]          = hub->boost_14;\n \ti2c_wb[USB251XB_ADDR_PORT_SWAP]         = hub->port_swap;\n \ti2c_wb[USB251XB_ADDR_PORT_MAP_12]       = hub->port_map12;\n \ti2c_wb[USB251XB_ADDR_PORT_MAP_34]       = hub->port_map34;\n+\ti2c_wb[USB251XB_ADDR_PORT_MAP_56]       = hub->port_map56;\n+\ti2c_wb[USB251XB_ADDR_PORT_MAP_7]        = hub->port_map7;\n \ti2c_wb[USB251XB_ADDR_STATUS_COMMAND] = USB251XB_STATUS_COMMAND_ATTACH;\n \n \tusb251xb_reset(hub, 1);\n@@ -402,6 +452,9 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,\n \tif (of_get_property(np, \"port-mapping-mode\", NULL))\n \t\thub->conf_data3 |= BIT(3);\n \n+\tif (data->led_support && of_get_property(np, \"speed-led-mode\", NULL))\n+\t\thub->conf_data3 |= BIT(1);\n+\n \tif (of_get_property(np, \"string-support\", NULL))\n \t\thub->conf_data3 |= BIT(0);\n \n@@ -411,8 +464,10 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,\n \t\tfor (i = 0; i < len / sizeof(u32); i++) {\n \t\t\tu32 port = be32_to_cpu(cproperty_u32[i]);\n \n-\t\t\tif ((port >= 1) && (port <= 4))\n+\t\t\tif ((port >= 1) && (port <= data->port_cnt))\n \t\t\t\thub->non_rem_dev |= BIT(port);\n+\t\t\telse\n+\t\t\t\tdev_warn(dev, \"port %u doesn't exist\\n\", port);\n \t\t}\n \t}\n \n@@ -483,10 +538,13 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,\n \thub->max_current_bp = USB251XB_DEF_MAX_CURRENT_BUS;\n \thub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE;\n \thub->boost_up = USB251XB_DEF_BOOST_UP;\n-\thub->boost_x = USB251XB_DEF_BOOST_X;\n+\thub->boost_57 = USB251XB_DEF_BOOST_57;\n+\thub->boost_14 = USB251XB_DEF_BOOST_14;\n \thub->port_swap = USB251XB_DEF_PORT_SWAP;\n \thub->port_map12 = USB251XB_DEF_PORT_MAP_12;\n \thub->port_map34 = USB251XB_DEF_PORT_MAP_34;\n+\thub->port_map56 = USB251XB_DEF_PORT_MAP_56;\n+\thub->port_map7  = USB251XB_DEF_PORT_MAP_7;\n \n \treturn 0;\n }\n@@ -511,6 +569,12 @@ static const struct of_device_id usb251xb_of_match[] = {\n \t\t.compatible = \"microchip,usb2514bi\",\n \t\t.data = &usb2514bi_data,\n \t}, {\n+\t\t.compatible = \"microchip,usb2517\",\n+\t\t.data = &usb2517_data,\n+\t}, {\n+\t\t.compatible = \"microchip,usb2517i\",\n+\t\t.data = &usb2517i_data,\n+\t}, {\n \t\t/* sentinel */\n \t}\n };\n@@ -574,6 +638,8 @@ static const struct i2c_device_id usb251xb_id[] = {\n \t{ \"usb2513bi\", 0 },\n \t{ \"usb2514b\", 0 },\n \t{ \"usb2514bi\", 0 },\n+\t{ \"usb2517\", 0 },\n+\t{ \"usb2517i\", 0 },\n \t{ /* sentinel */ }\n };\n MODULE_DEVICE_TABLE(i2c, usb251xb_id);\n",
    "prefixes": [
        "1/5"
    ]
}