linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
Subject: [PATCH 0/3] WIP: i2c slave support
Date: Tue,  2 Sep 2014 20:02:38 +0200	[thread overview]
Message-ID: <1409680961-12632-1-git-send-email-wsa@the-dreams.de> (raw)

From: Wolfram Sang <wsa+renesas-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org>

I am currently working on the long standing issue of slave support for the I2C
framework. Here is a very rough first draft, so you can see what path I chose.
Three big things are still missing: documentation, a driver supporting the
hooks created here, and testing. So, this is more a draft how the interface
could look like and will soon get the details when I implement the support for
the i2c-rcar driver. If you want to comment, that is appreciated. However,
please focus on high-level comments, not implementation details. There is a lot
of sloppiness in the details, I do know. If they are still present in the first
real patches, then you can complain ;)

Since docs are still missing, here is a rough description: A software slave
driver is a standard I2C driver which will be matched against a standard I2C
client. The exception is that it requests a slave instance from its adapter via
i2c_slave_request() in probe. It provides a callback which will be invoked in
case events happen for this slave.

And again: This is a draft, up to now compile tested only.

Wolfram Sang (3):
  WIP: i2c core changes for slave support
  WIP: sketch of an slave-eeprom simulator
  WIP: adapt dts for i2c slave use

 arch/arm/boot/dts/r8a7790-lager.dts |  15 ++--
 drivers/i2c/i2c-core.c              |  42 +++++++++++
 drivers/i2c/i2c-slave-eeprom.c      | 140 ++++++++++++++++++++++++++++++++++++
 include/linux/i2c-slave.h           |  28 ++++++++
 include/linux/i2c.h                 |   5 ++
 5 files changed, 225 insertions(+), 5 deletions(-)
 create mode 100644 drivers/i2c/i2c-slave-eeprom.c
 create mode 100644 include/linux/i2c-slave.h

-- 
2.0.0

             reply	other threads:[~2014-09-02 18:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 18:02 Wolfram Sang [this message]
     [not found] ` <1409680961-12632-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-09-02 18:02   ` [PATCH 1/3] WIP: i2c core changes for slave support Wolfram Sang
2014-09-02 18:02   ` [PATCH 2/3] WIP: sketch of an slave-eeprom simulator Wolfram Sang
2014-09-02 18:02   ` [PATCH 3/3] WIP: adapt dts for i2c slave use Wolfram Sang

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=1409680961-12632-1-git-send-email-wsa@the-dreams.de \
    --to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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).