提交 845f2a6d 编写于 作者: M Michael Shych 提交者: Wolfram Sang

i2c: mlxcpld: Fix adapter functionality support callback

It fixes report about supported functionality.
Functionality can be different up to CPLD capability.

Fixes: 6bec23bf (i2c: mlxcpld: add master driver for mellanox systems)
Signed-off-by: NMichael Shych <michaelsh@mellanox.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 c9bfdc7c
...@@ -450,7 +450,14 @@ static int mlxcpld_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, ...@@ -450,7 +450,14 @@ static int mlxcpld_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
static u32 mlxcpld_i2c_func(struct i2c_adapter *adap) static u32 mlxcpld_i2c_func(struct i2c_adapter *adap)
{ {
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_SMBUS_BLOCK_DATA; struct mlxcpld_i2c_priv *priv = i2c_get_adapdata(adap);
if (priv->smbus_block)
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL |
I2C_FUNC_SMBUS_I2C_BLOCK | I2C_FUNC_SMBUS_BLOCK_DATA;
else
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL |
I2C_FUNC_SMBUS_I2C_BLOCK;
} }
static const struct i2c_algorithm mlxcpld_i2c_algo = { static const struct i2c_algorithm mlxcpld_i2c_algo = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册