<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/clk-provider.h, branch v3.5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>clk: Provide dummy clk_unregister()</title>
<updated>2012-05-15T19:02:39+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-04-18T08:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1df5c939f6d9dff7dfbe108d93133b9636baa607'/>
<id>1df5c939f6d9dff7dfbe108d93133b9636baa607</id>
<content type='text'>
While there's no actual implementation behind it having the call to use
in drivers makes them feel neater from a driver author point of view. An
actual implementation can wait for someone who needs to use the function
in a real system.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
[mturquette@linaro.org: void return type instead of int -EINVAL]
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While there's no actual implementation behind it having the call to use
in drivers makes them feel neater from a driver author point of view. An
actual implementation can wait for someone who needs to use the function
in a real system.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
[mturquette@linaro.org: void return type instead of int -EINVAL]
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: add a fixed factor clock</title>
<updated>2012-05-08T21:13:25+00:00</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2012-05-03T10:06:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f0948f59dbc8e725a96ba16da666e8f5cdd43ba8'/>
<id>f0948f59dbc8e725a96ba16da666e8f5cdd43ba8</id>
<content type='text'>
Having fixed factors/dividers in hardware is a common pattern, so
add a basic clock type doing this. It basically describes a fixed
factor clock using a nominator and a denominator.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@st.com&gt;
Tested-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
[mturquette@linaro.org: constify parent_names in static init macro]
[mturquette@linaro.org: copy/paste bug from mux in static init macro]
[mturquette@linaro.org: fix error handling in clk_register_fixed_factor]
[mturquette@linaro.org: improve division accuracy; thanks to Saravana]
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Having fixed factors/dividers in hardware is a common pattern, so
add a basic clock type doing this. It basically describes a fixed
factor clock using a nominator and a denominator.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@st.com&gt;
Tested-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
[mturquette@linaro.org: constify parent_names in static init macro]
[mturquette@linaro.org: copy/paste bug from mux in static init macro]
[mturquette@linaro.org: fix error handling in clk_register_fixed_factor]
[mturquette@linaro.org: improve division accuracy; thanks to Saravana]
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Use a separate struct for holding init data.</title>
<updated>2012-05-02T01:13:20+00:00</updated>
<author>
<name>Saravana Kannan</name>
<email>skannan@codeaurora.org</email>
</author>
<published>2012-04-26T05:58:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0197b3ea0f66cd2a11417f58fe1812858ea77908'/>
<id>0197b3ea0f66cd2a11417f58fe1812858ea77908</id>
<content type='text'>
Create a struct clk_init_data to hold all data that needs to be passed from
the platfrom specific driver to the common clock framework during clock
registration. Add a pointer to this struct inside clk_hw.

This has several advantages:
* Completely hides struct clk from many clock platform drivers and static
  clock initialization code that don't care for static initialization of
  the struct clks.
* For platforms that want to do complete static initialization, it removed
  the need to directly mess with the struct clk's fields while still
  allowing to statically allocate struct clk. This keeps the code more
  future proof even if they include clk-private.h.
* Simplifies the generic clk_register() function and allows adding optional
  fields in the future without modifying the function signature.
* Simplifies the static initialization of clocks on all platforms by
  removing the need for forward delcarations or convoluted macros.

Signed-off-by: Saravana Kannan &lt;skannan@codeaurora.org&gt;
[mturquette@linaro.org: kept DEFINE_CLK_* macros and __clk_init]
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Jeremy Kerr &lt;jeremy.kerr@canonical.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Arnd Bergman &lt;arnd.bergmann@linaro.org&gt;
Cc: Paul Walmsley &lt;paul@pwsan.com&gt;
Cc: Shawn Guo &lt;shawn.guo@freescale.com&gt;
Cc: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Cc: Jamie Iles &lt;jamie@jamieiles.com&gt;
Cc: Richard Zhao &lt;richard.zhao@linaro.org&gt;
Cc: Saravana Kannan &lt;skannan@codeaurora.org&gt;
Cc: Magnus Damm &lt;magnus.damm@gmail.com&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: Linus Walleij &lt;linus.walleij@stericsson.com&gt;
Cc: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Cc: Deepak Saxena &lt;dsaxena@linaro.org&gt;
Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create a struct clk_init_data to hold all data that needs to be passed from
the platfrom specific driver to the common clock framework during clock
registration. Add a pointer to this struct inside clk_hw.

This has several advantages:
* Completely hides struct clk from many clock platform drivers and static
  clock initialization code that don't care for static initialization of
  the struct clks.
* For platforms that want to do complete static initialization, it removed
  the need to directly mess with the struct clk's fields while still
  allowing to statically allocate struct clk. This keeps the code more
  future proof even if they include clk-private.h.
* Simplifies the generic clk_register() function and allows adding optional
  fields in the future without modifying the function signature.
