Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1799925imu; Thu, 17 Jan 2019 03:31:30 -0800 (PST) X-Google-Smtp-Source: ALg8bN6xltUqylc8q4vd6EAVk5dfXP/XfDnWyOTsX+PnuG5R4/HvWt5Ez+MziuqeSQm4oMykU1fc X-Received: by 2002:a17:902:96a:: with SMTP id 97mr14210269plm.45.1547724690569; Thu, 17 Jan 2019 03:31:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547724690; cv=none; d=google.com; s=arc-20160816; b=HnO6GMCmeNEljd/1kdNW/pmbQwKHCGfkhWiH8Xu0VIYy5xyL0LeKkipStkXDxuscJe 1c4Ku8TBrkgmmlUgurNRrS7gF0XAkl57OSAOFWknkYn3xFOqAgQk+LggrPprooOyAnM2 w30hdrwUx5BJXzL9HEJVtSCL+XjNMrYXffXrkRdx/+e45BwvF2j5SRKJWszp+DLtHNTH 9jimMKaWmuzjHWdVgnnVD0Hf66FNc5bN6V2GFC1s4j1Hjd/5K7B8fr/HxWy+muA8YUbR 0h8Nefp+v+RBQjTqehWsVGdoVSp9GLl110efzsa3lc3LFGeUY+TmOWF1kS6tTeXdnMxR HpPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mCTsp1TTN24owrN3MkvyzPcw6V8d8yP34TwiCxlzb8c=; b=elBaDU1JFCT2j57klI7yh2iyU39Uuzls6L+vYPRLPmlFDqfX9qHyBtZNQ0AB2sFrr4 ATGkAvVk9XRg/yDmf3yxWwPTzQiqnKUJ1Wqtq35TZvQ3BC0J74BUFZjqsrdrqITzL3EO Gxvhlc2u4dB0MT1fNbzFcVrEusRbfBBUwfj9BKl/6/lgWHS8uuMwkaT7gJk22s/2usjA ODFnTLZ6C+p5bI2Z7GgGuGeOFxRDGJnjo1Fj6u2XnhcBF4fZuvaM7Wn3UmBTmWcAhE9z PWIvUaD6ghZlqydOT+ep83Xiz0IRQO1cylWvzNam065GiIgRARoSt5FNM4ZfyacHXIDw NFIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NP0si3ic; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12si1420574pgf.470.2019.01.17.03.31.14; Thu, 17 Jan 2019 03:31:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NP0si3ic; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730299AbfAQG20 (ORCPT + 99 others); Thu, 17 Jan 2019 01:28:26 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:45161 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726795AbfAQG20 (ORCPT ); Thu, 17 Jan 2019 01:28:26 -0500 Received: by mail-pl1-f194.google.com with SMTP id a14so4226650plm.12 for ; Wed, 16 Jan 2019 22:28:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mCTsp1TTN24owrN3MkvyzPcw6V8d8yP34TwiCxlzb8c=; b=NP0si3icH+q949vp9PsZlav441VAes3Iasb9e4lrP2xKcjFSv+lD5enZ3ImNJRIg0t CWlEtH81nkckNERuyHwAjjRkMuqI3ZBPy0sRTv+3QKhdBfEwJPsMV4eIeb6Let2qgYUW ucQI2iMJfKSQ9OPf4jtd3543DnAh+mqShy4Js= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mCTsp1TTN24owrN3MkvyzPcw6V8d8yP34TwiCxlzb8c=; b=thCOjVOr1J9eNFsAdhTW7IstlWT9E8GLoqs/3Otl3Tk0acdtEoapFPRzxPX9EAAtwy dJFSm9tPts060D46A/oOBQQqQcjEmK1Qgb1pBTgNKE00MdxG6r8K6zrG6MnZeOuWIrhr 2LjZDN5J61YEaqVaVVAc18ptkfYGAP102uCrR2oUR8OUask7+w950KzU1YsD6sBEVqqo W33VrlfAq+OS1sMd1aotK7sZGGn6ywocm/FEmLwQIN+slkFRPTnSbeRTv2Vljn1gT51N Qpwe3CIwovu8wv67WsSLg2CMEs5ZJsmzjsXEiC/cg10xOIjmC0JCUwWBEVuWFmsNVFYW wKKQ== X-Gm-Message-State: AJcUukclA3dFIk7gSJVwKiHb1n2KzNZ9o9yw5fqO+xycLtbrYBvwGfkn MOY/bEOO2ZcYa7w6K4tQHMMcAg== X-Received: by 2002:a17:902:24d:: with SMTP id 71mr13353580plc.225.1547706505216; Wed, 16 Jan 2019 22:28:25 -0800 (PST) Received: from builder (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id y29sm755820pga.59.2019.01.16.22.28.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 22:28:24 -0800 (PST) Date: Wed, 16 Jan 2019 22:27:44 -0800 From: Bjorn Andersson To: Jorge Ramirez-Ortiz Cc: robh+dt@kernel.org, mark.rutland@arm.com, andy.gross@linaro.org, david.brown@linaro.org, sboyd@kernel.org, will.deacon@arm.com, mturquette@baylibre.com, jassisinghbrar@gmail.com, vkoul@kernel.org, niklas.cassel@linaro.org, sibis@codeaurora.org, georgi.djakov@linaro.org, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: Re: [PATCH 06/13] clk: qcom: hfpll: get parent clock names from DT Message-ID: <20190117062744.GC25498@builder> References: <1545039990-19984-1-git-send-email-jorge.ramirez-ortiz@linaro.org> <1545039990-19984-7-git-send-email-jorge.ramirez-ortiz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1545039990-19984-7-git-send-email-jorge.ramirez-ortiz@linaro.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 17 Dec 01:46 PST 2018, Jorge Ramirez-Ortiz wrote: > Allow accessing the parent clock name required for the driver > operation using the device tree node. > > This permits extending the driver to other platforms without having to > modify its source code. > > For backwards compatibility leave the previous value as default. > Reviewed-by: Bjorn Andersson > Co-developed-by: Niklas Cassel > Signed-off-by: Niklas Cassel > Signed-off-by: Jorge Ramirez-Ortiz > --- > drivers/clk/qcom/hfpll.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c > index a6de7101..87b7f46 100644 > --- a/drivers/clk/qcom/hfpll.c > +++ b/drivers/clk/qcom/hfpll.c > @@ -52,6 +52,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev) > void __iomem *base; > struct regmap *regmap; > struct clk_hfpll *h; > + struct clk *pclk; > struct clk_init_data init = { > .parent_names = (const char *[]){ "xo" }, > .num_parents = 1, > @@ -75,6 +76,13 @@ static int qcom_hfpll_probe(struct platform_device *pdev) > 0, &init.name)) > return -ENODEV; > > + /* get parent clock from device tree (optional) */ > + pclk = devm_clk_get(dev, "xo"); > + if (!IS_ERR(pclk)) > + init.parent_names = (const char *[]){ __clk_get_name(pclk) }; > + else if (PTR_ERR(pclk) == -EPROBE_DEFER) > + return -EPROBE_DEFER; > + > h->d = &hdata; > h->clkr.hw.init = &init; > spin_lock_init(&h->lock); > -- > 2.7.4 >