Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/812541/?format=api
{ "id": 812541, "url": "http://patchwork.ozlabs.org/api/patches/812541/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170911181948.11062-1-moritz.fischer@ettus.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": "<20170911181948.11062-1-moritz.fischer@ettus.com>", "list_archive_url": null, "date": "2017-09-11T18:19:48", "name": "[U-Boot,v2] i2c: muxes: pca954x: Add support for GPIO reset line", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "e27264328e7a3ec38219522a2491a4ab025d9937", "submitter": { "id": 65751, "url": "http://patchwork.ozlabs.org/api/people/65751/?format=api", "name": "Moritz Fischer", "email": "moritz.fischer@ettus.com" }, "delegate": { "id": 1691, "url": "http://patchwork.ozlabs.org/api/users/1691/?format=api", "username": "hs", "first_name": "Heiko", "last_name": "Schocher", "email": "hs@denx.de" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170911181948.11062-1-moritz.fischer@ettus.com/mbox/", "series": [ { "id": 2540, "url": "http://patchwork.ozlabs.org/api/series/2540/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=2540", "date": "2017-09-11T18:19:48", "name": "[U-Boot,v2] i2c: muxes: pca954x: Add support for GPIO reset line", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/2540/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/812541/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/812541/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\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ettus-com.20150623.gappssmtp.com\n\theader.i=@ettus-com.20150623.gappssmtp.com\n\theader.b=\"j7XVKfnW\"; dkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrbmG6tfGz9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 04:19:10 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid A1163C21DA4; Mon, 11 Sep 2017 18:19:06 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 4AD8CC21DB1;\n\tMon, 11 Sep 2017 18:19:04 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 65D60C21DB1; Mon, 11 Sep 2017 18:19:02 +0000 (UTC)", "from mail-pg0-f44.google.com (mail-pg0-f44.google.com\n\t[74.125.83.44])\n\tby lists.denx.de (Postfix) with ESMTPS id BB46AC21DA4\n\tfor <u-boot@lists.denx.de>; Mon, 11 Sep 2017 18:19:01 +0000 (UTC)", "by mail-pg0-f44.google.com with SMTP id 188so16679271pgb.2\n\tfor <u-boot@lists.denx.de>; Mon, 11 Sep 2017 11:19:01 -0700 (PDT)", "from localhost (207-114-172-147.static.twtelecom.net.\n\t[207.114.172.147]) by smtp.gmail.com with ESMTPSA id\n\td5sm17767549pfg.26.2017.09.11.11.18.58\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 11 Sep 2017 11:18:58 -0700 (PDT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ettus-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id;\n\tbh=ElL//XZz1R0UjaMi8h+m05P1c8xYflSXjdRqBeCO9Zs=;\n\tb=j7XVKfnWWAsP7LBafDlANVoK+9uYRi9RUK0JH+JG2mtmAtkPexBnLQCIlskOrrXe8V\n\tjB38b3HS6ZKtH2P2uuX+gU+SMjHS9am1VcH178Tffq918pxtbNfd/W6tQHA/GsiQ8Bed\n\tKoHTFkroKvJkR8u/8amjMTQGOP2yaR2Lv9F47PYta9akQalSy7MbxcjBYA08fLTnaEqO\n\trltAAWZvm8jB44+ltfetN2mX+fdmiFzW+dVXZc6N3djqo/Om/nQ8to/i+QNp8UInrB7q\n\tCBt9xkJdtKOfKR1Oh7/hUWfa1oYo8lq/quwQ0Kc9MFm5Ds7D13iGzMIMOBraEhF2lrLs\n\t9FZQ==", "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;\n\tbh=ElL//XZz1R0UjaMi8h+m05P1c8xYflSXjdRqBeCO9Zs=;\n\tb=YjkBC3CmvK4dMXsE0HMe9CfbOYR+hhThS8W7jwfzQ9cBhCetys0vuZ9SODMCPoMfSM\n\t/4r176FH8KEqPO6imAI/18fJiBAmTwvLEVuHwOG+5kHzCP5a2v+I0Qv49o3n/gnARiW6\n\tUeoU+cSKu47byA1tYASc+OsNauG70xtMnBSTZAE6OyUUV/zcWZcU185e/Hu5zk1uF6bT\n\tbPaxPx6ouaLlg8bLgK15Oum6FEUj1hRSnHCzqHYcIJuaKPa9uS7EGbgbXTwxsWStFjXg\n\tQLOwD0iHjrWmYGKqlFK1tOOD4veNBvGYg5i3q4eTK45W3R1Lot7wobhqC/hcyLJ+jSpl\n\tqdGQ==", "X-Gm-Message-State": "AHPjjUg8oN2BN1L2z+GanWseeSiHq9YCQgTgjcndYUd0hCDsxI3Eyb0d\n\tFhZAmoKZntj9/OgTMRkEOg==", "X-Google-Smtp-Source": "ADKCNb78RzEx4LQjJZ+6Eh1M8BYcfcLYBy3Z/S4ABG0g2jY7EFZKSeY5fvTvcY9eWBiATpBzbOjVmg==", "X-Received": "by 10.99.115.26 with SMTP id o26mr12759743pgc.9.1505153939579;\n\tMon, 11 Sep 2017 11:18:59 -0700 (PDT)", "From": "Moritz Fischer <moritz.fischer@ettus.com>", "To": "u-boot@lists.denx.de", "Date": "Mon, 11 Sep 2017 11:19:48 -0700", "Message-Id": "<20170911181948.11062-1-moritz.fischer@ettus.com>", "X-Mailer": "git-send-email 2.14.1", "Cc": "sr@denx.de, mdf@kernel.org", "Subject": "[U-Boot] [PATCH v2] i2c: muxes: pca954x: Add support for GPIO reset\n\tline", "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": "This commit adds support for GPIO reset lines matching the\ncommon linux \"reset-gpios\" devicetree binding.\n\nSigned-off-by: Moritz Fischer <moritz.fischer@ettus.com>\n---\n\nChanges from v1:\n- Simon's feedback on ifdef vs IS_ENABLED()\n\n---\n drivers/i2c/muxes/pca954x.c | 42 +++++++++++++++++++++++++++++++++++++++++-\n 1 file changed, 41 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c\nindex 383f72f552..7dee12166d 100644\n--- a/drivers/i2c/muxes/pca954x.c\n+++ b/drivers/i2c/muxes/pca954x.c\n@@ -1,5 +1,6 @@\n /*\n * Copyright (C) 2015 - 2016 Xilinx, Inc.\n+ * Copyright (C) 2017 National Instruments Corp\n * Written by Michal Simek\n *\n * SPDX-License-Identifier:\tGPL-2.0+\n@@ -9,7 +10,8 @@\n #include <dm.h>\n #include <errno.h>\n #include <i2c.h>\n-#include <asm/gpio.h>\n+\n+#include <asm-generic/gpio.h>\n \n DECLARE_GLOBAL_DATA_PTR;\n \n@@ -30,6 +32,9 @@ struct chip_desc {\n struct pca954x_priv {\n \tu32 addr; /* I2C mux address */\n \tu32 width; /* I2C mux width - number of busses */\n+#ifdef CONFIG_DM_GPIO\n+\tstruct gpio_desc gpio_mux_reset;\n+#endif /* CONFIG_DM_GPIO */\n };\n \n static const struct chip_desc chips[] = {\n@@ -105,10 +110,45 @@ static int pca954x_ofdata_to_platdata(struct udevice *dev)\n \treturn 0;\n }\n \n+static int pca954x_probe(struct udevice *dev)\n+{\n+\tif (IS_ENABLED(CONFIG_DM_GPIO)) {\n+\t\tstruct pca954x_priv *priv = dev_get_priv(dev);\n+\t\tint err;\n+\n+\t\terr = gpio_request_by_name(dev, \"reset-gpios\", 0,\n+\t\t\t\t&priv->gpio_mux_reset, GPIOD_IS_OUT);\n+\n+\t\t/* it's optional so only bail if we get a real error */\n+\t\tif (err && (err != -ENOENT))\n+\t\t\treturn err;\n+\n+\t\t/* dm will take care of polarity */\n+\t\tif (dm_gpio_is_valid(&priv->gpio_mux_reset))\n+\t\t\tdm_gpio_set_value(&priv->gpio_mux_reset, 0);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int pca954x_remove(struct udevice *dev)\n+{\n+\tif (IS_ENABLED(CONFIG_DM_GPIO)) {\n+\t\tstruct pca954x_priv *priv = dev_get_priv(dev);\n+\n+\t\tif (dm_gpio_is_valid(&priv->gpio_mux_reset))\n+\t\t\tdm_gpio_free(dev, &priv->gpio_mux_reset);\n+\t}\n+\n+\treturn 0;\n+}\n+\n U_BOOT_DRIVER(pca954x) = {\n \t.name = \"pca954x\",\n \t.id = UCLASS_I2C_MUX,\n \t.of_match = pca954x_ids,\n+\t.probe = pca954x_probe,\n+\t.remove = pca954x_remove,\n \t.ops = &pca954x_ops,\n \t.ofdata_to_platdata = pca954x_ofdata_to_platdata,\n \t.priv_auto_alloc_size = sizeof(struct pca954x_priv),\n", "prefixes": [ "U-Boot", "v2" ] }