Skip to content

Commit

Permalink
i2c-designware: i2c_dw_func: Set I2C_FUNC_SMBUS_foo bits
Browse files Browse the repository at this point in the history
Set proper I2C_FUNC_SMBUS_* bits so that the driver could be used with
some utilities requiring SMBus functionalities, such as i2c-tools.

Note that DW I2C core doesn't support I2C_FUNC_SMBUS_QUICK, as it's not
capable of zero-length data transactions.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Shinya Kuribayashi authored and Ben Dooks committed Dec 9, 2009
1 parent ae72222 commit 52d7e43
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/i2c/busses/i2c-designware.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,12 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)

static u32 i2c_dw_func(struct i2c_adapter *adap)
{
return I2C_FUNC_I2C | I2C_FUNC_10BIT_ADDR;
return I2C_FUNC_I2C |
I2C_FUNC_10BIT_ADDR |
I2C_FUNC_SMBUS_BYTE |
I2C_FUNC_SMBUS_BYTE_DATA |
I2C_FUNC_SMBUS_WORD_DATA |
I2C_FUNC_SMBUS_I2C_BLOCK;
}

static u32 i2c_dw_read_clear_intrbits(struct dw_i2c_dev *dev)
Expand Down

0 comments on commit 52d7e43

Please sign in to comment.