From patchwork Thu Oct 1 19:22:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 7310961 Return-Path: X-Original-To: patchwork-linux-pm@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 2033F9F4DC for ; Thu, 1 Oct 2015 19:23:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E2B1206A2 for ; Thu, 1 Oct 2015 19:23:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 781F5207AE for ; Thu, 1 Oct 2015 19:23:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751336AbbJATXB (ORCPT ); Thu, 1 Oct 2015 15:23:01 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:39813 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753515AbbJATXA (ORCPT ); Thu, 1 Oct 2015 15:23:00 -0400 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 54D811416D1; Thu, 1 Oct 2015 19:22:59 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 24C421416D4; Thu, 1 Oct 2015 19:22:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: 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 Received: from sboyd-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 01A5E1416D1; Thu, 1 Oct 2015 19:22:56 +0000 (UTC) From: Stephen Boyd To: Mike Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Rob Clark , "Rafael J . Wysocki" , Kevin Hilman , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ulf Hansson , Rajendra Nayak Subject: [PATCH v2 2/2] clk: qcom: Make oxili GDSC parent of oxili_cx GDSC Date: Thu, 1 Oct 2015 12:22:54 -0700 Message-Id: <1443727374-1539-3-git-send-email-sboyd@codeaurora.org> X-Mailer: git-send-email 2.6.0.1.gcfb28ad In-Reply-To: <1443727374-1539-1-git-send-email-sboyd@codeaurora.org> References: <1443727374-1539-1-git-send-email-sboyd@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The oxili_cx GDSC is inside the power domain of the oxili GDSC. Add the dependency so that the CX domain can properly power up. Reported-by: Rob Clark Cc: Rajendra Nayak Signed-off-by: Stephen Boyd --- drivers/clk/qcom/mmcc-msm8974.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c index fe8320dc41db..cf2a7c9c95e6 100644 --- a/drivers/clk/qcom/mmcc-msm8974.c +++ b/drivers/clk/qcom/mmcc-msm8974.c @@ -2615,6 +2615,7 @@ MODULE_DEVICE_TABLE(of, mmcc_msm8974_match_table); static int mmcc_msm8974_probe(struct platform_device *pdev) { struct regmap *regmap; + int ret; regmap = qcom_cc_map(pdev, &mmcc_msm8974_desc); if (IS_ERR(regmap)) @@ -2623,11 +2624,19 @@ static int mmcc_msm8974_probe(struct platform_device *pdev) clk_pll_configure_sr_hpm_lp(&mmpll1, regmap, &mmpll1_config, true); clk_pll_configure_sr_hpm_lp(&mmpll3, regmap, &mmpll3_config, false); - return qcom_cc_really_probe(pdev, &mmcc_msm8974_desc, regmap); + ret = qcom_cc_really_probe(pdev, &mmcc_msm8974_desc, regmap); + if (ret) + return ret; + + ret = pm_genpd_add_subdomain(&oxili_gdsc.pd, &oxilicx_gdsc.pd); + if (ret) + qcom_cc_remove(pdev); + return ret; } static int mmcc_msm8974_remove(struct platform_device *pdev) { + pm_genpd_remove_subdomain(&oxili_gdsc.pd, &oxilicx_gdsc.pd); qcom_cc_remove(pdev); return 0; }