Thread (6 messages) 6 messages, 3 authors, 2012-10-25
DORMANTno replies

[PATCH v2] i2c: omap: re-factor omap_i2c_init function

From: Felipe Balbi <hidden>
Date: 2012-10-25 10:09:15
Also in: linux-i2c, linux-omap

Hi,

On Thu, Oct 25, 2012 at 03:04:29PM +0530, Shubhrajyoti Datta wrote:
On Thu, Oct 25, 2012 at 12:06 PM, Felipe Balbi [off-list ref] wrote:

[...]
quoted
quoted
+      * Don't write to this register if the IE state is 0 as it can
+      * cause deadlock.
+      */
+     if (dev->iestate)
+             omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate);
+}
+
 static int omap_i2c_init(struct omap_i2c_dev *dev)
 {
-     u16 psc = 0, scll = 0, sclh = 0, buf = 0;
+     u16 psc = 0, scll = 0, sclh = 0;
      u16 fsscll = 0, fssclh = 0, hsscll = 0, hssclh = 0;
      unsigned long fclk_rate = 12000000;
      unsigned long timeout;
@@ -337,11 +358,8 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
                       * REVISIT: Some wkup sources might not be needed.
                       */
                      dev->westate = OMAP_I2C_WE_ALL;
-                     omap_i2c_write_reg(dev, OMAP_I2C_WE_REG,
-                                                     dev->westate);
remove the comment too since now that's done by some other function ?
The comment is applicable to the OMAP_I2C_WE_ALL value.
So I thought it could be kept.

dont feel strongly though.
I see. that's ok then.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121025/9ddee6e4/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help