mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
72fc2c7f78
commit
fb604a3d58
1 changed files with 4 additions and 1 deletions
|
@ -545,6 +545,8 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap,
|
||||||
if (dev->speed > 400)
|
if (dev->speed > 400)
|
||||||
w |= OMAP_I2C_CON_OPMODE_HS;
|
w |= OMAP_I2C_CON_OPMODE_HS;
|
||||||
|
|
||||||
|
if (msg->flags & I2C_M_STOP)
|
||||||
|
stop = 1;
|
||||||
if (msg->flags & I2C_M_TEN)
|
if (msg->flags & I2C_M_TEN)
|
||||||
w |= OMAP_I2C_CON_XA;
|
w |= OMAP_I2C_CON_XA;
|
||||||
if (!(msg->flags & I2C_M_RD))
|
if (!(msg->flags & I2C_M_RD))
|
||||||
|
@ -658,7 +660,8 @@ out:
|
||||||
static u32
|
static u32
|
||||||
omap_i2c_func(struct i2c_adapter *adap)
|
omap_i2c_func(struct i2c_adapter *adap)
|
||||||
{
|
{
|
||||||
return I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK);
|
return I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK) |
|
||||||
|
I2C_FUNC_PROTOCOL_MANGLING;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue