Skip to contentSkip to conversation

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

PATCH Applied Jean Delvare 2 participants 2 messages May 31, 2024 – Jun 4, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

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")
Cc Juergen Fitschen <[email protected]>
Cc Ludovic Desroches <[email protected]>
Cc Codrin Ciubotariu <[email protected]>
Cc Andi Shyti <[email protected]>
Cc Nicolas Ferre <[email protected]>
Cc Alexandre Belloni <[email protected]>
Cc Claudiu Beznea <[email protected]>
---
 drivers/i2c/busses/i2c-at91-slave.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/i2c/busses/i2c-at91-slave.c +1 -2
@@ -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 = {
Signature · 2 lines
Jean Delvare
SUSE L3 Support
maintainer Applied
#1 lore raw

Hi

Quoted 4 lines · Jean Delvare

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

Applied to i2c/i2c-host-fixes on

git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git

Thank you,
Andi

Patches applied
===============
[1/1] i2c: at91: Fix the functionality flags of the slave-only interface

      commit: 66b9a4ab75e8ce82faf9ec5344a870c768aeed78