[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120320072018.GC32469@S2101-09.ap.freescale.net>
Date: Tue, 20 Mar 2012 15:20:20 +0800
From: Shawn Guo <shawn.guo@...aro.org>
To: Saravana Kannan <skannan@...eaurora.org>
Cc: Mike Turquette <mturquette@...aro.org>,
Arnd Bergman <arnd.bergmann@...aro.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Rob Herring <rob.herring@...xeda.com>,
Russell King <linux@....linux.org.uk>,
Jeremy Kerr <jeremy.kerr@...onical.com>,
Thomas Gleixner <tglx@...utronix.de>,
Paul Walmsley <paul@...an.com>,
Shawn Guo <shawn.guo@...escale.com>,
Sascha Hauer <s.hauer@...gutronix.de>,
Jamie Iles <jamie@...ieiles.com>,
Richard Zhao <richard.zhao@...aro.org>,
Magnus Damm <magnus.damm@...il.com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Linus Walleij <linus.walleij@...ricsson.com>,
Stephen Boyd <sboyd@...eaurora.org>,
Amit Kucheria <amit.kucheria@...aro.org>,
Deepak Saxena <dsaxena@...aro.org>,
Grant Likely <grant.likely@...retlab.ca>
Subject: Re: [PATCH 2/2] clk: Move init fields from clk to clk_hw
On Mon, Mar 19, 2012 at 08:38:26PM -0700, Saravana Kannan wrote:
> This has a couple of advantages:
> * Completely hides struct clk from many clock platform drivers and static
> clock initialization code.
> * Simplifies the generic clk_register() function and allows adding optional
> fields in the future without modifying the function signature.
> * Allows for simpler static initialization of clocks on all platforms by
> removing the need for forward delcarations.
> * Halves the number of symbols added for each static clock initialization.
>
> Signed-off-by: Saravana Kannan <skannan@...eaurora.org>
I agree this is a reasonable move. But while you simplify the interface
of clk_register(), why not making a further step to simplify the
following interfaces simple too?
struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
const char *parent_name, unsigned long flags,
unsigned long fixed_rate);
struct clk *clk_register_gate(struct device *dev, const char *name,
const char *parent_name, unsigned long flags,
void __iomem *reg, u8 bit_idx,
u8 clk_gate_flags, spinlock_t *lock);
struct clk *clk_register_divider(struct device *dev, const char *name,
const char *parent_name, unsigned long flags,
void __iomem *reg, u8 shift, u8 width,
u8 clk_divider_flags, spinlock_t *lock);
struct clk *clk_register_mux(struct device *dev, const char *name,
char **parent_names, u8 num_parents, unsigned long flags,
void __iomem *reg, u8 shift, u8 width,
u8 clk_mux_flags, spinlock_t *lock);
Otherwise,
Acked-by: Shawn Guo <shawn.guo@...aro.org>
--
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