On 10/08/2013 08:21 AM, Laxman Dewangan wrote:Palmas devices has two clock output CLK32K_KG and CLK32K_KG_AUDIOnot all palmas devices have 2 clocks - example: tps659038
| 7 +
drivers/clk/Makefile | 1 +
drivers/clk/clk-palmas.c | 340 ++++++++++++++++++++
http://www.spinics.net/lists/devicetree/msg04855.html
Do we do 2 patches now? one seperate for binding and implementation?
What is our current preference now a days?
Palmas device has two clock output pins for 32KHz, KG and KG_AUDIO.proper link would be to provide
+
+This binding uses the common clock binding ./clock-bindings.txt.
Documentation/devicetree/bindings/clock/clock-bindings.txt ?
+To handle variants of Palmas chips in production, you'd want to be
+Clock 32KHz KG is output 0 of the driver and clock 32KHz is output 1.
+
+Required properties:
+- compatible : shall be "ti,palmas-clk".
specific here clk32k_kg and clk32k_kg_audio.
+Dumb question: Why is this needed? should'nt relevant drivers do a
+ Optional subnode properties:
+ ti,clock-boot-enable: Enable clock at the time of booting.
clk_get to enable the relevant clocks?
+ ti,external-sleep-control: The clock is enable/disabled by statecould we not have macros for readability?
+ of external enable input pins ENABLE, ENABLE2 and NSLEEP.
+ The valid value for the external pins are:
+ 1 for ENABLE1
+ 2 for ENABLE2
+ 3 for NSLEEP.
+you should be able to get rid of this entirely
+
+enum PALMAS_CLOCK32K {
+ PALMAS_CLOCK32KG,
+ PALMAS_CLOCK32KG_AUDIO,
+
+ /* Last entry */
+ PALMAS_CLOCK32K_NR,
+};
+ cinfo->clk = clk;
+ palmas_clks->clk_data.clks[i] = clk;
+ palmas_clks->clk_data.clk_num++;
+ palmas_clks_init_configure(cinfo);
we dont handle error here?
+I wonder if we can simplify this with CLK_OF_DECLARE - I suppose it
+MODULE_AUTHOR("Laxman Dewangan <ldewangan@xxxxxxxxxx>");
+MODULE_LICENSE("GPL v2");
wont work if of_clk_init(NULL); was invoked previously.