Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/812711/?format=api
{ "id": 812711, "url": "http://patchwork.ozlabs.org/api/1.2/patches/812711/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20170912073402.2893-1-linus.walleij@linaro.org/", "project": { "id": 42, "url": "http://patchwork.ozlabs.org/api/1.2/projects/42/?format=api", "name": "Linux GPIO development", "link_name": "linux-gpio", "list_id": "linux-gpio.vger.kernel.org", "list_email": "linux-gpio@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170912073402.2893-1-linus.walleij@linaro.org>", "list_archive_url": null, "date": "2017-09-12T07:34:02", "name": "gpio: Clarify consumer stubs use-cases", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "ddc7f27f2d9acb3621a8246dcbd483fac3f35870", "submitter": { "id": 7055, "url": "http://patchwork.ozlabs.org/api/1.2/people/7055/?format=api", "name": "Linus Walleij", "email": "linus.walleij@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20170912073402.2893-1-linus.walleij@linaro.org/mbox/", "series": [ { "id": 2624, "url": "http://patchwork.ozlabs.org/api/1.2/series/2624/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=2624", "date": "2017-09-12T07:34:02", "name": "gpio: Clarify consumer stubs use-cases", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2624/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/812711/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/812711/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-gpio-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@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=linux-gpio-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"PqeCWc5f\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrxPZ2sY2z9s7B\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 17:34:10 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751052AbdILHeJ (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tTue, 12 Sep 2017 03:34:09 -0400", "from mail-lf0-f41.google.com ([209.85.215.41]:35332 \"EHLO\n\tmail-lf0-f41.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751015AbdILHeI (ORCPT\n\t<rfc822; linux-gpio@vger.kernel.org>); Tue, 12 Sep 2017 03:34:08 -0400", "by mail-lf0-f41.google.com with SMTP id d17so24100283lfe.2\n\tfor <linux-gpio@vger.kernel.org>;\n\tTue, 12 Sep 2017 00:34:08 -0700 (PDT)", "from genomnajs.ideon.se ([85.235.10.227])\n\tby smtp.gmail.com with ESMTPSA id\n\tg132sm1918066lfe.13.2017.09.12.00.34.05\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 12 Sep 2017 00:34:05 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=from:to:cc:subject:date:message-id;\n\tbh=7ToOlKPrA1MHzTp+QlHEON+e2txm36LwftiypR469zo=;\n\tb=PqeCWc5fXP7oKqj3GgPFQ7JXLTHzdbeTFYj4jh5qj6FRRBvy1QPMWlq2pip76RscOG\n\tqkBN1Gj1VipjTQ5AM2aICM9g8CBZ87mJg/ZO/O8qYBWGcVe6rFIO8loxr3hHeF77QwJA\n\tuprwrr7bnaR4iStzG3F0VO/JshXVbCDoIAcgw=", "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=7ToOlKPrA1MHzTp+QlHEON+e2txm36LwftiypR469zo=;\n\tb=UGg8uVuMhO2uhLTYGnAY9Gafkpck9GFE04GgDswf7QyKF4YI4fILZVVMlLHAWJC+xr\n\tGZ4/wEmsLbE1rKnW5MJ/SAnploAbvOgzmRV1K2nQDRKk3b1s3Jyxyk4Z+Hx/pVrqLA4v\n\tBjF0gve6fVcVzTxzI/uls0ZMJX7Q4BOCg22F8l3dRaWoCk7EXK6ZVranjEruKNfCfW3k\n\t9HRxFriNLTjcHXDa9UhocVyz4AU1akYfMHNx5RwuXG81JJgrK26WsmoXc/agKpkWzG7y\n\tYh4xKZLENfXw5x+juJ+t64Tz2sXn6t8AcuPPBNbXBiyhpm8CUe6Dk10XEUcXYIc9HeGG\n\tmGDg==", "X-Gm-Message-State": "AHPjjUh5e81Lt5MMH6rpA1gCBxoG8cnmhC3NbwloZB8P9WpBKmCizGcW\n\tcMQOh9Jfg3/E0jHMxvJv2A==", "X-Google-Smtp-Source": "AOwi7QC48JTizuCZSqyu6KDGhNthERbYwDmQmvlWqZeUmcnWHJL4rf3nZIQYUCPORe0M1/jot1T3tw==", "X-Received": "by 10.46.77.141 with SMTP id c13mr5508025ljd.150.1505201646940; \n\tTue, 12 Sep 2017 00:34:06 -0700 (PDT)", "From": "Linus Walleij <linus.walleij@linaro.org>", "To": "linux-gpio@vger.kernel.org", "Cc": "Linus Walleij <linus.walleij@linaro.org>,\n\tFlorian Fainelli <f.fainelli@gmail.com>,\n\tSergei Shtylyov <sergei.shtylyov@cogentembedded.com>,\n\tAndrew Lunn <andrew@lunn.ch>", "Subject": "[PATCH] gpio: Clarify consumer stubs use-cases", "Date": "Tue, 12 Sep 2017 09:34:02 +0200", "Message-Id": "<20170912073402.2893-1-linus.walleij@linaro.org>", "X-Mailer": "git-send-email 2.13.5", "Sender": "linux-gpio-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-gpio.vger.kernel.org>", "X-Mailing-List": "linux-gpio@vger.kernel.org" }, "content": "After discussion we add a few blurbs to clarify how the stubs\nin the consumer API are supposed to be used.\n\nCc: Florian Fainelli <f.fainelli@gmail.com>\nCc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>\nCc: Andrew Lunn <andrew@lunn.ch>\nSigned-off-by: Linus Walleij <linus.walleij@linaro.org>\n---\n Documentation/gpio/consumer.txt | 22 +++++++++++++++++++---\n 1 file changed, 19 insertions(+), 3 deletions(-)", "diff": "diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt\nindex 912568baabb9..ddbfa775a78a 100644\n--- a/Documentation/gpio/consumer.txt\n+++ b/Documentation/gpio/consumer.txt\n@@ -10,14 +10,30 @@ Guidelines for GPIOs consumers\n ==============================\n \n Drivers that can't work without standard GPIO calls should have Kconfig entries\n-that depend on GPIOLIB. The functions that allow a driver to obtain and use\n-GPIOs are available by including the following file:\n+that depend on GPIOLIB or select GPIOLIB. The functions that allow a driver to\n+obtain and use GPIOs are available by including the following file:\n \n \t#include <linux/gpio/consumer.h>\n \n+There are static inline stubs for all functions in the header file in the case\n+where GPIOLIB is disabled. When these stubs are called they will emit\n+warnings. These stubs are used for two use cases:\n+\n+- Simple compile coverage with e.g. COMPILE_TEST - it does not matter that\n+ the current platform does not enable or select GPIOLIB because we are not\n+ going to execute the system anyway.\n+\n+- Truly optional GPIOLIB support - where the driver does not really make use\n+ of the GPIOs on certain compile-time configurations for certain systems, but\n+ will use it under other compile-time configurations. In this case the\n+ consumer must make sure not to call into these functions, or the user will\n+ be met with console warnings that may be perceived as intimidating.\n+\n All the functions that work with the descriptor-based GPIO interface are\n prefixed with gpiod_. The gpio_ prefix is used for the legacy interface. No\n-other function in the kernel should use these prefixes.\n+other function in the kernel should use these prefixes. The use of the legacy\n+functions is strongly discouraged, new code should use <linux/gpio/consumer.h>\n+and descriptors exclusively.\n \n \n Obtaining and Disposing GPIOs\n", "prefixes": [] }