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: 5366121 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 591859F2F5 for ; Mon, 24 Nov 2014 13:17:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 75F2C203C1 for ; Mon, 24 Nov 2014 13:17:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6C6282034A for ; Mon, 24 Nov 2014 13:17:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753335AbaKXNRj (ORCPT ); Mon, 24 Nov 2014 08:17:39 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:36072 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752603AbaKXNRi (ORCPT ); Mon, 24 Nov 2014 08:17:38 -0500 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>; 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 Cc: kgene.kim@samsung.com, linux-kernel@vger.kernel.org, s.nawrocki@samsung.com, pankaj.dubey@samsung.com, ulf.hansson@linaro.org, khilman@kernel.org, linux-pm@vger.kernel.org, geert@linux-m68k.org, rjw@rjwysocki.net, devicetree@vger.kernel.org, Amit Daniel Kachhap 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 JpAaYQF3iSUTjoLZLAKqEt2737OB2LxA8Xk938B6JQQUJOZMsgEJcwp4SLw42MIM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Nga6ayCwl mpwPTBR5JfGGxibmpsamliYWJmaWSuK8N27mhggJpCeWpGanphakFsH0MXFwSjUwqhwXLi47 6n25z6Q28nRT3aY3XVcsWFf6nMn+tFhu+3/3nAOxT7JXNyyy5p0U5cpRX6tf3HxQ+0LgJFFm 6SKx0qQP86p5bIKLvpls7vc7VsaaWv/+6DrHAI/k1EDl6/WKUjds3oUbK+3W6ZDc7fJvmcXR kCPejAX3L7/8OXN+gcyMg07mfxKVWIozEg21mIuKEwEUF9HM3AIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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