Staging: iio: adis16209/220/240/350: tuning spi delay to make hardware more stable
authorBarry Song <21cnbao@gmail.com>
Fri, 4 Jun 2010 09:19:54 +0000 (17:19 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Jun 2010 22:16:20 +0000 (15:16 -0700)
Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/accel/adis16209_core.c
drivers/staging/iio/accel/adis16220_core.c
drivers/staging/iio/accel/adis16240_core.c
drivers/staging/iio/imu/adis16350_core.c

index b3acdc37e354217bcd89ea60745bd06197e7086b..c696160fc2a0e1355ac77a4984c98c0cf7b6f27c 100644 (file)
@@ -76,11 +76,13 @@ static int adis16209_spi_write_reg_16(struct device *dev,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
+                       .delay_usecs = 30,
                }, {
                        .tx_buf = st->tx + 2,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
+                       .delay_usecs = 30,
                },
        };
 
@@ -120,13 +122,13 @@ static int adis16209_spi_read_reg_16(struct device *dev,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 20,
+                       .delay_usecs = 30,
                }, {
                        .rx_buf = st->rx,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 20,
+                       .delay_usecs = 30,
                },
        };
 
index 7daa3d72286c398d19c8a4aa7c8e8be11b494dfb..bb7d76539cd76c63bac5004538ba9fcabb86917a 100644 (file)
@@ -72,13 +72,13 @@ static int adis16220_spi_write_reg_16(struct device *dev,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 25,
+                       .delay_usecs = 35,
                }, {
                        .tx_buf = st->tx + 2,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 25,
+                       .delay_usecs = 35,
                },
        };
 
@@ -118,13 +118,13 @@ static int adis16220_spi_read_reg_16(struct device *dev,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 25,
+                       .delay_usecs = 35,
                }, {
                        .rx_buf = st->rx,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 25,
+                       .delay_usecs = 35,
                },
        };
 
@@ -291,9 +291,9 @@ static int adis16220_check_status(struct device *dev)
        if (status & ADIS16220_DIAG_STAT_FLASH_UPT)
                dev_err(dev, "Flash update failed\n");
        if (status & ADIS16220_DIAG_STAT_POWER_HIGH)
-               dev_err(dev, "Power supply above 5.25V\n");
+               dev_err(dev, "Power supply above 3.625V\n");
        if (status & ADIS16220_DIAG_STAT_POWER_LOW)
-               dev_err(dev, "Power supply below 4.75V\n");
+               dev_err(dev, "Power supply below 3.15V\n");
 
 error_ret:
        return ret;
index 316022f25b1968b0a21f6f7bf5cd3cc6d14d1ec5..ba336cbea809b8bcb8dd6459c7a48e91c1ba31c5 100644 (file)
@@ -74,13 +74,13 @@ static int adis16240_spi_write_reg_16(struct device *dev,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 25,
+                       .delay_usecs = 35,
                }, {
                        .tx_buf = st->tx + 2,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 25,
+                       .delay_usecs = 35,
                },
        };
 
@@ -120,13 +120,13 @@ static int adis16240_spi_read_reg_16(struct device *dev,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 25,
+                       .delay_usecs = 35,
                }, {
                        .rx_buf = st->rx,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 25,
+                       .delay_usecs = 35,
                },
        };
 
index 145966b04d4cc22cc94deb753d6e489875d9cabb..0bb19a9d12f5f876dab6ed84f006b3823250b48e 100644 (file)
@@ -75,13 +75,13 @@ static int adis16350_spi_write_reg_16(struct device *dev,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 25,
+                       .delay_usecs = 35,
                }, {
                        .tx_buf = st->tx + 2,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 25,
+                       .delay_usecs = 35,
                },
        };
 
@@ -121,13 +121,13 @@ static int adis16350_spi_read_reg_16(struct device *dev,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 25,
+                       .delay_usecs = 35,
                }, {
                        .rx_buf = st->rx,
                        .bits_per_word = 8,
                        .len = 2,
                        .cs_change = 1,
-                       .delay_usecs = 25,
+                       .delay_usecs = 35,
                },
        };