Thread (6 messages) 6 messages, 4 authors, 2011-11-08
STALE5356d

[PATCH] I2C: add CSR SiRFprimaII on-chip I2C controllers driver

From: Russell King - ARM Linux <hidden>
Date: 2011-11-02 10:52:10
Also in: linux-i2c

On Wed, Nov 02, 2011 at 10:39:04AM +0000, Jamie Iles wrote:
quoted
+	clk = clk_get(&pdev->dev, NULL);
+	if (IS_ERR(clk)) {
+		err = PTR_ERR(clk);
+		dev_err(&pdev->dev, "Clock get failed\n");
+		goto out;
+	}
+
+	clk_enable(clk);
The return value of clk_enable() should really be checked.
Now that the clk_prepare() patch has been enabled, new drivers should be
written assuming that clk_prepare() will be necessary before clk_enable().

And one may query why it's not possible to use clk_enable()...clk_disable()
around the transfer itself, so the clock can be turned off while the device
is idle.  Obviously if its expecting to be operated in slave mode as well
then you may need to keep the clock enabled.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help