diff mbox series

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

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

Commit Message

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

Fixes: 9d3ca54b550c ("i2c: at91: added slave mode support")
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Juergen Fitschen <me@jue.yt>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev>
---
 drivers/i2c/busses/i2c-at91-slave.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

--- linux-6.9.orig/drivers/i2c/busses/i2c-at91-slave.c
+++ linux-6.9/drivers/i2c/busses/i2c-at91-slave.c
@@ -106,8 +106,7 @@  static int at91_unreg_slave(struct i2c_c
 
 static u32 at91_twi_func(struct i2c_adapter *adapter)
 {
-	return I2C_FUNC_SLAVE | I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL
-		| I2C_FUNC_SMBUS_READ_BLOCK_DATA;
+	return I2C_FUNC_SLAVE;
 }
 
 static const struct i2c_algorithm at91_twi_algorithm_slave = {