diff mbox series

i2c: designware: Fix the functionality flags of the slave-only interface

Message ID 20240531111748.441a85b6@endymion.delvare
State New
Headers show
Series i2c: designware: Fix the functionality flags of the slave-only interface | expand

Commit Message

Jean Delvare May 31, 2024, 9:17 a.m. UTC
When an I2C adapter acts only as a slave, it should not claim to
support I2C master capabilities.

Fixes: 5b6d721b266a ("i2c: designware: enable SLAVE in platform module")
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Luis Oliveira <lolivei@synopsys.com>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Jan Dabros <jsd@semihalf.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
---
 drivers/i2c/busses/i2c-designware-slave.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

--- linux-6.9.orig/drivers/i2c/busses/i2c-designware-slave.c
+++ linux-6.9/drivers/i2c/busses/i2c-designware-slave.c
@@ -220,7 +220,7 @@  static const struct i2c_algorithm i2c_dw
 
 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;