diff options
| -rw-r--r-- | drivers/i2c/busses/i2c-rcar.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index d4fa8eba6e9d..06d47aafbb79 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c | |||
| @@ -561,6 +561,12 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap, | |||
| 561 | 561 | ||
| 562 | ret = -EINVAL; | 562 | ret = -EINVAL; |
| 563 | for (i = 0; i < num; i++) { | 563 | for (i = 0; i < num; i++) { |
| 564 | /* This HW can't send STOP after address phase */ | ||
| 565 | if (msgs[i].len == 0) { | ||
| 566 | ret = -EOPNOTSUPP; | ||
| 567 | break; | ||
| 568 | } | ||
| 569 | |||
| 564 | /*-------------- spin lock -----------------*/ | 570 | /*-------------- spin lock -----------------*/ |
| 565 | spin_lock_irqsave(&priv->lock, flags); | 571 | spin_lock_irqsave(&priv->lock, flags); |
| 566 | 572 | ||
| @@ -625,7 +631,8 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap, | |||
| 625 | 631 | ||
| 626 | static u32 rcar_i2c_func(struct i2c_adapter *adap) | 632 | static u32 rcar_i2c_func(struct i2c_adapter *adap) |
| 627 | { | 633 | { |
| 628 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; | 634 | /* This HW can't do SMBUS_QUICK and NOSTART */ |
| 635 | return I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK); | ||
| 629 | } | 636 | } |
| 630 | 637 | ||
| 631 | static const struct i2c_algorithm rcar_i2c_algo = { | 638 | static const struct i2c_algorithm rcar_i2c_algo = { |
