diff options
author | Jean Delvare <khali@linux-fr.org> | 2010-03-02 12:23:41 +0100 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2010-03-02 12:23:41 +0100 |
commit | 6d376fcc28d98f7f8f652755ae4dca1ff7240563 (patch) | |
tree | f238f98bbbf2fb3e2f270571404d3c9a91c5281a /drivers/i2c/busses/i2c-parport.c | |
parent | c05d490234b7cf1715d9568d2041d9bc598a0b45 (diff) |
i2c-parport: Give powered devices some time to settle
When the i2c-parport adapter is reponsible for powering devices, it
would seem reasonable to give them some time to settle before trying
to access them.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-parport.c')
-rw-r--r-- | drivers/i2c/busses/i2c-parport.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c index 0d8998610c7..056af182099 100644 --- a/drivers/i2c/busses/i2c-parport.c +++ b/drivers/i2c/busses/i2c-parport.c @@ -27,6 +27,7 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> +#include <linux/delay.h> #include <linux/parport.h> #include <linux/i2c.h> #include <linux/i2c-algo-bit.h> @@ -185,8 +186,11 @@ static void i2c_parport_attach (struct parport *port) parport_setsda(port, 1); parport_setscl(port, 1); /* Other init if needed (power on...) */ - if (adapter_parm[type].init.val) + if (adapter_parm[type].init.val) { line_set(port, 1, &adapter_parm[type].init); + /* Give powered devices some time to settle */ + msleep(100); + } if (i2c_bit_add_bus(&adapter->adapter) < 0) { printk(KERN_ERR "i2c-parport: Unable to register with I2C\n"); |