From patchwork Fri Dec 29 11:36:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 122925 Delivered-To: patches@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4574540qgn; Fri, 29 Dec 2017 03:37:18 -0800 (PST) X-Received: by 10.25.201.198 with SMTP id z189mr13309866lff.82.1514547438112; Fri, 29 Dec 2017 03:37:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514547438; cv=none; d=google.com; s=arc-20160816; b=U0n6Ri+dK6h9fvOPzjun/ITJ4Zuw4pjrk2gPBHHg+ecv0gUGnUJckJmbVRmq4wmr78 ZttFxyst3tHQ1wsoU13UYeT2KogHLAO0BHdZpLz7Mqyhp9D5C/qkb1tdLjzxzXWjKH8L V7n8D9iQq3Ql8CPZKTCWz2TSf6ip6wV/8rQiSQW5xCf2bSngyPLlfqSpx+JMeMtGFxkP xo/UlKofq2eic4KtpeMHAX7Ld+sytslmJbXXKXEPlZmLcp2frIrAels2vcysDDhWzhvW UBxkQt0bNeBAOzPVULGMhS/7p7f6JXAR/1IYsUmCGRL3juElManj6jr0dsW9O9YWZNWU BU7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=BGn7WOG4wQLnR0OKefKqGVUyCZVjj/hLBuEUg2H9pk4=; b=PHDCf3LgHPORvmQD/1SpiK3nh6MB3QSqGU0MdnuEnJ64SLMkchaOrrh74Mv+KSaEF0 s1MBtWO1JZnJlcqUru1mCKcq42QznKhZamHPYisyScydIoWMdlD9sfpcVJPmXjmqttmF 1T7L1T/XRC4/DAXG95fKSxhwuChP8cR63h24WAnlNgr1LneXn/Ka1Pg5E2J1u3sbwHO0 +a8TW8NDy4gfZC47eyeyz46xn0hUTbrXKkWx5GXnQSnthSwfDKhhd8U71g9GnLXX8p0A 7qh0juxYvysqBA506xKM5kvGXHgWOao5w/+tNtdo5Z+o2qhTrNQgyYG8E+xm06dhhgsr 9q4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ajmEa90w; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id q189sor6208772ljb.6.2017.12.29.03.37.17 for (Google Transport Security); Fri, 29 Dec 2017 03:37:17 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ajmEa90w; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=BGn7WOG4wQLnR0OKefKqGVUyCZVjj/hLBuEUg2H9pk4=; b=ajmEa90wjPAHk2SVobhpOoQaKOeaF+ozaugQQ8KV5a5Dt8JBRc1iDyOpMwiHbk8KcN m2oiB6bgpZR/aYWUauPuqsMDaCCLbpnBfBYgcx9Dwcqbjnrn7aYb/s/OIr6vcDoLmruA wN82d3yjmw6kAeSNgxTef/WB9acgQ9ZtDyx+A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BGn7WOG4wQLnR0OKefKqGVUyCZVjj/hLBuEUg2H9pk4=; b=TjspFU90/JdoMG9KMh+Yy7X2YIam3CtKrI0MXeRTm70uBEWCtZBCDbQlztxurvcLAD jPtkq4y/PqNFFB6IW2Y2WBqM/at8q5p4XCQioa3ynxH9NEE0G3BYoneaMxXR9sUWLolB evusab5jdwmLUIFs13WxtYrM/c3fzS2JLgK21curcRF3pdmtugsJkcTRH8boAora41qK q1rYMyc5IJ/APnTXMgt8STgDwdIG9zabbNtrUUsmEzSxk0bPVPqBlLaBgd22FFtkZjMK xUJZdxsGdrlPE0ioxjnSEA5Jaj7BqH2UuRk8C1yYkHO4H6+fL2Gep52ImP5lB8kWUwXn pcog== X-Gm-Message-State: AKGB3mKePqsnWug8k79gZQXfcX1pmQ5XyTK0kNGeJmZAqdpuYASukyRT A1IuAaP69M2Wj8w4HLL1nyKOp3iK X-Google-Smtp-Source: ACJfBovAp4ZLpDFcHtEKjWuZY9sJzTf2QW2hau76j6754b/iV9suXVluF/yy/EF0dTdQwZIEr6dCDw== X-Received: by 10.46.1.231 with SMTP id f100mr20472863lji.132.1514547437446; Fri, 29 Dec 2017 03:37:17 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-158-174-22-67.NA.cust.bahnhof.se. [158.174.22.67]) by smtp.gmail.com with ESMTPSA id r74sm7280469ljb.28.2017.12.29.03.37.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Dec 2017 03:37:16 -0800 (PST) From: Ulf Hansson To: "Rafael J . Wysocki" , linux-pm@vger.kernel.org Cc: Kevin Hilman , Viresh Kumar , Geert Uytterhoeven , Simon Horman , Niklas Soderlund , Vincent Guittot , linux-renesas-soc@vger.kernel.org, Ulf Hansson Subject: [PATCH v2 0/4] PM / core: Extend behaviour for wakeup paths Date: Fri, 29 Dec 2017 12:36:59 +0100 Message-Id: <1514547423-18965-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 Changes in v2: - Added a new patch at the end to warn about users calling device_wakeup_enable() during any system wide PM phases, suggested by Rafael. - No other changes in the code, but only improved change logs, according to comments from Rafael. Notes for v2: - I am working on a new version of Geert series[2], as to give the complete picture of how the new DPM_FLAG_WAKEUP_PATH can be used. The generic problem this series intends to solve, is that for some PM domains, especially genpd, the current information in the dev->power.wakeup_path, is not sufficient for a PM domain to fully understand how to treat devices in the wakeup path during system suspend. Particularly this applies to resources being consumed by the driver that has configured system wakeup settings for its device. Currently the PM domain lacks information about these consumed resources, which means it may decide to power of their corresponding device and its attached PM domain, while they actually would need to stay powered to allow system wakeup signals to be delivered. Geert Uytterhoeven, has been working on these kind of problems for some Renesas SoCs and there have been lots of discussions around this. After some consideration I have dropped my first attempt [1] on how to address these problems, so here's hopefully a better one. So far I haven't included any patches for dealing with the "OUT_BAND_WAKEUP" thingy, but I suggest we do that in a second separate step, since it's not immediately need to fix the problems for the Renesas SoCs. Geert's Renesas series [2], needs to be re-based on top of this series to make it convert to use the new DPM_FLAG_WAKEUP_PATH flag, which is introduced in this series. That leads to a tree-wise-dependency, so perhaps Rafael can host an immutable branch the Renesas tree can pull in. Let's see. [1] https://www.spinics.net/lists/linux-renesas-soc/msg20122.html [2] https://www.spinics.net/lists/linux-renesas-soc/msg19947.html Ulf Hansson (4): PM / core: Assign the wakeup_path status flag in __device_prepare() PM / core: Add WAKEUP_PATH driver flag PM / Domains: Take WAKEUP_PATH driver flag into account in genpd PM / core: Print warn if device gets enabled as wakeup source during sleep drivers/base/power/domain.c | 8 ++++++-- drivers/base/power/main.c | 9 ++++++++- drivers/base/power/wakeup.c | 4 ++++ include/linux/pm.h | 8 ++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) -- 2.7.4