This is a note to let you know that I've just added the patch titled

    mfd: Avoid tps6586x burst writes

to the 2.6.37-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mfd-avoid-tps6586x-burst-writes.patch
and it can be found in the queue-2.6.37 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 4b57018dcd6418e18c08088c89f123da8a7bfc45 Mon Sep 17 00:00:00 2001
From: [email protected] <[email protected]>
Date: Thu, 24 Feb 2011 10:18:13 +0530
Subject: mfd: Avoid tps6586x burst writes

From: [email protected] <[email protected]>

commit 4b57018dcd6418e18c08088c89f123da8a7bfc45 upstream.

tps6586 does not support burst writes. i2c writes have to be
1 byte at a time.

Signed-off-by: Varun Wadekar <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/mfd/tps6586x.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -152,12 +152,12 @@ static inline int __tps6586x_write(struc
 static inline int __tps6586x_writes(struct i2c_client *client, int reg,
                                  int len, uint8_t *val)
 {
-       int ret;
+       int ret, i;
 
-       ret = i2c_smbus_write_i2c_block_data(client, reg, len, val);
-       if (ret < 0) {
-               dev_err(&client->dev, "failed writings to 0x%02x\n", reg);
-               return ret;
+       for (i = 0; i < len; i++) {
+               ret = __tps6586x_write(client, reg + i, *(val + i));
+               if (ret < 0)
+                       return ret;
        }
 
        return 0;


Patches currently in stable-queue which might be from [email protected] are

queue-2.6.37/mfd-avoid-tps6586x-burst-writes.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to