Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp219857pxk; Thu, 24 Sep 2020 04:07:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX2uPOOtSFQAwbiVK0cWv7mnF2hlV7QDo81qyYSEaSjupS1loBfuWwCZlyAzN9NcDl6DTT X-Received: by 2002:a17:906:2818:: with SMTP id r24mr472481ejc.100.1600945667403; Thu, 24 Sep 2020 04:07:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600945667; cv=none; d=google.com; s=arc-20160816; b=Gn9FrYPPdOitqDRtVcrfsDo6DkFitO46N/t2h2QHi2qmodugWlkZ9Sh7jlmQ+mJGrh 3wfYKx8BBPyt5RPIqFvmF0PV9QFUr3mtC2/87POJ+9lYCMqlcdjeZ6XqwQYNo9P1md/H qsVs5+mzh4zyCRdrYZQUI2aopuRkJXo5yxqCk3uSCOMHR8JXOeI4Amw/i6tlHQZ/Ewed YgxLYtjL8k2x/De30a8xwdTq7tU137CsD5/ULTidqwih/h2/EZHgrLwp7nMTJxTEFFgE bgVUzV17oBuX0YwZqV18HqW/heJFNG8cCRaquOJ92XTpKwX68ZviwsiAdpmH5QDDOU5L iOZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=LzyEVfHWmhqp2YeTW1iTgqjO0Sx0b8TSpBv6gZq633w=; b=gssIE+Rtvgyk7n48e6f8p4nzyxRf9LyjB7RE9HgM5OpM+sCZxfiZQuOWeujeNHEZZC Gq81iwEdS3Y0FYwDZqEYPDCel0gqvL719VnW7K+5Ui/Nfh1b7UzRzCwpaCBz/7hH0bHd I4jqihyafadECnONi7zvGBQhyw0zZ3CjjymVGLO+daY4HRp2HVDDu8slT5GlTr49Lk5m lGBlcqawgGr5j/F5JjAEeEdDetmviv+dGKzc7eIUIQjBChzUWqRtcAJC9SIJHcnwy3uw rl9odamHeJUsoPXH2ZaIKKPw9VCyf0ChTNk4JKnK3lwlMgxz3WbDSD6vioK5lrseGvLU 077Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mufSaWhJ; 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 c25si1830560eds.548.2020.09.24.04.07.22; Thu, 24 Sep 2020 04:07:47 -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=mufSaWhJ; 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 S1727441AbgIXLGS (ORCPT + 99 others); Thu, 24 Sep 2020 07:06:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727426AbgIXLGP (ORCPT ); Thu, 24 Sep 2020 07:06:15 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 065C4C0613D3 for ; Thu, 24 Sep 2020 04:06:13 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id d15so3378907lfq.11 for ; Thu, 24 Sep 2020 04:06:13 -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=LzyEVfHWmhqp2YeTW1iTgqjO0Sx0b8TSpBv6gZq633w=; b=mufSaWhJTEpeaZqLGunvZqqHp9vEfBBCJzxEWCpJIHPJWzWi4QefkwK17iHLj/pM7s fo3Q/6tkCYEU1JO1FR8d0Fw1SbQjuYNK7wD1jJbywuEiIMVj1wu0Mng26Fk8TMYlTMB0 ij9xlXAM5BmSstdnt4c6W+tgp8uqsCiOftPyb/HBtk14B1VLqILUzVHnIWT+skfcvSUt U8qor5QHgb8M4sS19ELlkfjSP4OJ8fk7aoQwkmaWj9VdJN7KhP6kR53XUzhLzSssLOfs TO42wpmo034sPiyRDcX4NGwSLBrA3zYMOw4IZcHOTu/pGikUUPWXM4fOpxD0Y/ULdQP+ lwew== 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=LzyEVfHWmhqp2YeTW1iTgqjO0Sx0b8TSpBv6gZq633w=; b=keWq1qnkGDi4wMi8aHVrueq9Q/OXAlwlcxD6lU3WchvQQGZVFC2Z4I90VnxsogmdjK ZteUjZWLIQrysR+wq+mUaz9+XHibFmTnalgtt6KIParS6yt8FtnZPuaL/gdxeO3gG9HY n5MqIVnyVC8o+d0jp7L8LnLpcy5bMFEb994QC0nfie9MoUdtl1tslQU1mkYCrFm84smC v9QV+cU9gaKhJsu9XRqWjrUn1L35zV27hg+1Xz67s6UjFXw2FwHstv+oB+V9sTXTpm07 0lWKqB6fq6v+WAdqxpufyDk89ZGKeSYXALQnWyLSfAIt7GzsM9XJZLpdCNTVRKW5zDFU DFvA== X-Gm-Message-State: AOAM531yqZZ/ko0K3iqpQD+vGzSJycCP2u9GokZqldYFchaGFK0ylPXH 4TRqbS9hmD3XTSd2slcmotNUAQ== X-Received: by 2002:ac2:5110:: with SMTP id q16mr102229lfb.561.1600945572287; Thu, 24 Sep 2020 04:06:12 -0700 (PDT) Received: from localhost.localdomain (h-155-4-133-169.NA.cust.bahnhof.se. [155.4.133.169]) by smtp.gmail.com with ESMTPSA id w4sm1762393lfr.139.2020.09.24.04.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Sep 2020 04:06:11 -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 , Ulf Hansson , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/3] PM / Domains: Add power on/off notifiers for genpd Date: Thu, 24 Sep 2020 13:04:46 +0200 Message-Id: <20200924110449.329523-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes in v2: - Improved error handling in patch3. 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 | 187 +++++++++++++++++++++++++++++------- include/linux/pm_domain.h | 19 +++- 2 files changed, 171 insertions(+), 35 deletions(-) -- 2.25.1