Skip to content

Commit

Permalink
i2c: designware: Fix the functionality flags of the slave-only interface
Browse files Browse the repository at this point in the history
[ Upstream commit cbf3fb5 ]

When an I2C adapter acts only as a slave, it should not claim to
support I2C master capabilities.

Fixes: 5b6d721 ("i2c: designware: enable SLAVE in platform module")
Signed-off-by: Jean Delvare <[email protected]>
Cc: Luis Oliveira <[email protected]>
Cc: Jarkko Nikula <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Mika Westerberg <[email protected]>
Cc: Jan Dabros <[email protected]>
Cc: Andi Shyti <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Acked-by: Jarkko Nikula <[email protected]>
Tested-by: Jarkko Nikula <[email protected]>
Signed-off-by: Andi Shyti <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
jdelvare authored and gregkh committed Jun 21, 2024
1 parent 1a0bbb9 commit e44999e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-designware-slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static const struct i2c_algorithm i2c_dw_algo = {

void i2c_dw_configure_slave(struct dw_i2c_dev *dev)
{
dev->functionality = I2C_FUNC_SLAVE | DW_IC_DEFAULT_FUNCTIONALITY;
dev->functionality = I2C_FUNC_SLAVE;

dev->slave_cfg = DW_IC_CON_RX_FIFO_FULL_HLD_CTRL |
DW_IC_CON_RESTART_EN | DW_IC_CON_STOP_DET_IFADDRESSED;
Expand Down

0 comments on commit e44999e

Please sign in to comment.