From patchwork Mon Nov 13 15:46:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 118811 Delivered-To: patches@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1944043qgn; Mon, 13 Nov 2017 07:46:50 -0800 (PST) X-Received: by 10.46.14.25 with SMTP id 25mr3659393ljo.120.1510588010172; Mon, 13 Nov 2017 07:46:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510588010; cv=none; d=google.com; s=arc-20160816; b=KPC8HEzymupeQCrJp65T06wrsozmNF2jm+0y+nKUKfw0BH1ZVnhcS3ZB7u8ovYLW+h l3/YdDbsUckI/SvOgeogzwQNPuWdy0FKevPAK30XTtTI+dpgKdA+shA5d9OKqs7gi86P UTX5zv7Lj0QaGx/X5ZzoQgkVUjIVCWoYAprq6LrmjmWnj0AaBEBPM8tzlJouCnNdTL5v KuISmQB1LZUJrqMtsJ341K7lctdOvd2i7FKg86rwj3ag9E1g1QfFxZGSPnisGQyEkGUt lGvqrkVkqmstE9xCVQUfgi9fGvsHcMrniVQK6cOTPqe7cRes2NwpNVB7qDWHE4zth4iA 2elQ== 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=M/thtECRIOZibZoaFDt48dJwSr8y/DBp0mmPg/nNrWY=; b=NJPLu+vknqw3QT4six88ttoofbQPslfLY32Ac6irY8+VGScMK9+GWJnxt3A8UdSY/q 230nAJjeCr2JGeVrokY5pHS5g3o2Ic/0nit5NkeHFTi0om0b1Z3vWEZqiM9R8qSHu9hO bofS4R+OEqOMrF7Bb/CEyeA/yXFIslUtHEtVZv+Vto54hoP4REcZ0gQ2cPKXSEyNNSst z9mf2W9oLvnRs8Q9ZqsnFX1cCrT8pbW+e59HLfzOCxLK7cQUCRutX/qFdtdLmQ8hb0pA A74Zk6nLPL2FfA51yAtO7iKys8Ssq/EOetkC+5L4I1O0DH6q30UekU9sYMpiCAuZ/DVv gDww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C35l0tFK; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 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-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id h39sor913678lfi.77.2017.11.13.07.46.50 for (Google Transport Security); Mon, 13 Nov 2017 07:46:50 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C35l0tFK; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 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=M/thtECRIOZibZoaFDt48dJwSr8y/DBp0mmPg/nNrWY=; b=C35l0tFKxCotHHYMZuF+0TS5TGWgwiXbzb/D7jaf8CTz5RbewFrFSOo/YMICdP4lyH nS3Q/p6sn+g80TsTV0CBVBcL4pxJhsRFwvxkgUMeBCpK1TV+uVp0C+RKNxRh419IxA69 ROBhNPS8q1dPi38YyvDCTwbHUX5R/na9dWVIc= 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=M/thtECRIOZibZoaFDt48dJwSr8y/DBp0mmPg/nNrWY=; b=X16I3buF8GYmkCmV41QxeoRjOioUPdrEEkkWDACD0Y53mNp5aOvskSvaBKpwk+B02P VFfXzKDSLmegTshTMFZlSc73fQKKBen+AjEqFwLnS9qytW3iC4W+MNcCd4NUps6KyoHT 7Rwezgiyam2xjHbSPZLEk3Btns+jcYcvx03Q3c0WfaTR4ieMeboWcxpExKByOoktlG4W M9kc2j4MJOY70U3f51t/sJVtwwVsn0NZotk9njIKYxHMX2XUCYJaMuz63hw7iZW0bISL WhR/V3DSqVzq78NzFD8kR6bVCliop9Z9hjhjUcowvjOVjpBZwbA+ZsUkn2OE+Suq2/4K hYsA== X-Gm-Message-State: AJaThX66vZw5IfTI1m2HVbWndQOPTbrdhC+EselR0K+2F+DdyNSvhx5n N8CzDL47TpgbL4LmbvySboXdT44S X-Google-Smtp-Source: AGs4zMYEddwsCBVL2DOAPm3WKAJif8h165z0iypCMbPWnnbGU/ulshqZrky0hPxkG0mu62yjU597Dg== X-Received: by 10.25.201.83 with SMTP id z80mr2103251lff.181.1510588009758; Mon, 13 Nov 2017 07:46:49 -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 m26sm177841ljb.61.2017.11.13.07.46.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Nov 2017 07:46:48 -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 , linux-renesas-soc@vger.kernel.org, Ulf Hansson Subject: [PATCH v2 0/3] PM / core: Invent a WAKEUP_POWERED driver flag Date: Mon, 13 Nov 2017 16:46:40 +0100 Message-Id: <1510588003-16650-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 The generic problem this series is trying to solve, is that for some bus types and PM domains, it's not sufficient to only check the return value from device_may_wakeup(), to fully understand how to treat the device during system suspend. One particular case that suffers from this, is the generic PM domain (aka genpd) and that is taken care of in the final change in this series. The special case this series address, is to enable drivers to instruct bus types and PM domains, that the device need to remain in its current power state in case it should be able to generate wakeup signals during system suspend. This is done by an opt-in method, however bus types and PM domains that has additional knowledge about devices' wakeup settings may still override the setting. Geert Uytterhoeven, has been working on some related problems for some Renesas SoCs [1], to be able to properly configure WakeOnLAN, for some ethernet devices/drivers, which are used together with genpd. My intent is that this series enables a solution for those problems. [1] https://www.spinics.net/lists/linux-renesas-soc/msg19319.html Changes in v2: - See change logs for each patch. Ulf Hansson (3): PM / core: Re-factor some code dealing with parents in __device_suspend() PM / core: Add IN_BAND_WAKEUP driver flag PM / Domains: Take wakeup_path_in_band status flag into account Documentation/driver-api/pm/devices.rst | 11 +++++++++++ drivers/base/power/domain.c | 6 ++++-- drivers/base/power/main.c | 35 ++++++++++++++++++++++----------- include/linux/pm.h | 6 ++++++ 4 files changed, 44 insertions(+), 14 deletions(-) -- 2.7.4