From patchwork Fri Dec 15 15:56:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 122114 Delivered-To: patches@linaro.org Received: by 10.140.22.227 with SMTP id 90csp648030qgn; Fri, 15 Dec 2017 07:56:43 -0800 (PST) X-Received: by 10.46.20.4 with SMTP id u4mr6811832ljd.38.1513353403849; Fri, 15 Dec 2017 07:56:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513353403; cv=none; d=google.com; s=arc-20160816; b=CZ7+zzza+6VQZ/PNmXNUrjOGfm6+eBK8G0LHpQou9gXsCFqhFZR98YcmNuk4unT9EH XD+hS0yB9sIjEYvr9S4ce8k4ABNqEpjmaLXmN7gH6KU1yxc3LICL0THZCEkOmiaNZvkB vh2ikm8/A9G3esxe6Ka+/FhCPFOJMy17B2E2rXgbwLmzff+Vbk9Wzog5nRpwxOD4MmFD K5Yj6b2MAgYNHbkTLeCvK57acxBZd8xh8WJ/MEBnr+FbjTOBxFfYYC8/bFweyQc/n4zU u40aaBGZcbyRqhqEcDyNVH3JXySPK9uu1bvqHzxm+R+OvycWNuACPzegMFDy5m7huGvD 8uIw== 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=D7y85R9SdIAvOScHASfmr8JOfDzmeubQIEuzP15xtKU=; b=fsg8ZXMloJRaZb8najimwSCZq7DH+mxsec77+tV/edfd4eWY/svEFI1jlIJw9xcjCP LJloGAYFcqfYZtpMF11pPKoa23YhFv0WtGyeBAj/mIc+6BJy5vTAJGywv5sVFYsYB2yk J779T6YOMkUW7CA+pHmASgcg2iQ6vC5y8ChD4IB0Rs4Odieteyyney/Vm4TwrQtL1LSR Y0Xz/PBLgsutorDAq7SLKfOUboYRMixmoaeY7dq3XOmvhgeWAi1TeG3GtQ2uWVexeHfe 6d/cBRiPaECD+f4Z32wZFmPDhDVkzAcsew5zOj9DvUl3w7fC7Ymfx9VjdO7AeOvtre1h pZsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DvTkSrNS; 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 f10sor1320719lfa.92.2017.12.15.07.56.43 for (Google Transport Security); Fri, 15 Dec 2017 07:56:43 -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=DvTkSrNS; 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=D7y85R9SdIAvOScHASfmr8JOfDzmeubQIEuzP15xtKU=; b=DvTkSrNSKBGSegBRDddBHv7LhX69doxIVyK3IXgqb1p8+2rN/ZFEvGxgaJb2JeKT4N 4020E80D11pBPVHVZFXd31VRTT3wTndWHuEOgXf5g41ajonxCk2Eh/KNCyl1VeU9fjJp 1XryawGFGD0NxPpt8quN6VmrH7uSBdEl+e/Yk= 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=D7y85R9SdIAvOScHASfmr8JOfDzmeubQIEuzP15xtKU=; b=sNFTrfJdJ+PdjKK7xKpNM2nx3AIAqytuaGYldK4M2+JBYOzbW7B94+7+cIEps7txNg w20M6ammsgFjkhRIiAB/jLOhEm6hFMHL63vTUOd+oZfQEyC751/Ot7LZUxoW10q4W3vw q4bZsJVcvhA8WcPe1z2gILZLcsOgRE0A5wAJi6gEtng/15cV3Rwkos2oT9pBVhujpCkr Or71wDLfThaaV4K5JhhyM6aAmEpGwakDE19RiXVuRPY25zFVb2KusUjisXxySPf4m9vR JJ6wj6LfsyjAMW2E4kk8gZMZEWjJmdQYZiFdj4Z+xvCtvJDsAAbPKy5Cm4ErYq9c/bR+ v5Dg== X-Gm-Message-State: AKGB3mImtm4b9lSiWRWbAdWPQm5Mc9wJ+JwgCqXlKURqOevt3Sj6mogi n8goY336aGt8RP3QNiIbgKJU8xss X-Google-Smtp-Source: ACJfBosJ0symxnIRD2sUtL4Ie+4Q02x/jxKxsNPZULe9GmRttzF58PLObz/de6NuwbCTWrjeqnx/nQ== X-Received: by 10.25.143.194 with SMTP id s63mr6263273lfk.143.1513353403329; Fri, 15 Dec 2017 07:56:43 -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 y15sm1294216lje.10.2017.12.15.07.56.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Dec 2017 07:56:42 -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 0/3] PM / core: Extend behaviour for wakeup paths Date: Fri, 15 Dec 2017 16:56:28 +0100 Message-Id: <1513353391-30806-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 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 (3): 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 drivers/base/power/domain.c | 8 ++++++-- drivers/base/power/main.c | 5 ++++- include/linux/pm.h | 7 +++++++ 3 files changed, 17 insertions(+), 3 deletions(-) -- 2.7.4