* Simplifies the static initialization of clocks on all platforms by
  removing the need for forward delcarations or convoluted macros.

Signed-off-by: Saravana Kannan &lt;skannan@codeaurora.org&gt;
[mturquette@linaro.org: kept DEFINE_CLK_* macros and __clk_init]
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Jeremy Kerr &lt;jeremy.kerr@canonical.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Arnd Bergman &lt;arnd.bergmann@linaro.org&gt;
Cc: Paul Walmsley &lt;paul@pwsan.com&gt;
Cc: Shawn Guo &lt;shawn.guo@freescale.com&gt;
Cc: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Cc: Jamie Iles &lt;jamie@jamieiles.com&gt;
Cc: Richard Zhao &lt;richard.zhao@linaro.org&gt;
Cc: Saravana Kannan &lt;skannan@codeaurora.org&gt;
Cc: Magnus Damm &lt;magnus.damm@gmail.com&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: Linus Walleij &lt;linus.walleij@stericsson.com&gt;
Cc: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Cc: Deepak Saxena &lt;dsaxena@linaro.org&gt;
Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Fix typo in comment</title>
<updated>2012-04-24T23:37:40+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@st.com</email>
</author>
<published>2012-04-17T11:15:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1f73f31ad6e37df0679f6842b7405d96515ec8b1'/>
<id>1f73f31ad6e37df0679f6842b7405d96515ec8b1</id>
<content type='text'>
CLK_MUX_INDEX_BIT is mistakenly written as CLK_MUX_INDEX_BITWISE in comment. Fix
it.

CLK_GATE_SET_TO_DISABLE is mistakenly written as CLK_GATE_SET_DISABLE in
comment. Fix it.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@st.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CLK_MUX_INDEX_BIT is mistakenly written as CLK_MUX_INDEX_BITWISE in comment. Fix
it.

CLK_GATE_SET_TO_DISABLE is mistakenly written as CLK_GATE_SET_DISABLE in
comment. Fix it.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@st.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: pass parent_rate into .set_rate</title>
<updated>2012-04-24T23:37:40+00:00</updated>
<author>
<name>Shawn Guo</name>
<email>shawn.guo@linaro.org</email>
</author>
<published>2012-04-12T12:50:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1c0035d710dd3bfa86d58f851b8737c7f11a9bbc'/>
<id>1c0035d710dd3bfa86d58f851b8737c7f11a9bbc</id>
<content type='text'>
For most of .set_rate implementation, parent_rate will be used, so just
like passing parent_rate into .recalc_rate, let's pass parent_rate into
.set_rate too.

It also updates the kernel doc for .set_rate ops.

Signed-off-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For most of .set_rate implementation, parent_rate will be used, so just
like passing parent_rate into .recalc_rate, let's pass parent_rate into
.set_rate too.

It also updates the kernel doc for .set_rate ops.

Signed-off-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: basic: improve parent_names &amp; return errors</title>
<updated>2012-04-24T23:37:39+00:00</updated>
<author>
<name>Mike Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2012-03-27T00:51:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=27d545915fd49cbe18a3877d82359896e9851efb'/>
<id>27d545915fd49cbe18a3877d82359896e9851efb</id>
<content type='text'>
This patch is the basic clk version of 'clk: core: copy parent_names &amp;
return error codes'.

The registration functions are changed to allow the core code to copy
the array of strings and allow platforms to declare those arrays as
__initdata.

This patch also converts all of the basic clk registration functions to
return error codes which better aligns them with the existing clk.h api.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is the basic clk version of 'clk: core: copy parent_names &amp;
return error codes'.

The registration functions are changed to allow the core code to copy
the array of strings and allow platforms to declare those arrays as
__initdata.

This patch also converts all of the basic clk registration functions to
return error codes which better aligns them with the existing clk.h api.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: core: copy parent_names &amp; return error codes</title>
<updated>2012-04-24T23:37:39+00:00</updated>
<author>
<name>Mike Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2012-03-29T21:30:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d1302a36a7f1c33d1a8babc6a510e1401a5e5aed'/>
<id>d1302a36a7f1c33d1a8babc6a510e1401a5e5aed</id>
<content type='text'>
This patch cleans up clk_register and solves a few bugs by teaching
clk_register and __clk_init to return error codes (instead of just NULL)
to better align with the existing clk.h api.

Along with that change this patch also introduces a new behavior whereby
clk_register copies the parent_names array, thus allowing platforms to
declare their parent_names arrays as __initdata.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch cleans up clk_register and solves a few bugs by teaching
clk_register and __clk_init to return error codes (instead of just NULL)
to better align with the existing clk.h api.

