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: 7643031 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@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 7E6229F392 for ; Tue, 17 Nov 2015 22:39:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95DE72055C for ; Tue, 17 Nov 2015 22:39:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92E8E20524 for ; Tue, 17 Nov 2015 22:39:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754282AbbKQWjR (ORCPT ); Tue, 17 Nov 2015 17:39:17 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:35900 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932376AbbKQWjD (ORCPT ); Tue, 17 Nov 2015 17:39:03 -0500 Received: by pacdm15 with SMTP id dm15so22087300pac.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=G26d6QrbT6BoB91M7MIEYDvo+Yi5MHq4xSp5Z972Bi9hMorIyjGFp7m+2Yrsly3Yt8 +LkBAtqo02h9O+9RXZOz7Fjer+McoW7CikNUZcZgOmludgIHISKkWwn6mkFe0xMaicyx EsSwMISuh7XYuLXnvX41FWE/69edzqk1KkRCGGA210l0VXfOx345NrOl+eFjmRIs21Dc HhsPv3+1KfNyzHAYJirI1Lte6Q77MtJIOMWJXxwgj/d09LtfAd1h5GWBFtgZCuQib0+l VFmb53/POeW5B7jI/vdYuWUhijH48l4e3QoCJGVbW/YOkDJTiQCiiitrp69XBqC+Q7rY Gbag== X-Gm-Message-State: ALoCoQk9hh6+O+LrBjgQc2WBERooDWqlvWcBDv/nQS/c7rbOTYky1eFX11QEUokVZNrGvHts9Bc1 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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);