From patchwork Tue Nov 17 22:37:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 56900 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2218583lbb; Tue, 17 Nov 2015 14:39:51 -0800 (PST) X-Received: by 10.68.233.233 with SMTP id tz9mr66105224pbc.15.1447799963433; Tue, 17 Nov 2015 14:39:23 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hx5si60778575pbc.82.2015.11.17.14.39.22; Tue, 17 Nov 2015 14:39:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753455AbbKQWjR (ORCPT + 11 others); Tue, 17 Nov 2015 17:39:17 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35900 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932574AbbKQWjD (ORCPT ); Tue, 17 Nov 2015 17:39:03 -0500 Received: by pacdm15 with SMTP id dm15so22087304pac.3 for ; Tue, 17 Nov 2015 14:39:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MqAuzCKrvQtcGVIKz5OxLgyHCD7+cejEj66YknYlzJc=; b=QX9/SVwdYWHxXQ1OGy8dPJvMRooKv/KVTBc2MGMxNr7yRJhAmc8G7qa+v1fqd8mFNh zY7dbQC86TSOz3G/yRZmCrW29XeBJdwf1g/XIZkrWt1E63/IWncjvAG1n5dsVwEsjDYM 7MJRIz68TvY4//LGFLj1bwZJHV9s68rAMua4Tdbsr3KhRLnk34upMgEQpw8p1TGmdaJq VK3g2/mstMWdD+Pm6O5LOpJ6slqNpl4K5XYY+kbSZlqJS4fHby+hoDjT66p1lnHjv5WP aTrtQQzOrs66YcN6FbKQxtykQYRfA6EPB36cHoWx/YIXkIqvM/Ds3iueyWXWZaWZ1Q2e 7+ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MqAuzCKrvQtcGVIKz5OxLgyHCD7+cejEj66YknYlzJc=; b=K76Kzj+kAUAsF78CYoFFn0X7OmeAv1bEj56V0lr2I0MV524Yj72EEIWgoGnOTZlsUF ee/BEyABe74m98MzzNCauaWtaF4zXqVW0NpafEab1sIJMsCQnsf0HJYTAJCUzB25KyoH iL7KIwQGwPpr8t6rSFYPaXzoZ7PJx+3OfKBw30cID2XXg05K9qFYuvBR7kqwyWN0Xa8q u3LRZzXGtqc+xDnd678zqJpK0ewWuokV7q0VHJmo24zfaqFYM3/jP7UBonn3fA/1nTE2 mY2CJYh2yM14muSxn9Q9vU07aRoOZs79QzvYJx2n5gCeSqc2Fy3970LI6NnOD5+EZmpd yCBw== X-Gm-Message-State: ALoCoQkbAkq9FiHjVXYQ+o5GQ/vww03iRtc/WqcwH56uZcAmmh43+74iIlL/4c3/EAe4y7N+uy0N X-Received: by 10.68.216.36 with SMTP id on4mr67753570pbc.12.1447799942696; Tue, 17 Nov 2015 14:39:02 -0800 (PST) Received: from ubuntu.localdomain ([8.42.77.226]) by smtp.gmail.com with ESMTPSA id hy1sm14875199pbb.63.2015.11.17.14.39.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Nov 2015 14:39:01 -0800 (PST) From: Lina Iyer To: ulf.hansson@linaro.org, khilman@linaro.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: geert@linux-m68k.org, k.kozlowski@samsung.com, msivasub@codeaurora.org, agross@codeaurora.org, sboyd@codeaurora.org, linux-arm-msm@vger.kernel.org, lorenzo.pieralisi@arm.com, ahaslam@baylibre.com, mtitinger@baylibre.com, Lina Iyer , Mark Rutland Subject: [PATCH RFC 22/27] drivers: firmware: PSCI: Export psci_has_ext_power_state() Date: Tue, 17 Nov 2015 15:37:46 -0700 Message-Id: <1447799871-56374-23-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447799871-56374-1-git-send-email-lina.iyer@linaro.org> References: <1447799871-56374-1-git-send-email-lina.iyer@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Export psci_has_ext_power_state() to allow PSCI layers to determine and pass the correct state id in the format supported. Cc: Lorenzo Pieralisi Cc: Mark Rutland Signed-off-by: Lina Iyer --- drivers/firmware/psci.c | 2 +- include/linux/psci.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index d24f35d..3fd42e4 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c @@ -83,7 +83,7 @@ static u32 psci_function_id[PSCI_FN_MAX]; static u32 psci_cpu_suspend_feature; -static inline bool psci_has_ext_power_state(void) +bool psci_has_ext_power_state(void) { return psci_cpu_suspend_feature & PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK; diff --git a/include/linux/psci.h b/include/linux/psci.h index 12c4865..b9afbe2 100644 --- a/include/linux/psci.h +++ b/include/linux/psci.h @@ -23,6 +23,7 @@ bool psci_tos_resident_on(int cpu); bool psci_power_state_loses_context(u32 state); bool psci_power_state_is_valid(u32 state); +bool psci_has_ext_power_state(void); struct psci_operations { int (*cpu_suspend)(u32 state, unsigned long entry_point);