[PATCH] ASoC: kirkwood: simplify clock handling

From
Russell King - ARM Linux <hidden>
Date
2013-09-24 19:05:34
Also in
alsa-devel
Reply to
Jean-Francois Moine, 2013-09-24
On Tue, Sep 24, 2013 at 09:04:42PM +0200, Jean-Francois Moine wrote:
So, the probe code should be:

	/* check first if an external clock is declared */
	priv->extclk = devm_clk_get(&pdev->dev, "extclk");
	if (!IS_ERR(priv->extclk)) {
		... use the external clock ...
	} else {

		/* get the first clock which must be the dco */
		priv->clk = devm_clk_get(&pdev->dev, NULL);
		if (IS_ERR(priv->clk))
			.. error, no clock ..
		.. use the internal dco ...
	}
Actually no - we need to get and enable the internal clock so that we can
access the registers - the Dove locks solid if you access the audio block
registers without its internal clock to the audio block enabled.
Thread (24 messages) 24 messages, 8 authors, last reply 2014-02-24
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help