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: 7643291 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B99E99F2EC for ; Tue, 17 Nov 2015 22:47:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D395F20459 for ; Tue, 17 Nov 2015 22:47:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1255A20454 for ; Tue, 17 Nov 2015 22:47:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zyp05-00053B-Tb; Tue, 17 Nov 2015 22:45:21 +0000 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZyouF-0005fk-2e for linux-arm-kernel@lists.infradead.org; Tue, 17 Nov 2015 22:39:25 +0000 Received: by pabfh17 with SMTP id fh17so22939075pab.0 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=gOhTqnci54StXjfR9DqzAaxDedpELt37IG3rWiz76nSPDzdZSL15wz7CYOV1XdsBWy 5wXMRe4e/+imydgfZz0eNLH2CEuAihZ60LWDKv7pqvpLZ6W+cnumeZgp9GYS3qGtqU47 61U5z4nG37axqvNwDDL3DomfKi8GudjVawSjpvHIHIDo24/rn6a9z+orrWylkzaempRR lTY8VWlx+YVA9avPRjc7t8HbKML4hQ1HLzAwJWJuHGdWI40Q9hspL5eaF08q/XPa+8bL ae60beGzMCVPda13QXpnOnviSY3DjUmKmK8rSYGO0C4hBfNc7aRUyRioMEzaKJrZk3+w sEuw== X-Gm-Message-State: ALoCoQkXRFAwGzMZ4FaLxMpfTFwO2NfYUouwbcfucpLpodCR5l/hNrxgG4RQnrR1F7qQh2ZUjiT+ 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151117_143919_502759_6DECAB18 X-CRM114-Status: GOOD ( 11.49 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , k.kozlowski@samsung.com, lorenzo.pieralisi@arm.com, ahaslam@baylibre.com, linux-arm-msm@vger.kernel.org, sboyd@codeaurora.org, msivasub@codeaurora.org, geert@linux-m68k.org, Lina Iyer , agross@codeaurora.org, mtitinger@baylibre.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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);