linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis Oliveira <Luis.Oliveira@synopsys.com>
To: wsa@the-dreams.de, robh+dt@kernel.org, mark.rutland@arm.com,
	jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com,
	mika.westerberg@linux.intel.com, linux-i2c@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Luis.Oliveira@synopsys.com, Ramiro.Oliveira@synopsys.com,
	Joao.Pinto@synopsys.com, CARLOS.PALMINHA@synopsys.com
Subject: [PATCH v11 0/6] i2c: designware: add I2C SLAVE support
Date: Wed, 14 Jun 2017 11:43:20 +0100	[thread overview]
Message-ID: <cover.1497025304.git.lolivei@synopsys.com> (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

             reply	other threads:[~2017-06-14 10:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14 10:43 Luis Oliveira [this message]
     [not found] ` <cover.1497025304.git.lolivei-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2017-06-14 10:43   ` [PATCH v11 1/6] i2c: designware: Cleaning and comment style fixes Luis Oliveira
2017-06-19 16:26     ` Wolfram Sang
2017-06-14 10:43 ` [PATCH v11 2/6] i2c: designware: refactoring of the i2c-designware Luis Oliveira
2017-06-19 16:26   ` Wolfram Sang
2017-06-14 10:43 ` [PATCH v11 3/6] i2c: designware: MASTER mode as separated driver Luis Oliveira
2017-06-19 16:26   ` Wolfram Sang
2017-06-14 10:43 ` [PATCH v11 4/6] i2c: designware: introducing I2C_SLAVE definitions Luis Oliveira
2017-06-19 16:27   ` Wolfram Sang
2017-06-14 10:43 ` [PATCH v11 5/6] i2c: designware: add SLAVE mode functions Luis Oliveira
     [not found]   ` <bef9f237bed23f0ea05499b085103f7eea9058a1.1497025304.git.lolivei-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2017-06-14 12:20     ` Andy Shevchenko
2017-06-14 13:06       ` Luis Oliveira
2017-06-19 15:58         ` Wolfram Sang
2017-06-19 16:05           ` Andy Shevchenko
2017-06-19 16:10             ` Luis Oliveira
     [not found]             ` <CAHp75VfpgOZ72=5F3aN_tfau3TnyGLsdKt=sdx_ZJ04wtxMtJg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-19 16:22               ` Wolfram Sang
2017-06-20  8:03                 ` Jarkko Nikula
2017-06-18  4:53     ` kbuild test robot
2017-06-14 10:43 ` [PATCH v11 6/6] i2c: designware: enable SLAVE in platform module Luis Oliveira
2017-06-14 12:21   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1497025304.git.lolivei@synopsys.com \
    --to=luis.oliveira@synopsys.com \
    --cc=CARLOS.PALMINHA@synopsys.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=Ramiro.Oliveira@synopsys.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).