devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/6] i2c: designware: add I2C SLAVE support
@ 2017-02-15 12:22 Luis Oliveira
  2017-02-15 12:22 ` [PATCH v6 1/6] i2c: designware: Cleaning and comment style fixes Luis Oliveira
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Luis Oliveira @ 2017-02-15 12:22 UTC (permalink / raw)
  To: wsa-z923LK4zBo2bacvFa/9K2g, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, jarkko.nikula-VuQAYsv1563Yd54FQh9/CA,
	andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA,
	mika.westerberg-VuQAYsv1563Yd54FQh9/CA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Luis.Oliveira-HKixBCOQz3hWk0Htik3J/w,
	Ramiro.Oliveira-HKixBCOQz3hWk0Htik3J/w,
	Joao.Pinto-HKixBCOQz3hWk0Htik3J/w,
	CARLOS.PALMINHA-HKixBCOQz3hWk0Htik3J/w

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                         |  15 +-
 drivers/i2c/busses/Makefile                        |   2 +
 drivers/i2c/busses/i2c-designware-common.c         | 281 ++++++++++++
 drivers/i2c/busses/i2c-designware-core.h           | 180 +++++++-
 ...c-designware-core.c => i2c-designware-master.c} | 475 +++------------------
 drivers/i2c/busses/i2c-designware-platdrv.c        | 116 +++--
 drivers/i2c/busses/i2c-designware-slave.c          | 403 +++++++++++++++++
 8 files changed, 1034 insertions(+), 454 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.11.0


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-02-28 15:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-15 12:22 [PATCH v6 0/6] i2c: designware: add I2C SLAVE support Luis Oliveira
2017-02-15 12:22 ` [PATCH v6 1/6] i2c: designware: Cleaning and comment style fixes Luis Oliveira
     [not found]   ` <8a176efc405d4f13d3fc1b5565d2a2b1c931a018.1487009294.git.lolivei-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2017-02-15 13:12     ` Andy Shevchenko
2017-02-28 15:07       ` Jarkko Nikula
2017-02-15 12:22 ` [PATCH v6 2/6] i2c: designware: refactoring of the i2c-designware Luis Oliveira
2017-02-15 12:22 ` [PATCH v6 3/6] i2c: designware: MASTER mode as separated driver Luis Oliveira
2017-02-15 12:22 ` [PATCH v6 4/6] i2c: designware: introducing I2C_SLAVE definitions Luis Oliveira
2017-02-27 17:24   ` Rob Herring
2017-02-15 12:22 ` [PATCH v6 5/6] i2c: designware: add SLAVE mode functions Luis Oliveira
     [not found] ` <cover.1487009294.git.lolivei-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2017-02-15 12:22   ` [PATCH v6 6/6] i2c: designware: enable SLAVE in platform module Luis Oliveira

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