Along with that change this patch also introduces a new behavior whereby
clk_register copies the parent_names array, thus allowing platforms to
declare their parent_names arrays as __initdata.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Constify parent name arrays</title>
<updated>2012-04-24T23:37:39+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-03-21T20:01:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d305fb78f31209596c9135d396a0d3af7ac86947'/>
<id>d305fb78f31209596c9135d396a0d3af7ac86947</id>
<content type='text'>
Drivers should be able to declare their arrays of parent names as const
so the APIs need to accept const arguments.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
[mturquette@linaro.org: constified gate]
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Drivers should be able to declare their arrays of parent names as const
so the APIs need to accept const arguments.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
[mturquette@linaro.org: constified gate]
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: declare clk_ops of basic clks in clk-provider.h</title>
<updated>2012-04-24T23:37:38+00:00</updated>
<author>
<name>Shawn Guo</name>
<email>shawn.guo@linaro.org</email>
</author>
<published>2012-03-27T07:23:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bffad66e31fe9d94cd096f2e4de7c683e1ae32ef'/>
<id>bffad66e31fe9d94cd096f2e4de7c683e1ae32ef</id>
<content type='text'>
Besides the static initialization, the clk_ops of basic clks could
also be used by particular clk type being subclass of the basic clks.

For example, clk_busy_divider has the same clk_ops as clk_divider,
except it has to wait for a busy bit before return success with
.set_rate.  clk_busy_divider will somehow reuse clk_ops of clk_divider.

Since clk-provider.h is included by clk-private.h, it's safe to move
those clk_ops declaration of basic clks form  clk-private.h into
clk-provider.h, so that implementation of clks like clk_busy_divider
above do not need to include clk-private.h to access those clk_ops.

Signed-off-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Besides the static initialization, the clk_ops of basic clks could
also be used by particular clk type being subclass of the basic clks.

For example, clk_busy_divider has the same clk_ops as clk_divider,
except it has to wait for a busy bit before return success with
.set_rate.  clk_busy_divider will somehow reuse clk_ops of clk_divider.

Since clk-provider.h is included by clk-private.h, it's safe to move
those clk_ops declaration of basic clks form  clk-private.h into
clk-provider.h, so that implementation of clks like clk_busy_divider
above do not need to include clk-private.h to access those clk_ops.

Signed-off-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: basic clock hardware types</title>
<updated>2012-03-16T20:35:02+00:00</updated>
<author>
<name>Mike Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2012-03-16T06:11:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9d9f78ed9af0e465d2fd15550471956e7f559b9f'/>
<id>9d9f78ed9af0e465d2fd15550471956e7f559b9f</id>
<content type='text'>
Many platforms support simple gateable clocks, fixed-rate clocks,
adjustable divider clocks and multi-parent multiplexer clocks.

This patch introduces basic clock types for the above-mentioned hardware
which share some common characteristics.

Based on original work by Jeremy Kerr and contribution by Jamie Iles.
Dividers and multiplexor clocks originally contributed by Richard Zhao &amp;
Sascha Hauer.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@ti.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Tested-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Reviewed-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Jeremy Kerr &lt;jeremy.kerr@canonical.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Arnd Bergman &lt;arnd.bergmann@linaro.org&gt;
Cc: Paul Walmsley &lt;paul@pwsan.com&gt;
Cc: Shawn Guo &lt;shawn.guo@freescale.com&gt;
Cc: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Cc: Jamie Iles &lt;jamie@jamieiles.com&gt;
Cc: Richard Zhao &lt;richard.zhao@linaro.org&gt;
Cc: Saravana Kannan &lt;skannan@codeaurora.org&gt;
Cc: Magnus Damm &lt;magnus.damm@gmail.com&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: Linus Walleij &lt;linus.walleij@stericsson.com&gt;
Cc: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Cc: Deepak Saxena &lt;dsaxena@linaro.org&gt;
Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many platforms support simple gateable clocks, fixed-rate clocks,
adjustable divider clocks and multi-parent multiplexer clocks.

This patch introduces basic clock types for the above-mentioned hardware
which share some common characteristics.

Based on original work by Jeremy Kerr and contribution by Jamie Iles.
Dividers and multiplexor clocks originally contributed by Richard Zhao &amp;
Sascha Hauer.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@ti.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Tested-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Reviewed-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Jeremy Kerr &lt;jeremy.kerr@canonical.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Arnd Bergman &lt;arnd.bergmann@linaro.org&gt;
Cc: Paul Walmsley &lt;paul@pwsan.com&gt;
Cc: Shawn Guo &lt;shawn.guo@freescale.com&gt;
Cc: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Cc: Jamie Iles &lt;jamie@jamieiles.com&gt;
Cc: Richard Zhao &lt;richard.zhao@linaro.org&gt;
Cc: Saravana Kannan &lt;skannan@codeaurora.org&gt;
Cc: Magnus Damm &lt;magnus.damm@gmail.com&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: Linus Walleij &lt;linus.walleij@stericsson.com&gt;
Cc: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Cc: Deepak Saxena &lt;dsaxena@linaro.org&gt;
Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
