i2c: at91: Fix the functionality flags of the slave-only interface
authorJean Delvare <jdelvare@suse.de>
Fri, 31 May 2024 09:19:14 +0000 (11:19 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Wed, 12 Jun 2024 16:07:33 +0000 (17:07 +0100)
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>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-at91-slave.c

index d6eeea5166c04fa948ee7759606df0a9b6b39098..131a67d9d4a68910cf225d7474b91d2fc03e1c23 100644 (file)
@@ -106,8 +106,7 @@ static int at91_unreg_slave(struct i2c_client *slave)
 
 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 = {