[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120305101708.GF24858@lunn.ch>
Date: Mon, 5 Mar 2012 11:17:08 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Sascha Hauer <s.hauer@...gutronix.de>
Cc: Andrew Lunn <andrew@...n.ch>,
"Turquette, Mike" <mturquette@...com>,
Russell King <linux@....linux.org.uk>, patches@...aro.org,
linaro-dev@...ts.linaro.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Jeremy Kerr <jeremy.kerr@...onical.com>,
Thomas Gleixner <tglx@...utronix.de>,
Arnd Bergman <arnd.bergmann@...aro.org>,
Paul Walmsley <paul@...an.com>,
Shawn Guo <shawn.guo@...escale.com>,
Jamie Iles <jamie@...ieiles.com>,
Richard Zhao <richard.zhao@...aro.org>,
Saravana Kannan <skannan@...eaurora.org>,
Magnus Damm <magnus.damm@...il.com>,
Rob Herring <rob.herring@...xeda.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>,
"Rafael J. Wysocki" <rjw@...k.pl>
Subject: Re: [PATCH v5 4/4] clk: basic clock hardware types
> > I think i can wrap your simple gate clock, to make my "complex" gate
> > clock. What would help is if you would EXPORT_SYMBOL_GPL
> > clk_gate_enable() and clk_gate_disable(), since they do exactly what i
> > want. I can then build my own clk_ops structure, with my own
> > unprepare() function. I would probably use DEFINE_CLK_GATE as is, and
> > then at run time, before calling __clk_init() overwrite the .ops with
> > my own version.
>
> Maybe I don't get your point, but clk_unprepare should be used when
> you have to sleep to disable your clock. When clk_gate_disable() is
> exactly why do you want to use clk_unprepare instead of clk_disable?
I'm trying to avoid having to implement a new clock provider. The
whole point of the generic clk code is to consolidate code. It seems
silly to create a new clk provider which is 95% identical to Mike's
gated provider, if i can avoid it.
If i stuff it into clk_disable(), it means i cannot use the basic gate
clock Mike provides in the generic clock framework. Which is a shame,
since it does exactly what i want in terms of gating the clock.
If i can use unprepare(), which basic gate does not use, i can use
Mikes code, and just extend it. It is there, it is unused, so why not
use it?
Andrew
--
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