From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Boyd Subject: Re: [Patch v6 02/10] firmware: qcom: scm: Convert SCM to platform driver Date: Fri, 3 Jun 2016 17:03:43 -0700 Message-ID: <20160604000343.GW28218@codeaurora.org> References: <1464996330-16952-1-git-send-email-andy.gross@linaro.org> <1464996330-16952-3-git-send-email-andy.gross@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1464996330-16952-3-git-send-email-andy.gross@linaro.org> Sender: linux-kernel-owner@vger.kernel.org To: Andy Gross Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bjorn Andersson , devicetree@vger.kernel.org, jilai wang List-Id: devicetree@vger.kernel.org On 06/03, Andy Gross wrote: > This patch converts the Qualcomm SCM firmware driver into a platform > driver. It also adds clock management for firmware calls which require > clocks to be enabled during the duration of their execution. Rate > setting of the core clock is also in place for higher performance. > > Signed-off-by: Andy Gross > Acked-by: Bjorn Andersson Reviewed-by: Stephen Boyd > + > +static int __init qcom_scm_init(void) > +{ > + struct device_node *np, *fw_np; > + int ret; > + > + fw_np = of_find_node_by_name(NULL, "firmware"); > + > + if (!fw_np) > + return -ENODEV; > + > + np = of_find_matching_node(fw_np, qcom_scm_dt_match); > + > + if (!np) { > + of_node_put(fw_np); > + return -ENODEV; > + } > + > + of_node_put(np); > + > + ret = of_platform_populate(fw_np, qcom_scm_dt_match, NULL, NULL); > + > + of_node_put(fw_np); > + > + if (ret) > + return ret; > + > + return platform_driver_register(&qcom_scm_driver); > +} There are lots of newlines in this function, but that's a style nitpick. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project