From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH] clk: add flags to distinguish xtal clocks Date: Mon, 11 Nov 2013 21:54:01 +0100 Message-ID: <20131111205401.GZ26440@lukather> References: <1382528150.21526.25.camel@porter.coelho.fi> <1383933648-28595-1-git-send-email-balbi@ti.com> <20131110113716.GN26440@lukather> <20131111194247.GB19212@saruman.home> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OHFW44Kv8gQ39vd8" Return-path: Content-Disposition: inline In-Reply-To: <20131111194247.GB19212@saruman.home> Sender: linux-kernel-owner@vger.kernel.org To: Felipe Balbi Cc: mturquette@linaro.org, james.hogan@imgtec.com, Linux Kernel Mailing List , Linux OMAP Mailing List , luca@coelho.fi, Linux ARM Kernel Mailing List List-Id: linux-omap@vger.kernel.org --OHFW44Kv8gQ39vd8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 11, 2013 at 01:42:47PM -0600, Felipe Balbi wrote: > > > + if (of_property_read_bool(node, "clock-xtal")) > > > + flags |=3D CLK_IS_TYPE_XTAL; > > > + > >=20 > > Introducing a new compatible instead of a property would make more > > sense here I think. > >=20 > > Do you have a reason not to do so? >=20 > As you can see, this is original work from Luca but I disagree that > adding a new compatible makes more sense. This still related to a fixed > rate clock, we're just giving it one extra metadata which will > differentiate between crystal and oscilator fixed rate clocks. I don't know, I think it's more a matter of consistency. If we turn the problem the other way around. Let's say we have a crystal that for some reason can't be used with clk-fixed-rate. You'd add a new driver for it, with a compatible of its own, and you'd put that XTAL flag in there, without any extra metadata in the DT, right? And I'm pretty sure having a compatible like "clk-xtal" would make it pretty obvious that it's still a fixed rate clock. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --OHFW44Kv8gQ39vd8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJSgUPpAAoJEBx+YmzsjxAgHcgP/RBickPG2EHTBEAxjK6uVhUr EN83m2U51xOtcREqH3PfwZOyWi3e2UOjujzgF8UA67gFzlF2p1Rei5Wr8r5cyTUx LA34E01QrNliNXxA6C8uym6i4JmhLDxzUPgqgks77FRp5kzlikISNqIFSSpNby1c GANbyNvV7j+8YIwXtg9AzQyl2xBaTMiUDgFVnYiPfarQXZtYCXLBc2iQezEdxqbo rdhjOl/J8lKtj62SUQmtShkURRk3xcg0S/ZhY6I6FiQCcE+pXb6ZiGnce78XYmTL 0c/4spuKdGMVYhKNpiec1SyN5L2yvF4zR06WfVMJtR1r89Jn08OfKzyTcqNj0Pn1 5974vCBGFevvDbEg0Waebn9rgPbtn1Xw5jg7cC31qHCmzZ9+STxfoMu0q0iDRoCx EqGBcvE5KWLllEMOWB7kxr1UX6NuzJ2y4AOIP8eAroXxXs5iyPcq5RnBOkLiHFtI LYMG/deLbqa9+ACcBze8Mxi9cVri5lzB9Ku5JbeaG1odnNuOraOoXDpEGz2BmxBu pYInB7MO6NNqoNQ0fDwDlG7YMKiwmMjmuHI85a8Iql/jrxpy7/HBPC+yC6C/8euv 3ek2+Fy//IG0ddqVRLA5af0IpIC09tazrbfVXaqtS3et4H1DNmNSLugM1gJUWBID Y0h+q6xaLFh20NY0inqj =yPrt -----END PGP SIGNATURE----- --OHFW44Kv8gQ39vd8-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxime.ripard@free-electrons.com (Maxime Ripard) Date: Mon, 11 Nov 2013 21:54:01 +0100 Subject: [PATCH] clk: add flags to distinguish xtal clocks In-Reply-To: <20131111194247.GB19212@saruman.home> References: <1382528150.21526.25.camel@porter.coelho.fi> <1383933648-28595-1-git-send-email-balbi@ti.com> <20131110113716.GN26440@lukather> <20131111194247.GB19212@saruman.home> Message-ID: <20131111205401.GZ26440@lukather> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Nov 11, 2013 at 01:42:47PM -0600, Felipe Balbi wrote: > > > + if (of_property_read_bool(node, "clock-xtal")) > > > + flags |= CLK_IS_TYPE_XTAL; > > > + > > > > Introducing a new compatible instead of a property would make more > > sense here I think. > > > > Do you have a reason not to do so? > > As you can see, this is original work from Luca but I disagree that > adding a new compatible makes more sense. This still related to a fixed > rate clock, we're just giving it one extra metadata which will > differentiate between crystal and oscilator fixed rate clocks. I don't know, I think it's more a matter of consistency. If we turn the problem the other way around. Let's say we have a crystal that for some reason can't be used with clk-fixed-rate. You'd add a new driver for it, with a compatible of its own, and you'd put that XTAL flag in there, without any extra metadata in the DT, right? And I'm pretty sure having a compatible like "clk-xtal" would make it pretty obvious that it's still a fixed rate clock. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: