<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/clk, branch v4.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-03-15T22:07:08Z</updated>
<entry>
<title>Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux</title>
<updated>2015-03-15T22:07:08Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-03-15T22:07:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1ee89c519a0aca101d2e173c5544a52877d763ec'/>
<id>urn:sha1:1ee89c519a0aca101d2e173c5544a52877d763ec</id>
<content type='text'>
Pull clock framework fixes from Michael Turquette:
 "The clk fixes for 4.0-rc4 comprise three themes.

  First are the usual driver fixes for new regressions since v3.19.

  Second are fixes to the common clock divider type caused by recent
  changes to how we round clock rates.  This affects many clock drivers
  that use this common code.

  Finally there are fixes for drivers that improperly compared struct
  clk pointers (drivers must not deref these pointers).  While some of
  these drivers have done this for a long time, this did not cause a
  problem until we started generating unique struct clk pointers for
  every consumer.  A new function, clk_is_match was introduced to get
  these drivers working again and they are fixed up to no longer deref
  the pointers themselves"

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
  ASoC: kirkwood: fix struct clk pointer comparing
  ASoC: fsl_spdif: fix struct clk pointer comparing
  ARM: imx: fix struct clk pointer comparing
  clk: introduce clk_is_match
  clk: don't export static symbol
  clk: divider: fix calculation of initial best divider when rounding to closest
  clk: divider: fix selection of divider when rounding to closest
  clk: divider: fix calculation of maximal parent rate for a given divider
  clk: divider: return real rate instead of divider value
  clk: qcom: fix platform_no_drv_owner.cocci warnings
  clk: qcom: fix platform_no_drv_owner.cocci warnings
  clk: qcom: Add PLL4 vote clock
  clk: qcom: lcc-msm8960: Fix PLL rate detection
  clk: qcom: Fix slimbus n and m val offsets
  clk: ti: Fix FAPLL parent enable bit handling
</content>
</entry>
<entry>
<title>clk: introduce clk_is_match</title>
<updated>2015-03-11T22:56:59Z</updated>
<author>
<name>Michael Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2015-02-25T17:11:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d3801effda19b21012b5d1981e96cc277df85fd'/>
<id>urn:sha1:3d3801effda19b21012b5d1981e96cc277df85fd</id>
<content type='text'>
Some drivers compare struct clk pointers as a means of knowing
if the two pointers reference the same clock hardware. This behavior is
dubious (drivers must not dereference struct clk), but did not cause any
regressions until the per-user struct clk patch was merged. Now the test
for matching clk's will always fail with per-user struct clk's.

clk_is_match is introduced to fix the regression and prevent drivers
from comparing the pointers manually.

Fixes: 035a61c314eb ("clk: Make clk API return per-user struct clk instances")
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Cc: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
[arnd@arndb.de: Fix COMMON_CLK=N &amp;&amp; HAS_CLK=Y config]
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
[sboyd@codeaurora.org: const arguments to clk_is_match() and
remove unnecessary ternary operation]
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>clk: don't export static symbol</title>
<updated>2015-03-11T22:53:18Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2015-03-11T16:56:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f55ac0655a6e42d8299b78c23ee70301f7956d5e'/>
<id>urn:sha1:f55ac0655a6e42d8299b78c23ee70301f7956d5e</id>
<content type='text'>
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@r@
type T;
identifier f;
@@

static T f (...) { ... }

@@
identifier r.f;
declarer name EXPORT_SYMBOL_GPL;
@@

-EXPORT_SYMBOL_GPL(f);
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Fixes: 035a61c314eb "clk: Make clk API return per-user struct clk instances"
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>clk: divider: fix calculation of initial best divider when rounding to closest</title>
<updated>2015-03-09T21:20:17Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2015-02-21T10:40:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9315514252a95bca37be3ef8a93f835ed91c2855'/>
<id>urn:sha1:9315514252a95bca37be3ef8a93f835ed91c2855</id>
<content type='text'>
Similar to the reasoning for the previous commit

	DIV_ROUND_CLOSEST(parent_rate, rate)

might not be the best integer divisor to get a good approximation for
rate from parent_rate (given the metric for CLK_DIVIDER_ROUND_CLOSEST).

For example assume a parent rate of 1000 Hz and a target rate of 700.
Using DIV_ROUND_CLOSEST the suggested divisor gets calculated to 1
resulting in a target rate of 1000 with a delta of 300 to the desired
rate. With choosing 2 as divisor however the resulting rate is 500 which
is nearer to 700.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Acked-by: Maxime Coquelin &lt;maxime.coquelin@st.com&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: divider: fix selection of divider when rounding to closest</title>
<updated>2015-03-09T21:19:54Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2015-02-21T10:40:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=26bac95aa88c2b1747808c0b885abe7814c0165d'/>
<id>urn:sha1:26bac95aa88c2b1747808c0b885abe7814c0165d</id>
<content type='text'>
It's an invalid approach to assume that among two divider values
the one nearer the exact divider is the better one.

