From: luca@coelho.fi (Luca Coelho) Date: Fri, 08 Nov 2013 21:16:53 +0200 Subject: [PATCH] clk: add flags to distinguish xtal clocks In-Reply-To: <1383933648-28595-1-git-send-email-balbi@ti.com> References: <1382528150.21526.25.camel@porter.coelho.fi> <1383933648-28595-1-git-send-email-balbi@ti.com> Message-ID: <1383938213.4264.4.camel@porter.coelho.fi> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Felipe, On Fri, 2013-11-08 at 12:00 -0600, Felipe Balbi wrote: > From: Luciano Coelho > > Add a flag that indicate whether the clock is a crystal or not. > > Additionally, parse a new device tree binding in clk-fixed-rate to set > this flag. > > If clock-xtal isn't set, the clock framework will assume clock to be > generated by an oscillator. There's only one user for this binding > right now which is Texas Instruments' WiLink devices which need to know > details about the clock in order to initialize the underlying WiFi HW > correctly. > > Signed-off-by: Luciano Coelho > Signed-off-by: Felipe Balbi > --- > > Dropped CLK_IS_TYPE_DEFINED flag and just assume that if the flag > isn't there, default behavior will be taken. I don't think this is a good idea, because how would code that relies on the CLK_IS_TYPE_XTAL flag know whether 0 means that the clock is *not* crystal or if the flag is simply not defined? There are many clocks which *are* crystal but don't define this flag (obviously, because it didn't exist). That's the reason why I added the CLK_IS_TYPE_DEFINED flag... If you want to get rid of this flag, you should traverse all clocks and set the CLK_IS_TYPE_XTAL on all those that are crystals. -- Cheers, Luca.