From patchwork Mon Nov 24 13:04:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kachhap X-Patchwork-Id: 5366241 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BA18AC11AC for ; Mon, 24 Nov 2014 13:20:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EDE21203E3 for ; Mon, 24 Nov 2014 13:20:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B56A203E1 for ; Mon, 24 Nov 2014 13:20:56 +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 1XstWq-0003go-7D; Mon, 24 Nov 2014 13:18:08 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XstWf-0003QH-GJ for linux-arm-kernel@lists.infradead.org; Mon, 24 Nov 2014 13:17:58 +0000 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFJ004CEOXCSSD0@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 24 Nov 2014 22:17:36 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id F1.51.18167.0FF23745; Mon, 24 Nov 2014 22:17:36 +0900 (KST) X-AuditID: cbfee690-f79ab6d0000046f7-46-54732ff03f18 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id AA.B5.09430.FEF23745; Mon, 24 Nov 2014 22:17:36 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NFJ00EZLOLG6V60@mmp2.samsung.com>; Mon, 24 Nov 2014 22:17:35 +0900 (KST) From: Amit Daniel Kachhap To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH RFC v2 07/12] PM / Domains: export pm_genpd_lookup_name Date: Mon, 24 Nov 2014 18:34:11 +0530 Message-id: <1416834256-11225-7-git-send-email-amit.daniel@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1416834256-11225-1-git-send-email-amit.daniel@samsung.com> References: <1416833572-6880-1-git-send-email-amit.daniel@samsung.com> <1416834256-11225-1-git-send-email-amit.daniel@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPLMWRmVeSWpSXmKPExsWyRsSkVveDfnGIwZb1/BYNV0Ms5h85x2rx 7NZeJoveBVfZLJ5ufsxksenxNVaLy7vmsFl87j3CaDHj/D4mi0Vbv7BbnDl9idXi8Jt2Vovj a8MdeD02repk87hzbQ+bx6HDHYwem5fUe2y52s7i0bdlFaPH501yAexRXDYpqTmZZalF+nYJ XBk3ltkVbBaoWHa2jamB8S9vFyMnh4SAicT3/e8ZIWwxiQv31rN1MXJxCAksZZR43dHDClN0 79xWJojEdKDEkZ8sIAkhgQlMEm2bikBsNgFjiZ8797N3MXJwiAh4Syy/pghSzyywmklia/sH JpAaYQF3iSUTjoLZLAKqEt2737OB2LxA8Xk938B6JQQUJOZMsgEJcwp4SLw42MIMsbeFUeLS 47msII6EwCV2iZurmxghBglIfJt8iAWiWVZi0w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ggJpCeWpGanphakFsH0MXFwSjUwqhwXLi47 6n25z6Q28nRT3aY3XVcsWFf6nMn+tFhu+3/3nAOxT7JXNyyy5p0U5cpRX6tf3HxQ+0LgJFFm 6SKx0qQP86p5bIKLvpls7vc7VsaaWv/+6DrHAI/k1EDl6/WKUjds3oUbK+3W6ZDc7fJvmcXR kCPejAX3L7/8OXN+gcyMg07mfxKVWIozEg21mIuKEwEUF9HM3AIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141124_051757_677775_CC4D23E7 X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.0 (-----) Cc: devicetree@vger.kernel.org, ulf.hansson@linaro.org, kgene.kim@samsung.com, khilman@kernel.org, pankaj.dubey@samsung.com, linux-pm@vger.kernel.org, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, Amit Daniel Kachhap , geert@linux-m68k.org, s.nawrocki@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 This API may be needed to set the power domain parent/child relationship in the power domain platform driver. The parent relationship is generally set after the child power domain is registered with the power domain subsystem. In this case, pm_genpd_lookup_name API might be useful. Signed-off-by: Amit Daniel Kachhap --- drivers/base/power/domain.c | 3 ++- include/linux/pm_domain.h | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index fb83d4a..b0e1c2f 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -49,7 +49,7 @@ static LIST_HEAD(gpd_list); static DEFINE_MUTEX(gpd_list_lock); -static struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name) +struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name) { struct generic_pm_domain *genpd = NULL, *gpd; @@ -66,6 +66,7 @@ static struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name) mutex_unlock(&gpd_list_lock); return genpd; } +EXPORT_SYMBOL_GPL(pm_genpd_lookup_name); struct generic_pm_domain *dev_to_genpd(struct device *dev) { diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 2e0e06d..aedcec3 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -150,6 +150,8 @@ extern int pm_genpd_name_poweron(const char *domain_name); extern struct dev_power_governor simple_qos_governor; extern struct dev_power_governor pm_domain_always_on_gov; + +extern struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name); #else static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev) @@ -221,6 +223,11 @@ static inline int pm_genpd_name_poweron(const char *domain_name) { return -ENOSYS; } +static inline +struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name) +{ + return NULL; +} #define simple_qos_governor NULL #define pm_domain_always_on_gov NULL #endif