get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 807140,
    "url": "http://patchwork.ozlabs.org/api/patches/807140/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/patch/1504018610-10822-9-git-send-email-ulf.hansson@linaro.org/",
    "project": {
        "id": 35,
        "url": "http://patchwork.ozlabs.org/api/projects/35/?format=api",
        "name": "Linux I2C development",
        "link_name": "linux-i2c",
        "list_id": "linux-i2c.vger.kernel.org",
        "list_email": "linux-i2c@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1504018610-10822-9-git-send-email-ulf.hansson@linaro.org>",
    "list_archive_url": null,
    "date": "2017-08-29T14:56:50",
    "name": "[v3,8/8] i2c: designware: Deploy the runtime PM centric path for system sleep",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "171650bc51ea4a807ee9acae78d5f65fb794b1db",
    "submitter": {
        "id": 21036,
        "url": "http://patchwork.ozlabs.org/api/people/21036/?format=api",
        "name": "Ulf Hansson",
        "email": "ulf.hansson@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-i2c/patch/1504018610-10822-9-git-send-email-ulf.hansson@linaro.org/mbox/",
    "series": [
        {
            "id": 387,
            "url": "http://patchwork.ozlabs.org/api/series/387/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/list/?series=387",
            "date": "2017-08-29T14:56:42",
            "name": "PM / ACPI / i2c: Deploy runtime PM centric path for system sleep",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/387/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/807140/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/807140/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linux-i2c-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-i2c-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"iT6aTupl\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xhWvP4z1bz9t3F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 00:57:21 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754679AbdH2O5U (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tTue, 29 Aug 2017 10:57:20 -0400",
            "from mail-lf0-f50.google.com ([209.85.215.50]:34312 \"EHLO\n\tmail-lf0-f50.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1754682AbdH2O5Q (ORCPT\n\t<rfc822; linux-i2c@vger.kernel.org>); Tue, 29 Aug 2017 10:57:16 -0400",
            "by mail-lf0-f50.google.com with SMTP id d17so14397523lfe.1\n\tfor <linux-i2c@vger.kernel.org>; Tue, 29 Aug 2017 07:57:15 -0700 (PDT)",
            "from localhost.localdomain (h-158-174-22-67.NA.cust.bahnhof.se.\n\t[158.174.22.67]) by smtp.gmail.com with ESMTPSA id\n\ty23sm652454ljd.19.2017.08.29.07.57.12\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 29 Aug 2017 07:57:13 -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:in-reply-to:references;\n\tbh=dKHCfwk+yvoTIcSdGw1fMF7sumRlyzDWX+dmJ6xv8nA=;\n\tb=iT6aTuplL2iyRlieazBXchlzF+X1ufa0/cR1CShpk74PHUEZLeauzU3UF95h1RJmhR\n\tZtbpBzKyOTSGtMVoen/DSCi9fp8kGRaTfnjSitk3CLQGTKAEoEjM+qqUsCoGciOmSbK0\n\tNMF0BK7i19eb6kxvrENllvheVL3n7BENOsp/c=",
        "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=dKHCfwk+yvoTIcSdGw1fMF7sumRlyzDWX+dmJ6xv8nA=;\n\tb=NOQqsQyj5C9NGKNen8QCGn/OBQ6ghv3VsamyL0AXwCRD4ZAYXX3CRPyKI/31lKi965\n\ta4X9IIWOtW0TyVTp8Hc/pSWrrH7TzaSc9/tkFWeY5UrsvTYfr8IKThgm82zfgOQuTZp8\n\tvCFHSCB3iuE3f1cDfpSMo2bR9YRfI/BxW68xsMirVks+zOZy/yno8wDCzyKSgBtcS/NE\n\ti7G49dK8W4PEZHotNz3MY/YLo6Z6h8RR1IO3nFMaURowpE4ZOsF9LJlIlWo64gRsZRdN\n\tsKOhY57x1tCI/MlgJG17hb+aJUAMDreRdvKpe+4PWohZ7zyvhW1NtLXNs2iuzQX7gjWY\n\tpLIg==",
        "X-Gm-Message-State": "AHYfb5gE0yXxiIuwnvXpRwZYHdNe2sEvFaZFXB95inHoZvYMlaj+dr7X\n\t5NSzKqF8FEE+p6XY",
        "X-Received": "by 10.25.21.94 with SMTP id l91mr170588lfi.160.1504018634452;\n\tTue, 29 Aug 2017 07:57:14 -0700 (PDT)",
        "From": "Ulf Hansson <ulf.hansson@linaro.org>",
        "To": "Wolfram Sang <wsa@the-dreams.de>,\n\t\"Rafael J . Wysocki\" <rjw@rjwysocki.net>,\n\tLen Brown <lenb@kernel.org>, linux-acpi@vger.kernel.org,\n\tlinux-pm@vger.kernel.org",
        "Cc": "Kevin Hilman <khilman@kernel.org>,\n\tJarkko Nikula <jarkko.nikula@linux.intel.com>,\n\tAndy Shevchenko <andriy.shevchenko@linux.intel.com>,\n\tMika Westerberg <mika.westerberg@linux.intel.com>,\n\tJisheng Zhang <jszhang@marvell.com>,\n\tJohn Stultz <john.stultz@linaro.org>, Guodong Xu <guodong.xu@linaro.org>,\n\tSumit Semwal <sumit.semwal@linaro.org>,\n\tHaojian Zhuang <haojian.zhuang@linaro.org>,\n\tJohannes Stezenbach <js@sig21.net>,\n\tlinux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org,\n\tUlf Hansson <ulf.hansson@linaro.org>",
        "Subject": "[PATCH v3 8/8] i2c: designware: Deploy the runtime PM centric path\n\tfor system sleep",
        "Date": "Tue, 29 Aug 2017 16:56:50 +0200",
        "Message-Id": "<1504018610-10822-9-git-send-email-ulf.hansson@linaro.org>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1504018610-10822-1-git-send-email-ulf.hansson@linaro.org>",
        "References": "<1504018610-10822-1-git-send-email-ulf.hansson@linaro.org>",
        "Sender": "linux-i2c-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<linux-i2c.vger.kernel.org>",
        "X-Mailing-List": "linux-i2c@vger.kernel.org"
    },
    "content": "Currently the device is runtime resumed in the i2c-dw-plat driver's\n->suspend() callback, which is needed to manage system sleep properly.\n\nThe particular reason for the runtime resume is because the PM core may\nunset the direct_complete flag for a parent device, in case its child\ndevice are being system suspended before. This leads to that the\ni2c-dw-plat driver's ->suspend() callback can be invoked when the device is\nruntime suspended.\n\nRuntime resuming the device in this scenario may be unnecessary, in case\nwhen the device is already in its proper lower power state for system\nsleep. This behaviour increases the time it takes to put the device into\nlow power state, but means also a waste of power.\n\nLet's fix the behaviour by deploying the runtime PM centric path for system\nsleep, via assigning the pm_runtime_force_suspend|resume() helpers as the\nsystem sleep callbacks for the i2c-dw-plat driver. We must also inform the\nPM core and the ACPI PM domain that we are now using the runtime PM centric\npath, therefore we call dev_pm_use_rpm_sleep() during ->probe().\n\nWhile deploying the runtime PM centric path, the ->prepare() callback\nbecomes redundant, so let's drop it.\n\nAlong with these improvements, of course we also get the other regular\nbenefits one get when deploying the runtime PM centric path.\n\nSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>\n---\n\nChanges in v3:\n\t- Use dev_pm_use_rpm_sleep() instead of the earlier\n\tacpi_disable_direct_complete() from v2.\n\t- Updated changelog.\n\n---\n drivers/i2c/busses/i2c-designware-platdrv.c | 26 +++++---------------------\n 1 file changed, 5 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c\nindex 38121c9..20db3c2 100644\n--- a/drivers/i2c/busses/i2c-designware-platdrv.c\n+++ b/drivers/i2c/busses/i2c-designware-platdrv.c\n@@ -371,6 +371,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)\n \tif (ret)\n \t\tgoto exit_probe;\n \n+\tdev_pm_use_rpm_sleep(&pdev->dev);\n \treturn ret;\n \n exit_probe:\n@@ -412,15 +413,6 @@ static const struct of_device_id dw_i2c_of_match[] = {\n MODULE_DEVICE_TABLE(of, dw_i2c_of_match);\n #endif\n \n-#ifdef CONFIG_PM_SLEEP\n-static int dw_i2c_plat_prepare(struct device *dev)\n-{\n-\treturn pm_runtime_suspended(dev);\n-}\n-#else\n-#define dw_i2c_plat_prepare\tNULL\n-#endif\n-\n #ifdef CONFIG_PM\n static int dw_i2c_plat_runtime_suspend(struct device *dev)\n {\n@@ -433,7 +425,7 @@ static int dw_i2c_plat_runtime_suspend(struct device *dev)\n \treturn 0;\n }\n \n-static int dw_i2c_plat_resume(struct device *dev)\n+static int dw_i2c_plat_runtime_resume(struct device *dev)\n {\n \tstruct platform_device *pdev = to_platform_device(dev);\n \tstruct dw_i2c_dev *i_dev = platform_get_drvdata(pdev);\n@@ -444,19 +436,11 @@ static int dw_i2c_plat_resume(struct device *dev)\n \treturn 0;\n }\n \n-#ifdef CONFIG_PM_SLEEP\n-static int dw_i2c_plat_suspend(struct device *dev)\n-{\n-\tpm_runtime_resume(dev);\n-\treturn dw_i2c_plat_runtime_suspend(dev);\n-}\n-#endif\n-\n static const struct dev_pm_ops dw_i2c_dev_pm_ops = {\n-\t.prepare = dw_i2c_plat_prepare,\n-\tSET_SYSTEM_SLEEP_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume)\n+\tSET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,\n+\t\t\t\t     pm_runtime_force_resume)\n \tSET_RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend,\n-\t\t\t   dw_i2c_plat_resume,\n+\t\t\t   dw_i2c_plat_runtime_resume,\n \t\t\t   NULL)\n };\n \n",
    "prefixes": [
        "v3",
        "8/8"
    ]
}