Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5329364ybe; Tue, 10 Sep 2019 01:54:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuYq97gI2kmGmWppdSZzmJJmvO/5DeMI3l/tHoVDKKcLlxYFOznA/dhp3QHNUWq0mmEHBI X-Received: by 2002:a50:ed89:: with SMTP id h9mr28971884edr.217.1568105670322; Tue, 10 Sep 2019 01:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568105670; cv=none; d=google.com; s=arc-20160816; b=v3015aZqH/QIoXchnERUEOvABab8oVSlt3YkWwRMqjS7iKnRKI0m5YsszFZbbozcgg fTRAMe9OWWrfZu3UhCdONBDVQ+HaUGGQoFGkaYfRlRbZXAcg1H5vbd5rjpwa1R7EfFZ7 MNBGtSjysFg0udP0vPQiM/pJEShh3q7oieB7EwDGW0FHw7vTYQw7UQs5m+Gqr5h712RK 3GxWo3OBI6SSI1gb7dUis84DkCUyFDfTy+PDzhlsMMTQL7hNYVTq2AeC3QV9VJ+jW3LW Bivf3y6peJ63SuTNE7hPAtwZtjUcojQmI6dJ40RCYRS8o4fF4DHhsYA84WZs2zJSA1wh 4fbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:user-agent:subject:from :to:cc:references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=4NKmJxVUWSZJSxzIMSpi9F1DyGn5jw/YyXme/FOcmSs=; b=QNpG5jEhkrnxS27REJFBKy698H8Mkaz5WtpLx0PFj7G2ui9hMKPO/cYLK21I3+WJYP RcuqZJe5eU9Cp/mCMBkHcGbE9rbQ30mWPZputGZ6W6TIXEsVXyB5MFwoo0KC33vmmLcF ZhH9s/nkJSI6AlTu3JspwIaMduWWJEQ+qiS2e2BY+TaoejYlTrvWktCXWCM94OYD3Dtc FDuAne9XfixlwL30XfwTaHSxJJdIXStw52H80+ZUTzYd7ajnnW0mKUqmQpUWYVk4j78e IJBx/NH9yyU3diQzstJ2nCJIgBnOgx8mnLSOTgdpZMKeeEeHfxW3ZClA2NYwJe0hlF4u rNXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MNzXe8vk; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p28si9602642ejn.88.2019.09.10.01.54.06; Tue, 10 Sep 2019 01:54:30 -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=@kernel.org header.s=default header.b=MNzXe8vk; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387954AbfIIQRF (ORCPT + 99 others); Mon, 9 Sep 2019 12:17:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:52186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbfIIQRF (ORCPT ); Mon, 9 Sep 2019 12:17:05 -0400 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 07FAE20640; Mon, 9 Sep 2019 16:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568045824; bh=uM5pktdKKybWosqtld6GFR4HLQK6oDxEDVcHV3Wsg10=; h=In-Reply-To:References:Cc:To:From:Subject:Date:From; b=MNzXe8vkDgM3sXct2hf22C2hDzuWkQZIEgj4QV5QkcBsm2/PMX6bOSd2Kke6UbMo1 vX8mpbXuhg+SvXx/TEy3uJgu3DsEyKbhFpENPgnf5R4eWBQBNTf7OWAVTIuC7mHShB MQhYynCU0bWeU/jBzhsHd/szMjHHA3AEv13Ixmec= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190909141740.GA23964@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> Cc: agross@kernel.org, jorge.ramirez-ortiz@linaro.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 To: "Jorge Ramirez-Ortiz, Linaro" From: Stephen Boyd Subject: Re: [PATCH 2/5] clk: qcom: apcs-msm8916: get parent clock names from DT User-Agent: alot/0.8.1 Date: Mon, 09 Sep 2019 09:17:03 -0700 Message-Id: <20190909161704.07FAE20640@mail.kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 pla= tform_device *pdev) > > > a53cc->src_shift =3D 8; > > > a53cc->parent_map =3D gpll0_a53cc_map; > > > =20 > > > - a53cc->pclk =3D devm_clk_get(parent, NULL); > > > + a53cc->pclk =3D of_clk_get(parent->of_node, pll_index); > >=20 > > Presumably the PLL was always index 0, so why are we changing it to > > index 1 sometimes? Seems unnecessary. > >=20 >=20 > it came as a personal preference. hope it is acceptable (I would > rather not change it) >=20 > apcs-msm8916.c declares the following >=20 > [..] > static const u32 gpll0_a53cc_map[] =3D { 4, 5 }; > static const char *gpll0_a53cc[] =3D { > "gpll0_vote", > "a53pll", > }; > [..] >=20 >=20 > now will be doing this >=20 > --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi > +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi > @@ -429,7 +429,8 @@ > compatible =3D "qcom,msm8916-apcs-kpss-global", "syscon"; > reg =3D <0xb011000 0x1000>; > #mbox-cells =3D <1>; > - clocks =3D <&a53pll>; > + clocks =3D <&gcc GPLL0_VOTE>, <&a53pll>; > + clock-names =3D "aux", "pll"; > #clock-cells =3D <0>; > }; > = =20 >=20 > so I chose to keep the consistency between the clocks definition and > just change the index before calling of_clk_get. >=20 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.