Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1665699

[PATCH v11 0/6] i2c: designware: add I2C SLAVE support

From Luis Oliveira <Luis.Oliveira@synopsys.com>
Newsgroups linux.kernel
Subject [PATCH v11 0/6] i2c: designware: add I2C SLAVE support
Date 2017-06-14 12:50 +0200
Message-ID <tSe25-459-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


The purpose of this patchset is to enable Linux to be a I2C slave by 
enabling the slave functionality in the designware I2C controller and at
the same time it does some cleaning of the existing code.

The patch 1 is for cleaning and commentary fix.
The patch 2 refactors the original i2c-designware-core and extracts all
master functions to a i2c-designware-master source file as suggested by
Andy Shevchenko when I first submited the update. The patch 3 then
separates the MASTER flow from the common flow.
The patch 4 introduces the SLAVE necessary definitions to the 
i2c-designware library and adds a how-to-use example to the designware.txt
in device tree bindings.
The patch 5 adds the necessary functions to give the ability to be a SLAVE
to the controller and for that changes also had to be made in the 
Makefile and Kconfig.
The patch 6 enables the SLAVE mode to be detected by the platform module.

The functionality was tested using the hardware independent slave-eeprom
driver based on top of i2c/for-next. The tree I used can be found here:

https://git.kernel.org/cgit/linux/kernel/git/wsa/linux.git/log/?h=i2c/for-next

Luis Oliveira (6):
  i2c: designware: Cleaning and comment style fixes.
  i2c: designware: refactoring of the i2c-designware
  i2c: designware: MASTER mode as separated driver
  i2c: designware: introducing I2C_SLAVE definitions
  i2c: designware: add SLAVE mode functions
  i2c: designware: enable SLAVE in platform module

 .../devicetree/bindings/i2c/i2c-designware.txt     |  16 +-
 drivers/i2c/busses/Kconfig                         |  14 +-
 drivers/i2c/busses/Makefile                        |   4 +
 drivers/i2c/busses/i2c-designware-common.c         | 281 +++++++++++++
 drivers/i2c/busses/i2c-designware-core.h           | 180 +++++++-
 ...c-designware-core.c => i2c-designware-master.c} | 467 +++------------------
 drivers/i2c/busses/i2c-designware-pcidrv.c         |   9 +-
 drivers/i2c/busses/i2c-designware-platdrv.c        | 117 ++++--
 drivers/i2c/busses/i2c-designware-slave.c          | 398 ++++++++++++++++++
 9 files changed, 1033 insertions(+), 453 deletions(-)
 create mode 100644 drivers/i2c/busses/i2c-designware-common.c
 rename drivers/i2c/busses/{i2c-designware-core.c => i2c-designware-master.c} (60%)
 create mode 100644 drivers/i2c/busses/i2c-designware-slave.c

-- 
2.13.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v11 0/6] i2c: designware: add I2C SLAVE support Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-06-14 12:50 +0200
  [PATCH v11 4/6] i2c: designware: introducing I2C_SLAVE definitions Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-06-14 12:50 +0200
    Re: [PATCH v11 4/6] i2c: designware: introducing I2C_SLAVE  definitions Wolfram Sang <wsa@the-dreams.de> - 2017-06-19 18:30 +0200

csiph-web