From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758177Ab3KHTRg (ORCPT ); Fri, 8 Nov 2013 14:17:36 -0500 Received: from emh01.mail.saunalahti.fi ([62.142.5.107]:43450 "EHLO emh01.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757583Ab3KHTRf (ORCPT ); Fri, 8 Nov 2013 14:17:35 -0500 Message-ID: <1383938213.4264.4.camel@porter.coelho.fi> Subject: Re: [PATCH] clk: add flags to distinguish xtal clocks From: Luca Coelho To: Felipe Balbi Cc: mturquette@linaro.org, Linux ARM Kernel Mailing List , Linux OMAP Mailing List , Linux Kernel Mailing List , james.hogan@imgtec.com Date: Fri, 08 Nov 2013 21:16:53 +0200 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> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.5-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.