Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp366874pxa; Wed, 19 Aug 2020 03:42:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnzd55VImSaOYm/800CZjXFceL7lA1a1a3FV+Y79ZqpA045Mav8y6beVJEdCUf1wxo8pTb X-Received: by 2002:a17:906:3b83:: with SMTP id u3mr24208225ejf.55.1597833758496; Wed, 19 Aug 2020 03:42:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597833758; cv=none; d=google.com; s=arc-20160816; b=okFjNU5+msDE4s3m4TYRPE14ga2Yw9sV12TrNl38BBNZEzuP/lJ/TLqmFjdqoS5SlQ wHcKgpIsGTJ20Bk7q07jwo2Ii1b8rykFLpkE8WN+Jtec8w7ib1SJd3UYCsEl+PNVnsOs VN+XwDvasGWbmGt3OWh1ZLHMkoxdTsCnb/UEFR+5CUIhFkcM0THq6JAjwBUtDONkdKwx tvNwe+uOqJ5FL86KGcxPfpjuCsXZc64l/+nMFKAEKMZ+YmSR496OkDebHagRrNBVdfMl aPfp+aa/dhgpm5zEJ/aXq08tNN2ZLyzTzjBWV15G4uu1+6VrGgv5sIWYekXVERunxJQY Wt0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=8j9EGJFaSYFS5klbcZOeULgDjTEPoTVPGEbkdeSYqgo=; b=jQrdlBlfVNpY3Z3uYEj21NiXbus0xp+4pWjgGPVzzungI36NUbhjRrdTRuCdmbAtEx ejmIMD5QNbxmQaKHNf2UGX1NSWYVpwBauXYQUn3Z6zPs5GTEyQikk+VuS7iHO4T2Urds 3IDuZaRjX9mo6ck2Vn63JvCXpmKKBCP4a68moFGGQGOV8mcNSJG2otjEEhG0xxzd9M23 bHpWYaHS+5ustmbvfX3t7xQy71grlvCKtXkdQp12LdrQnXW4cy3zGmpBg/dMWwjiGWBD zHqqJUsBeLJKbG7OEY2pk35WaM1rwD9meTuyJTBiOD+S0dHd9dI67JAnH+KHrD8BveXn SMUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="dIjzW/35"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si14913445edv.411.2020.08.19.03.42.14; Wed, 19 Aug 2020 03:42:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="dIjzW/35"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727869AbgHSKle (ORCPT + 99 others); Wed, 19 Aug 2020 06:41:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726782AbgHSKlZ (ORCPT ); Wed, 19 Aug 2020 06:41:25 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC1DDC061342 for ; Wed, 19 Aug 2020 03:41:24 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id m22so24792559ljj.5 for ; Wed, 19 Aug 2020 03:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8j9EGJFaSYFS5klbcZOeULgDjTEPoTVPGEbkdeSYqgo=; b=dIjzW/35yhnRnkFxvUPgMbWqfhAzruk/AqhRBDa2WxPDWwQYDGxGYfUp2HwEpekPS1 AWp6OT3mGiEZP3SLGhcpZOn+gwIUn/+8mk6dvxeY0+8kgMiReWklihQ24BZ52YeU3VI2 /jCyxxG4I/hzppae2+GHiGmr2UOufLHObk28gPDj/9K1PDpoDcIqzV4IvQNEZ34YAAmD ENyVMVvQcsyDxMyjbag4fRSqtylR5Mtr6Db4A8KHpI5lXo5QUcWMf2AyX8cV7wLvAhoi ro0wlCUEntEQgslF8gruZw3+mCQHccuTouSq7ivN9mFwWQhzVDuhLg8Rf1UggKLqrRz8 Cy0A== 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:mime-version :content-transfer-encoding; bh=8j9EGJFaSYFS5klbcZOeULgDjTEPoTVPGEbkdeSYqgo=; b=lHG3oBc5/9YD/xQbsWj6jTcUjl5HzVY3j6HWSr+KXlCmEG49yeuGQZDBhc23WcXZH7 lY5Kh/l7WZOjYO28qsuFw7XPGtrLnUZlJFTE9ViSkv5Kw1bGoWODmBnAgHUhovETvIpx YrrNZr0VNODLDkSEHeS14B1t0hq7XDqs18tr7iKQmIY6YYtV5EFRGTdUQfFq+DkkQbcd BxBe8nJjcBudixQAd+/9ChrZciXzi9vuayXEZVRK3YCvUqCYvrdFi5majj6hw7CEu5GA 2m1KyFex3JfBp5rd+qrA8adnIdh8tt39k1CJ9cFmp1sw18RRM86CfV+S79Sbf1ilpRgA zUAw== X-Gm-Message-State: AOAM530izW8pZjCNPwgQKHCjMceC4f6PP5Ub3oXaHkZRRP5ToRNLRXzd zZDkmLOOHaMs8CT/T8Mngb+NVg== X-Received: by 2002:a2e:898d:: with SMTP id c13mr10887217lji.236.1597833682965; Wed, 19 Aug 2020 03:41:22 -0700 (PDT) Received: from localhost.localdomain (h-98-128-180-79.NA.cust.bahnhof.se. [98.128.180.79]) by smtp.gmail.com with ESMTPSA id y13sm6534822ljd.19.2020.08.19.03.41.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 03:41:21 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Kevin Hilman , linux-pm@vger.kernel.org Cc: Sudeep Holla , Lorenzo Pieralisi , Daniel Lezcano , Lina Iyer , Lukasz Luba , Vincent Guittot , Stephen Boyd , Bjorn Andersson , Benjamin Gaignard , Ulf Hansson , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] PM / Domains: Add power on/off notifiers for genpd Date: Wed, 19 Aug 2020 12:40:54 +0200 Message-Id: <20200819104057.318230-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A device may have specific HW constraints that must be obeyed to, before its corresponding PM domain (genpd) can be powered off - and vice verse at power on. These constraints can't be managed through the regular runtime PM based deployment for a device, because the access pattern for it, isn't always request based. In other words, using the runtime PM callbacks to deal with the constraints doesn't work for these cases. For these reasons, this series introduces a power on/off notification mechanism to genpd. To add/remove a notifier for a device, the device must already have been attached to the genpd, which also means that it needs to be a part of the PM domain topology. The intent is to allow these genpd power on/off notifiers to replace the need for the existing CPU_CLUSTER_PM_ENTER|EXIT notifiers. For example, those would otherwise be needed in psci_pd_power_off() in cpuidle-psci-domain.c, when powering off the CPU cluster. Another series that enables drivers/soc/qcom/rpmh-rsc.c to make use of the new genpd on/off notifiers, are soon to be posted. However, I would appreciate any feedback on the approach taken, even before that series hits LKML. Kind regards Ulf Hansson Ulf Hansson (3): PM / Domains: Rename power state enums for genpd PM / Domains: Allow to abort power off when no ->power_off() callback PM / Domains: Add support for PM domain on/off notifiers for genpd drivers/base/power/domain.c | 178 +++++++++++++++++++++++++++++------- include/linux/pm_domain.h | 19 +++- 2 files changed, 162 insertions(+), 35 deletions(-) -- 2.25.1