From patchwork Thu May 31 10:59:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 137356 Delivered-To: patches@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp6441238lji; Thu, 31 May 2018 04:00:06 -0700 (PDT) X-Received: by 2002:a2e:1614:: with SMTP id w20-v6mr5040724ljd.105.1527764406060; Thu, 31 May 2018 04:00:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527764406; cv=none; d=google.com; s=arc-20160816; b=n7YPKyhGbfH44/rWbAGdAqvTMJMddTcAG+WyNhvU+M9V3AFS1BwMVHDfcrB+LBP8eo f4Z3KNXTCKlEOYTfsL9TYheKCnQJdtmZWyhrH/escpRJ/0D8xBsiOpRg7CDCxqU1EakU xGXHZKjgK0U64UHJ3H1mZpKGkMVuNPXeg3xImzmGXlUD9EPwdXEJGPvz2+aqFt6r0Jm+ 8iNS2Ph5LeR9m2uR9qN4pUbiGet/Kff9AnGVNqUa77Oi858zvZ6LKqqmG8T5AvOf7pWr 1ZbYgPI0APXlAoVctR69b7owaled8AFoomuKZimxXI56tqIoJQAF62Yc5Z5ASYwHcZ/L I6KQ== 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=vz+XXG5tw6+v5s0pqnBJYXJCGVokR+uNo49T5ce8ELM=; b=ShG47YsOBcEMiDYLy0ZlquTwV3G+IKDqFqHU5aO5mtgOA+Nh0vJHjgYJZwMJekwHN/ VBpV/V4lpylBi3GQEdyvOEelPpYJZqA3em6QrOboSIYcGz9n3YSLi7TnoOIhMcN9jow2 Xl0iFms8leClBU8XGiJNBVgo0tavMhuHrASXmoa8YyHzqvZtoWIlXnAY+bKxsABrQG8v 925pDqgIb9VTm0SZhxMLeDWHRa4Kb9Q0nRr9lFNN4DkCu6jaWWZyRWJIxgmYaZDvzQha f9kgIgExqVSHAGokj1NayNnjn/2EpRttbt7gtPdrJCncuqVUO0W32FW5/mI6bg9sSOuZ gI2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RBpaDNtH; 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 82-v6sor2743145lje.13.2018.05.31.04.00.06 for (Google Transport Security); Thu, 31 May 2018 04:00:06 -0700 (PDT) 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=RBpaDNtH; 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=vz+XXG5tw6+v5s0pqnBJYXJCGVokR+uNo49T5ce8ELM=; b=RBpaDNtHb8y92Dy/uzkxcQUUOKQsKE/7vni1aZI0YfbrX0hQiM2/ooYpoNBAYzZbgS WplJZXgkArL++h4kqR5qudaL0msuHSuGVgTV0ObrxLZ0F0q3IZNV6f7ZRQehN0pTnnOf iPRoWfrRms1Ybv6tl863zd3orWa8SfzeIOHek= 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=vz+XXG5tw6+v5s0pqnBJYXJCGVokR+uNo49T5ce8ELM=; b=DEvcmDiyMw0WxieGw2sViXrjbXelAC9/aHyNwC7I/E/U87a5bO91xybqYyKRWvus/Q a8AfXHWFzTLE15QDc7Rj0ODJSZsd+8gWCtETstEJGRgzAH0hkIcX6Q8fvkLBcpDR9PsV wkiAFp/A1OnvBkQ2S0rGzBL+ijhw064H9gfmLuzHK/wKM/CuRxb+I/UH5wYL8hkiJb8B hwwMs2ZiIQN0ESLkq1ypyf6lHK4AF7RwDI4ZrEuggbT47TO8t9881qtmJulQ96PfLMYc FGezwcXTQBJgKazQ0PJdKs+XddETFcVKmWLDmg1F60477XWyRkJZu80XfoeBy69UyDj0 FM8Q== X-Gm-Message-State: ALKqPwceBdmcovwr9cAtbYF/6wT8tCVmhQHyXg1WhwjtCGJun+H2x4QY EzAFsm6Po+mlLRaUF1W8CD3QS7Yu X-Google-Smtp-Source: ADUXVKIbPyvw9G/ka8XKaOE6zfLohA30/UJyL3dx1uHpFlOlmj6MY7p4n8hX8Xkh20ipXr+yhyEoog== X-Received: by 2002:a2e:8595:: with SMTP id b21-v6mr4687365lji.131.1527764405853; Thu, 31 May 2018 04:00:05 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id b20-v6sm7454383ljf.51.2018.05.31.04.00.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 May 2018 04:00:04 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , linux-pm@vger.kernel.org Cc: Ulf Hansson , Greg Kroah-Hartman , Jon Hunter , Geert Uytterhoeven , Todor Tomov , Rajendra Nayak , Viresh Kumar , Vincent Guittot , Kevin Hilman , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org Subject: [PATCH v3 0/5] PM / Domains: Add support for multi PM domains per device Date: Thu, 31 May 2018 12:59:54 +0200 Message-Id: <20180531105959.14843-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.0 Changes in v3: - Drop patch 1->4 as they have already been applied. - Collected tags, for tests and reviews. - Minor update to function descriptions in patch 4 (earlier 8) and 5 (earlier9). - Note, because of the minor changes, no history is provided per patch. Changes in v2: - Addressed comments from Geert around DT doc. - Addressed comments from Jon around clarification of how to use this and changes to returned error codes. - Fixed build error in case CONFIG_PM was unset. There are devices that are partitioned across multiple PM domains. Currently these can't be supported well by the available PM infrastructures we have in the kernel. This series is an attempt to address this. One existing case where devices are partitioned across multiple PM domains, is the Nvida Tegra 124/210 X-USB subsystem. A while ago Jon Hunter (Nvidia) sent a series, trying to address these issues, however this is a new approach, while it re-uses the same concepts from DT point of view. The Tegra 124/210 X-USB subsystem contains of a host controller and a device controller. Each controller have its own independent PM domain, but are being partitioned across another shared PM domain for the USB super-speed logic. Currently to make the drivers work, either the related PM domains needs to stay powered on always or the PM domain topology needs to be in-correctly modelled through sub-domains. In both cases PM domains may be powered on while they don't need to be, so in the end this means - wasting power -. As stated above, this series intends to address these problem from a PM infrastructure point of view. More details are available in each changelog. Kind regards Ulf Hansson Ulf Hansson (5): PM / Domains: dt: Allow power-domain property to be a list of specifiers PM / Domains: Don't attach devices in genpd with multi PM domains PM / Domains: Split genpd_dev_pm_attach() PM / Domains: Add support for multi PM domains per device to genpd PM / Domains: Add dev_pm_domain_attach_by_id() to manage multi PM domains .../bindings/power/power_domain.txt | 19 ++- drivers/base/power/common.c | 43 +++++- drivers/base/power/domain.c | 134 +++++++++++++++--- include/linux/pm_domain.h | 15 ++ 4 files changed, 183 insertions(+), 28 deletions(-) -- 2.17.0