Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5339129ybe; Tue, 10 Sep 2019 02:04:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQpnUugneO8RT42H6cZiQ9fugZNfySonb/jVgc2x5di6fmTRxOcKATYCWQLMskXpNQiCw7 X-Received: by 2002:a50:f98c:: with SMTP id q12mr28348967edn.75.1568106292292; Tue, 10 Sep 2019 02:04:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568106292; cv=none; d=google.com; s=arc-20160816; b=LxRZXWzZkR8+lAs3wDOFmqr9mqA64JtHWzexh6Wza3xH6C5Ckw8sMp4BxvfppUTwVw QS3z8KbJbi1eh6PcVNioENMWL5JcVVLNdFromCswigOSSTK00G8EyiWat/7wFqNKwuZJ ubMBaJ8QSJfTaNCN3LWqcaAxIe4PMdtikDAp5I0KskHthX3eRXzntv2HaLcUxIS1VS3P /4gCkDSruTgGbKJGVUREKs5bSWhrg5McdS29vw8lcCDH8KCDQDnjFPOIFLzlm9OwF51g 0Xo9DsUjzN8zl0uCIIX9kIaarqFZRyJHVmQxgmFXk37DSA3m0xzw6oMOgiuNN8TDj3Mh sPUA== 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:date:from:dkim-signature; bh=f9/8yy+NKv4q/o4tIkF6O8Or8uSW/OZKuGNstmgenRc=; b=JxWdAZjUY4BIG09mAWAo5gzvMnWtAxadqsllfj44C/8BHtY9POptns+SZCkRD5pjS3 C9MWQrhNBdJV/Os6iZzhjBNIe8yw8uK14Kag6Jk++2QoOOTt0f1FFV+hMJzyiCOnfzek eITRbRThUrh2ZTxoN6QlIYrh7gKJpGMJDW+l6R0c/ci3i7Ju0O4U9habjkepNTPFGD9Z UD/nD8QGcWRp1YONmOl2d+aF8eFNmGww469pjiKDoiDtgQ+oTOwHQOpEqKWeRzIDZk1L iKBv+eUAMdvB2dgZO1kRHpFWiXDvtRjy54qiggVxKwPXPNcL3niTQkEYr3rZ9aKP5yCV ydfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rtj5Mvb9; 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 s10si9816681edx.233.2019.09.10.02.04.28; Tue, 10 Sep 2019 02:04:52 -0700 (PDT) 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=rtj5Mvb9; 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 S2390521AbfIIQyM (ORCPT + 99 others); Mon, 9 Sep 2019 12:54:12 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53052 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390263AbfIIQyM (ORCPT ); Mon, 9 Sep 2019 12:54:12 -0400 Received: by mail-wm1-f67.google.com with SMTP id t17so384758wmi.2 for ; Mon, 09 Sep 2019 09:54:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=f9/8yy+NKv4q/o4tIkF6O8Or8uSW/OZKuGNstmgenRc=; b=rtj5Mvb9qp1ydqG8Dx9wrY+kW9C96wthSIEoYr32iyA8rXHVaahnacuxvVAg9TgJoH AavDm8EfpZxfUaUrlsZfFaq3Rff3LneiUax9g+x0EJhTqRSPdbgrNliPd6T4RLHHJpF6 ya6x2MyPXQ7W+UTom2TTu3VieoF3MhdPUhOeuOCoCWaLFkrZ79uFyoRVgcozZeCoxFDW aFY+ZdUevNupWUJz4aZWiNQZqZGhmXQ3k/DBmSj87Yx+evow+Xji9f6FNUDZ1plIdulz oKNt9ZyAU/V38zWVHOmrJBnp2mcxHp9oRM2yM7zZxjHc6ja9mRb2Tlvi7XEvb60RXs1t ED9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=f9/8yy+NKv4q/o4tIkF6O8Or8uSW/OZKuGNstmgenRc=; b=ZWlL20Zxk/0wpIV5RBlxuQYColyptMcMlZaX77T6/ojeaoIA2oQ3jMEnVoGNIs/K3P zKxZ8gLYs4oLLem3B9y2rNPPFOjwrLI7/2FZkn0wiqdVUC+mJZUwb1kRIB+AHnWxIDKh +fRI4+mZZA5VBPkjS5B8Z9+ujeI7bzZSj+OWuJnd1j6DaWtLIrr85Nt0jQnGtbmoCtqZ Nn+bV4UqQXNEVXtT2uRxRq5ok67xlLs9ewvzFjtkZcY6luEOMn/IoKq5XetMqWUFP0Cb zj43jzWn8c4TzhxkC/63qpn+Q2w9EccfbER5phZ5WTZeqdwHFG1xa/6AlJklbBgwSa9n Dvrg== X-Gm-Message-State: APjAAAVm9pKUmHgvrLSehvnW+VRuSfj3blbxCc1m4zSmyQ6p7FQJfhfC q0pAXzk6+Dr85fDrdJXp50xTdA== X-Received: by 2002:a1c:7011:: with SMTP id l17mr152064wmc.39.1568048049688; Mon, 09 Sep 2019 09:54:09 -0700 (PDT) Received: from igloo (69.red-83-35-113.dynamicip.rima-tde.net. [83.35.113.69]) by smtp.gmail.com with ESMTPSA id r20sm20381639wrg.61.2019.09.09.09.54.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Sep 2019 09:54:09 -0700 (PDT) From: "Jorge Ramirez-Ortiz, Linaro" X-Google-Original-From: "Jorge Ramirez-Ortiz, Linaro" Date: Mon, 9 Sep 2019 18:54:08 +0200 To: Stephen Boyd Cc: "Jorge Ramirez-Ortiz, Linaro" , agross@kernel.org, mturquette@baylibre.com, bjorn.andersson@linaro.org, niklas.cassel@linaro.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] clk: qcom: apcs-msm8916: get parent clock names from DT Message-ID: <20190909165408.GC23964@igloo> References: <20190826164510.6425-1-jorge.ramirez-ortiz@linaro.org> <20190826164510.6425-2-jorge.ramirez-ortiz@linaro.org> <20190909102117.245112089F@mail.kernel.org> <20190909141740.GA23964@igloo> <20190909161704.07FAE20640@mail.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190909161704.07FAE20640@mail.kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/09/19 09:17:03, Stephen Boyd wrote: > Quoting Jorge Ramirez-Ortiz, Linaro (2019-09-09 07:17:40) > > On 09/09/19 03:21:16, Stephen Boyd wrote: > > > Quoting Jorge Ramirez-Ortiz (2019-08-26 09:45:07) > > > > @@ -76,10 +88,11 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev) > > > > a53cc->src_shift = 8; > > > > a53cc->parent_map = gpll0_a53cc_map; > > > > > > > > - a53cc->pclk = devm_clk_get(parent, NULL); > > > > + a53cc->pclk = of_clk_get(parent->of_node, pll_index); > > > > > > Presumably the PLL was always index 0, so why are we changing it to > > > index 1 sometimes? Seems unnecessary. > > > > > > > it came as a personal preference. hope it is acceptable (I would > > rather not change it) > > > > apcs-msm8916.c declares the following > > > > [..] > > static const u32 gpll0_a53cc_map[] = { 4, 5 }; > > static const char *gpll0_a53cc[] = { > > "gpll0_vote", > > "a53pll", > > }; > > [..] > > > > > > now will be doing this > > > > --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi > > +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi > > @@ -429,7 +429,8 @@ > > compatible = "qcom,msm8916-apcs-kpss-global", "syscon"; > > reg = <0xb011000 0x1000>; > > #mbox-cells = <1>; > > - clocks = <&a53pll>; > > + clocks = <&gcc GPLL0_VOTE>, <&a53pll>; > > + clock-names = "aux", "pll"; > > #clock-cells = <0>; > > }; > > > > > > so I chose to keep the consistency between the clocks definition and > > just change the index before calling of_clk_get. > > > > But now the binding is different for the same compatible. I'd prefer we > keep using devm_clk_get() and use a device pointer here and reorder the > map and parent arrays instead. The clocks property shouldn't change in a > way that isn't "additive" so that we maintain backwards compatibility. > but the backwards compatibility is fully maintained - that is the main reason behind the change. the new stuff is that instead of hardcoding the names in the source - like it is being done on the msm8916- we provide the clocks in the dts node (a cleaner approach with the obvious benefit of allowing new users to be added without having to modify the sources).