Skip to content

i2c: designware: Enable mode swapping

Heikki Krogerus linux-i2c lkml 3 versions – Applied

Status from this message: merged to i2c/i2c-host.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 1 replyApplied
  2. v26 patches 9 repliesSuperseded
  3. v16 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- Explaining the removal of the "target only" description in the commit message
- Added Acks and Reviewed-by tags from Mika and Andy

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4i2c: designware: Combine some of the common functionsdrivers/i2c/busses/i2c-designware-common.c drivers/i2c/busses/i2c-designware-core.h drivers/i2c/busses/i2c-designware-master.c +1 more+126 -1430 replies
2/4i2c: designware: Combine the init functionsdrivers/i2c/busses/i2c-designware-amdisp.c drivers/i2c/busses/i2c-designware-common.c drivers/i2c/busses/i2c-designware-core.h +2 more+85 -1170 replies
3/4i2c: designware: Enable mode swappingdrivers/i2c/busses/i2c-designware-common.c drivers/i2c/busses/i2c-designware-core.h drivers/i2c/busses/i2c-designware-master.c +1 more+57 -430 replies
4/4i2c: designware: Remove an unnecessary conditiondrivers/i2c/busses/i2c-designware-common.c+3 -50 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchMika WesterbergAndy Shevchenko
1/4A-b
2/4A-b R-b
3/4A-b
4/4A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/4] i2c: designware: Enable mode swapping

Hi,

Changed since v2:
- Explaining the removal of the "target only" description in the commit message
- Added Acks and Reviewed-by tags from Mika and Andy

Changed since v1:
- The init cb is replaced with i2c_dw_init() also in i2c-designware-amdisp.c
- Checking I2C_FUNC_SLAVE in i2c_dw_reg_slave()

The original cover letter:

It's currently not possible to support MCTP or any other protocol that requires support for both modes with the DesignWare I2C because the driver can only be used in one mode. I'm assuming that the driver was designed this way because the DesignWare I2C can not be operated as I2C master and I2C slave simultaneously, however, that does not actually mean both modes could not be supported at the same time. See the patch 5/6 for more detailed explanation.

This series will enable support for both modes in the driver by utilising a simple mode swap method, and that way make it possible to support MCTP, IPMI, SMBus Host Notification Protocol, and any other protocol requires the support for both modes with the DesignWare I2C.

thanks,

Heikki Krogerus (4):
i2c: designware: Combine some of the common functions
i2c: designware: Combine the init functions
i2c: designware: Enable mode swapping
i2c: designware: Remove an unnecessary condition

 drivers/i2c/busses/i2c-designware-amdisp.c |   4 +-
 drivers/i2c/busses/i2c-designware-common.c | 211 +++++++++++++++++++--
 drivers/i2c/busses/i2c-designware-core.h   |  23 +--
 drivers/i2c/busses/i2c-designware-master.c | 173 ++---------------
 drivers/i2c/busses/i2c-designware-slave.c  | 126 ++----------
 5 files changed, 250 insertions(+), 287 deletions(-)
Signature · 1 line
2.50.1