Skip to contentSkip to conversation

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

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

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

PATCH 1/1 i2c: designware: 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 5b6d721b266a ("i2c: designware: enable SLAVE in platform module")
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]>
---
 drivers/i2c/busses/i2c-designware-slave.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-designware-slave.c +1 -1
@@ -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;
Signature · 2 lines
Jean Delvare
SUSE L3 Support
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jean Delvare

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")

The below can be separated by

---

to avoid noise in the commit messages. The effect, namely Cc'ing to people, will stay the same.

Quoted 7 lines
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]>

---

Other than that, LGTM,

Quoted 14 lines
 drivers/i2c/busses/i2c-designware-slave.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-designware-slave.c +1 -1
@@ -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;
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 7 lines · Andy Shevchenko
Quoted 5 lines · Jean Delvare

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")
Quoted 6 lines

The below can be separated by

---

to avoid noise in the commit messages. The effect, namely Cc'ing to people, will stay the same.

Noted, I'll do that from now on.

Quoted 1 line
Quoted 1 line
Cc Luis Oliveira <[email protected]>

BTW, the address above is no longer valid so it should be omitted when replying.

Quoted 9 lines
Quoted 6 lines

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]>
---

Other than that, LGTM,

Thanks,

Signature · 2 lines
Jean Delvare
SUSE L3 Support
Acked-by Tested-by
#3 lore raw
Quoted 12 lines · Jean Delvare
Quoted 11 lines · Andy Shevchenko
Quoted 5 lines · Jean Delvare

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")

The below can be separated by

---

Quoted 19 lines
Quoted 2 lines

to avoid noise in the commit messages. The effect, namely Cc'ing to people, will stay the same.

Noted, I'll do that from now on.

Quoted 1 line
Quoted 1 line
Cc Luis Oliveira <[email protected]>

BTW, the address above is no longer valid so it should be omitted when replying.

Quoted 9 lines
Quoted 6 lines
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]>

---

Other than that, LGTM,

maintainer Applied
#4 lore raw
In reply to Jean Delvare

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-next on

git://git.kernel.org/pub/scm/linux/kernel/git/local tree

Thank you,
Andi

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

      commit: 9224b8546453758f73210256597f60f897f8dafe