Assume a parent rate of 1000 Hz, a divider with CLK_DIVIDER_POWER_OF_TWO
and a target rate of 89 Hz. The exact divider is ~ 11.236 so 8 and 16
are the candidates to choose from yielding rates 125 Hz and 62.5 Hz
respectivly. While 8 is nearer to 11.236 than 16 is, the latter is still
the better divider as 62.5 is nearer to 89 than 125 is.

Fixes: 774b514390b1 (clk: divider: Add round to closest divider)
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Acked-by: Maxime Coquelin &lt;maxime.coquelin@st.com&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: divider: fix calculation of maximal parent rate for a given divider</title>
<updated>2015-03-09T21:19:27Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2015-02-21T10:40:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da321133b53caf7889ed3ca1dabe4cc368db2604'/>
<id>urn:sha1:da321133b53caf7889ed3ca1dabe4cc368db2604</id>
<content type='text'>
The rate provided at the output of a clk-divider is calculated as:

	DIV_ROUND_UP(parent_rate, div)

since commit b11d282dbea2 (clk: divider: fix rate calculation for
fractional rates). So to yield a rate not bigger than r parent_rate
must be &lt;= r * div.

The effect of choosing a parent rate that is too big as was done before
this patch results in wrongly ruling out good dividers.

Note that this is not a complete fix as __clk_round_rate might return a
value &gt;= its 2nd parameter. Also for dividers with
CLK_DIVIDER_ROUND_CLOSEST set the calculation is not accurate. But this
fixes the test case by Sascha Hauer that uses a chain of three dividers
under a fixed clock.

Fixes: b11d282dbea2 (clk: divider: fix rate calculation for fractional rates)
Suggested-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: divider: return real rate instead of divider value</title>
<updated>2015-03-06T17:25:13Z</updated>
<author>
<name>Heiko Stübner</name>
<email>heiko@sntech.de</email>
</author>
<published>2015-02-24T10:39:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2f7bf4af5c8177f6a27d9b67efdeb48f5bdbf821'/>
<id>urn:sha1:2f7bf4af5c8177f6a27d9b67efdeb48f5bdbf821</id>
<content type='text'>
Commit bca9690b9426 ("clk: divider: Make generic for usage elsewhere")
returned only the divider value for read-only dividers instead of the
actual rate.

Fixes: bca9690b9426 ("clk: divider: Make generic for usage elsewhere")
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Reviewed-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Tested-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Acked-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: at91: implement suspend/resume for the PMC irqchip</title>
<updated>2015-03-04T21:11:17Z</updated>
<author>
<name>Boris BREZILLON</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2015-03-02T09:18:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=947f5b108543a6521728466ad5be6e2c4a35a65b'/>
<id>urn:sha1:947f5b108543a6521728466ad5be6e2c4a35a65b</id>
<content type='text'>
The irq line used by the PMC block is shared with several peripherals
including the init timer which is registering its handler with
IRQF_NO_SUSPEND.

Implement the appropriate suspend/resume callback for the PMC irqchip,
and inform irq core that PMC irq handler can be safely called while
the system is suspended by setting IRQF_COND_SUSPEND.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Reviewed-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>clk: qcom: fix platform_no_drv_owner.cocci warnings</title>
<updated>2015-02-25T20:14:35Z</updated>
<author>
<name>kbuild test robot</name>
<email>fengguang.wu@intel.com</email>
</author>
<published>2015-01-28T07:11:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a456fe3d27b1fe502fe3d5fd21cd025e5bf64c22'/>
<id>urn:sha1:a456fe3d27b1fe502fe3d5fd21cd025e5bf64c22</id>
<content type='text'>
drivers/clk/qcom/lcc-msm8960.c:577:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: qcom: fix platform_no_drv_owner.cocci warnings</title>
<updated>2015-02-25T20:14:35Z</updated>
<author>
<name>kbuild test robot</name>
<email>fengguang.wu@intel.com</email>
</author>
<published>2015-01-28T07:00:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b34109a4d07e732dac6db1102a3399177333651'/>
<id>urn:sha1:3b34109a4d07e732dac6db1102a3399177333651</id>
<content type='text'>
drivers/clk/qcom/lcc-ipq806x.c:465:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Rajendra Nayak &lt;rnayak@codeaurora.org&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
</feed>
