[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120319053801.GB31410@S2101-09.ap.freescale.net>
Date: Mon, 19 Mar 2012 13:38:04 +0800
From: Shawn Guo <shawn.guo@...aro.org>
To: Saravana Kannan <skannan@...eaurora.org>
Cc: "Turquette, Mike" <mturquette@...com>,
Sascha Hauer <s.hauer@...gutronix.de>,
Jeremy Kerr <jeremy.kerr@...onical.com>,
Andrew Lunn <andrew@...n.ch>, Paul Walmsley <paul@...an.com>,
linaro-dev@...ts.linaro.org,
Linus Walleij <linus.walleij@...ricsson.com>,
linux-arm-kernel@...ts.infradead.org, patches@...aro.org,
Magnus Damm <magnus.damm@...il.com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Stephen Boyd <sboyd@...eaurora.org>,
linux-kernel@...r.kernel.org,
Rob Herring <rob.herring@...xeda.com>,
Grant Likely <grant.likely@...retlab.ca>,
Deepak Saxena <dsaxena@...aro.org>,
Amit Kucheria <amit.kucheria@...aro.org>,
Russell King <linux@....linux.org.uk>,
Thomas Gleixner <tglx@...utronix.de>,
Richard Zhao <richard.zhao@...aro.org>,
Shawn Guo <shawn.guo@...escale.com>,
Arnd Bergman <arnd.bergmann@...aro.org>
Subject: Re: [PATCH v5 3/4] clk: introduce the common clock framework
On Fri, Mar 16, 2012 at 08:23:57PM -0700, Saravana Kannan wrote:
...
> Hi Mike,
>
> I already took a quick look at the v7 series, but I thought this
> thread has more relevant context for my response. So, responding
> here.
>
> I'm with Sascha on creating a clk_internal/clk_initializer and
> removing clk_hw. You had asked about the benefits of his suggestion
> in one of the earlier threads. I'm sure I have told some of these
> reasons I don't like clk_hw, but repeating my points here for others
> to chime in.
>
> I used to be a huge proponent for using macros for clocks in our
> internal tree. All the clocks were constructed using macros (you
> will see it in the history of tree we publish in CAF). They quickly
> became unreadable when you have several hundreds of clocks. The
> biggest problem is that you can't quickly look at a clock's macro
> and figure out what the register offset or bit mask or shift value
> is. Our eyes/brains aren't meant for quickly parsing the commas and
> finding the n-th field or even remembering what the n-th field of
> each macro corresponds to. If it's actually broken out as fields in
> a struct, it's much easier to read. So, long story short, I think
> the well-intentioned helper macros will make code quite unreadable.
>
While I second the idea of clk_initializer, using macros is not really
the thing to complain. You can save using those macro helpers by
calling APIs clk_register_*(). But that does not solve the problem,
because those APIs also have a long argument list to fill.
--
Regards,
Shawn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists