[3/4] i2c: xlp9xx: report SMBus block read functionality

Message ID 1516253964-4615-3-git-send-email-george.cherian@cavium.com
State Accepted
Headers show
Series
  • [1/4] i2c: xlp9xx: return ENXIO on slave address NACK
Related show

Commit Message

George Cherian Jan. 18, 2018, 5:39 a.m.
From: Dmitry Bazhenov <dmitry.bazhenov@auriga.com>

Report SMBus block read functionality which is actually supported.

Signed-off-by: Dmitry Bazhenov <dmitry.bazhenov@auriga.com>
---
 drivers/i2c/busses/i2c-xlp9xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Wolfram Sang Feb. 26, 2018, 8:21 p.m. | #1
On Thu, Jan 18, 2018 at 05:39:23AM +0000, George Cherian wrote:
> From: Dmitry Bazhenov <dmitry.bazhenov@auriga.com>
> 
> Report SMBus block read functionality which is actually supported.
> 
> Signed-off-by: Dmitry Bazhenov <dmitry.bazhenov@auriga.com>

Applied to for-next but squashed it with patch 2 because I'd think you
also want that fix before enabling it in 'functionality'. Let me know if
you disagree.

Patch

diff --git a/drivers/i2c/busses/i2c-xlp9xx.c b/drivers/i2c/busses/i2c-xlp9xx.c
index b5b224e..1f6d780 100644
--- a/drivers/i2c/busses/i2c-xlp9xx.c
+++ b/drivers/i2c/busses/i2c-xlp9xx.c
@@ -374,8 +374,8 @@  static int xlp9xx_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
 
 static u32 xlp9xx_i2c_functionality(struct i2c_adapter *adapter)
 {
-	return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C |
-		I2C_FUNC_10BIT_ADDR;
+	return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_SMBUS_READ_BLOCK_DATA |
+			I2C_FUNC_I2C | I2C_FUNC_10BIT_ADDR;
 }
 
 static const struct i2c_algorithm xlp9xx_i2c_algo = {