diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-07-24 08:13:59 -0400 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2012-07-24 08:13:59 -0400 |
commit | fb604a3d58b79ef722942f664f11dee5e1f73ea4 (patch) | |
tree | f9e1f081d7c1b4f16e3274ce20e8574e1c18d04a /drivers/i2c/busses/i2c-omap.c | |
parent | 72fc2c7f78b0c365454e60ad33b0e74aea43e3ab (diff) |
i2c-omap: Add support for I2C_M_STOP message flag
Generate a stop condition after each message marked with I2C_M_STOP.
[JD: Add I2C_FUNC_PROTOCOL_MANGLING.]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-omap.c')
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 801df6000e9b..c2148332de0f 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -545,6 +545,8 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap, | |||
545 | if (dev->speed > 400) | 545 | if (dev->speed > 400) |
546 | w |= OMAP_I2C_CON_OPMODE_HS; | 546 | w |= OMAP_I2C_CON_OPMODE_HS; |
547 | 547 | ||
548 | if (msg->flags & I2C_M_STOP) | ||
549 | stop = 1; | ||
548 | if (msg->flags & I2C_M_TEN) | 550 | if (msg->flags & I2C_M_TEN) |
549 | w |= OMAP_I2C_CON_XA; | 551 | w |= OMAP_I2C_CON_XA; |
550 | if (!(msg->flags & I2C_M_RD)) | 552 | if (!(msg->flags & I2C_M_RD)) |
@@ -658,7 +660,8 @@ out: | |||
658 | static u32 | 660 | static u32 |
659 | omap_i2c_func(struct i2c_adapter *adap) | 661 | omap_i2c_func(struct i2c_adapter *adap) |
660 | { | 662 | { |
661 | return I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK); | 663 | return I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK) | |
664 | I2C_FUNC_PROTOCOL_MANGLING; | ||
662 | } | 665 | } |
663 | 666 | ||
664 | static inline void | 667 | static inline void |