From patchwork Fri Jan 30 10:17:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 44033 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 98F2920CA8 for ; Fri, 30 Jan 2015 10:43:07 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id r20sf126826wiv.2 for ; Fri, 30 Jan 2015 02:43:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=5WypJOSiNxoLvYeozHQae/0AI7bEtGPfpIO+Ds01bqw=; b=CNSzIi+kzobKYoeGFnI7fTYrJNIhT0sGg/3Brcutbsp9Vu5PZfZ+KgFRp9h73YVXYJ 6sqKfk4pi5hfqL6mnA5kSoI4bHuJKwcNBhCqtMOuG4yXcHKFirkdNfX98zl+OmyNMu3W nROAgHBP5ZZyilyc2PG994OI110O/7MAGKe3WboS9Io5Ke3foYGCg+0T38lizjlmtVut /qJOLSXxOBjmI99M/JmEeK0th4RgCwi1knYDqX6NLtc9NtslNBuF6hSPZnnrVwhk8dNQ dJvZ2O0GZ43BxJGH9iVZa5Y8xLgmmniruXRbXNW1xEMjlMdrpQshGPYSsVZf7AWxwUpF kZsQ== X-Gm-Message-State: ALoCoQmYsWDYdvTUUUrFo+MIifYUyhaYcZZoNVKdq1BmX35HaSa7kC6/9HLtt6bE30FY+orHbnxX X-Received: by 10.180.37.107 with SMTP id x11mr236535wij.5.1422613076300; Fri, 30 Jan 2015 02:17:56 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.165 with SMTP id m5ls136266lag.104.gmail; Fri, 30 Jan 2015 02:17:55 -0800 (PST) X-Received: by 10.112.180.135 with SMTP id do7mr5544094lbc.23.1422613075941; Fri, 30 Jan 2015 02:17:55 -0800 (PST) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id m1si9752305lae.105.2015.01.30.02.17.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Jan 2015 02:17:55 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id gd6so22790674lab.4 for ; Fri, 30 Jan 2015 02:17:55 -0800 (PST) X-Received: by 10.112.41.234 with SMTP id i10mr5682635lbl.25.1422613075538; Fri, 30 Jan 2015 02:17:55 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp232586lbj; Fri, 30 Jan 2015 02:17:54 -0800 (PST) X-Received: by 10.69.20.74 with SMTP id ha10mr7988874pbd.10.1422613073759; Fri, 30 Jan 2015 02:17:53 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10si13312018pdl.88.2015.01.30.02.17.52; Fri, 30 Jan 2015 02:17:53 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932288AbbA3KRs (ORCPT + 29 others); Fri, 30 Jan 2015 05:17:48 -0500 Received: from mail-wg0-f44.google.com ([74.125.82.44]:56839 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760298AbbA3KRp (ORCPT ); Fri, 30 Jan 2015 05:17:45 -0500 Received: by mail-wg0-f44.google.com with SMTP id z12so26052172wgg.3 for ; Fri, 30 Jan 2015 02:17:44 -0800 (PST) X-Received: by 10.194.94.164 with SMTP id dd4mr10901565wjb.56.1422613064473; Fri, 30 Jan 2015 02:17:44 -0800 (PST) Received: from srini-ThinkPad-X1-Carbon-2nd.dlink.com (host-2-98-209-190.as13285.net. [2.98.209.190]) by mx.google.com with ESMTPSA id vq9sm14239153wjc.6.2015.01.30.02.17.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Jan 2015 02:17:43 -0800 (PST) From: Srinivas Kandagatla To: Mike Turquette , Stephen Boyd Cc: Rob Herring , Kumar Gala , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, edubezval@gmail.com, nrajan@codeaurora.com, Srinivas Kandagatla Subject: [PATCH v2 1/2] clk: qcom: gcc-msm8960: add child devices support. Date: Fri, 30 Jan 2015 10:17:40 +0000 Message-Id: <1422613060-29886-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422613004-29802-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1422613004-29802-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srinivas.kandagatla@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch adds support to add child devices to gcc as some of the registers mapped by gcc are used by drivers like thermal sensors. Signed-off-by: Srinivas Kandagatla --- drivers/clk/qcom/gcc-msm8960.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c index 0cd3e26..3ba77c5 100644 --- a/drivers/clk/qcom/gcc-msm8960.c +++ b/drivers/clk/qcom/gcc-msm8960.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -3658,6 +3659,7 @@ static int gcc_msm8960_probe(struct platform_device *pdev) struct clk *clk; struct device *dev = &pdev->dev; const struct of_device_id *match; + int ret; match = of_match_device(gcc_msm8960_match_table, &pdev->dev); if (!match) @@ -3677,12 +3679,18 @@ static int gcc_msm8960_probe(struct platform_device *pdev) if (IS_ERR(clk)) return PTR_ERR(clk); - return qcom_cc_probe(pdev, match->data); + ret = qcom_cc_probe(pdev, match->data); + if (ret) + return ret; + + return of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); } static int gcc_msm8960_remove(struct platform_device *pdev) { qcom_cc_remove(pdev); + of_platform_depopulate(&pdev->dev); + return 0; }