From patchwork Tue Jan 2 16:08:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 123152 Delivered-To: patches@linaro.org Received: by 10.140.22.227 with SMTP id 90csp9132193qgn; Tue, 2 Jan 2018 08:08:59 -0800 (PST) X-Received: by 10.25.209.71 with SMTP id i68mr4714077lfg.39.1514909339164; Tue, 02 Jan 2018 08:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514909339; cv=none; d=google.com; s=arc-20160816; b=pRZ49bVvBDeCOuY2TWEz/udNq2ORHHN2LlkRMguyV93FUlX+TwVmevFYtp2KlSihXX pvO8CfRDL46tSda/qhU/WNAQ+D7X0va0cduwDZ5y3K72ToPQz8JdVJUyzPJD9ViHy2Pe fmKKNO4zPDEiMQ6jfBEV+WwV95Wa1R1gkPkjXLBxbS5h1+Um8XC1NTlP+65/f5QHiRVb lN7Er05YEE8VEjSImwW4RrrMD2tib0TsuhXW3do1X5WdWpv/5983u1r58y0BXJbXAWci KzFZhovcCyb0pg139s3to6N4FyQc41sSj5tNOPQxpxJMYl72nEKlaNHXBDevrG/BQWd4 qTxw== 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=PRo9386qWa8j0FuA9k+ygHTM0hGsBv2TUm96gW91Ovg=; b=iqhm7BxWi/nPvOKO91e6PLJD8szt+wAugvG6BP0zOVjMKFK6MFRPi5PiIjF0++Jjtj Rb97RULIxeErkl1CJysgHjleiSrwRaeao9R6+4strea7utNpFJLbyKS8xEPp3AksXy4l 7aOPIq12W/dNUJpA+ndsNxMWQph9nNfnfwDUcMNu73a2cH6NIPRFFwDRQk/JIUfba9w9 YeljDGfF2UhtkRegfQUWeo6GFHyPsnEwvqVDaKfzzX/TfGZ0AFcvdBEJSbEjMlOdQaeW 797gXhF16omj6cOSuBe37w9hx7NSdXFI73eF9WN0811zNuGLuWTYWOi/Udt4ifykfd1I TAJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bM2kFzMq; 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 h76sor1327140lfe.16.2018.01.02.08.08.58 for (Google Transport Security); Tue, 02 Jan 2018 08:08:59 -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=bM2kFzMq; 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=PRo9386qWa8j0FuA9k+ygHTM0hGsBv2TUm96gW91Ovg=; b=bM2kFzMqO3QsbhxmwcZ6y/5ZqMXeEyNxj70I55KrX8+AgcfCAZdhVdst/7rRGyjS8+ xGGU0fDG2ZqxXfrcXBSr0XLbsU8/20ty5Z8uc8tz5COga+zXDvFbvh3rOnjMDn5s31qR /iyEcoY+jEgQ1s8P1zk6ht3ZjcKrMwvn6BHnA= 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=PRo9386qWa8j0FuA9k+ygHTM0hGsBv2TUm96gW91Ovg=; b=EsdGvjC0RbBOd9HQqVgRowcYKiT8kadFHt6X+TDOVuuLbu8Akk8d4di6dinAazY8tp jprB+c+0is4Lju0trdiICUVicxHhlGAIWorWbs7nXs0ZAxQnwjl73zQDkqPUmafAAjvr dlEshCCkXh7qU983k3wnvRicajKvbn5ngGuZVz7XZ7/xsFk6YYDkUPR0nQ2ox+FwWOQU YqC75nnv8M9sdGTKnNpC2fxX6rcYN8z3DJNBUqrKBtqN+4YYdadYLNDebVq4Rr5owT0Q 6XXqkmQ+R0zij4bRTxUrox1nHY1dgB40i2zo/4DmWJ3fyPum+bRWhc4Xg/7KWYwGFhR8 iOJA== X-Gm-Message-State: AKGB3mK4BZxhbE50t1vjSJ7SQdORmyQdCJx/tfA/1ecKA3XrbJ61CpJR GBftZo2mfX+YpHzxtCZEL4FN0CqW X-Google-Smtp-Source: ACJfBouE7ZQoSlEioTonVLBJ2kwBf33mlCckd3fwsC/vPEQjDIyrZILkHfnTcKqtbtCveNwiTmQrHA== X-Received: by 10.25.28.142 with SMTP id c136mr13281416lfc.40.1514909338631; Tue, 02 Jan 2018 08:08:58 -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 f4sm1619422lfl.17.2018.01.02.08.08.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Jan 2018 08:08:57 -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 v3 0/4] PM / core: Extend behaviour for wakeup paths Date: Tue, 2 Jan 2018 17:08:49 +0100 Message-Id: <1514909333-4450-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 Changes in v3: - Dropped the DPM_FLAG_WAKEUP_PATH, thus re-placed patch 2 and patch 3 with new patches. - Simplified patch4, according to suggestions by Rafael. - No changes to patch1. 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. 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 needed to fix the problems for the Renesas SoCs. Ulf Hansson (4): PM / core: Assign the wakeup_path status flag in __device_prepare() PM / core: Propagate wakeup_path status flag in __device_suspend_late() PM / wakeup: Add device_set_wakeup_path() helper to control wakeup path PM / wakeup: Print warn if device gets enabled as wakeup source during sleep drivers/base/power/main.c | 37 ++++++++++++++++++++----------------- drivers/base/power/wakeup.c | 3 +++ include/linux/pm_wakeup.h | 7 +++++++ 3 files changed, 30 insertions(+), 17 deletions(-) -- 2.7.4