aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Delvare <[email protected]>2024-05-31 11:17:48 +0200
committerAndi Shyti <[email protected]>2024-06-12 17:07:34 +0100
commitcbf3fb5b29e99e3689d63a88c3cddbffa1b8de99 (patch)
treee5bfc6242a434ff0aae39b32be14fdd26635ffe9
parentd6d5645e5fc1233a7ba950de4a72981c394a2557 (diff)
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") Signed-off-by: Jean Delvare <[email protected]> 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]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Jarkko Nikula <[email protected]> Tested-by: Jarkko Nikula <[email protected]> Signed-off-by: Andi Shyti <[email protected]>
-rw-r--r--drivers/i2c/busses/i2c-designware-slave.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-designware-slave.c b/drivers/i2c/busses/i2c-designware-slave.c
index 2e079cf20bb5..78e2c47e3d7d 100644
--- a/drivers/i2c/busses/i2c-designware-slave.c
+++ b/drivers/i2c/busses/i2c-designware-slave.c
@@ -220,7 +220,7 @@ static const struct i2c_algorithm i2c_dw_algo = {
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;