All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 0/4] i2c: slave support framework for Linux devices
Date: Tue, 09 Sep 2014 14:54:26 +0000	[thread overview]
Message-ID: <1410274470-12712-1-git-send-email-wsa@the-dreams.de> (raw)

Finally, here is my take on the often desired feature that Linux can not only
be an I2C master, but also an I2C slave. Compared to my draft sent out last
week, this RFC has been tested on hardware (Renesas Lager board) and works \o/

One big part still missing is documentation, so brave ones need to "use the
source". However, this approach turned out to be even less intrusive than
expected, so that is hopefully a good sign.

Basically, an I2C slave is a standard I2C client providing a callback function.
When registering as a slave, the connection to the I2C adapter is made which
uses the callback when a slave event happens. That splits the HW support
(enabling slave mode on the adapter) and SW support (here a generic eeprom
simulator) nicely IMO.

Besides documentation, there are still some error checks missing and more
features could also be added (of course). Yet, I think this version is good
enough to discuss the steps taken here.

The patches are based on top of 3.17-rc4, but will easily apply to renesas/devel.
A git tree can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/slave-support

Comments welcome! Thanks,

   Wolfram


Wolfram Sang (4):
  i2c: core changes for slave support
  i2c: slave: add eeprom simulator driver
  i2c: rcar: add slave support
  ARM: shmobile: r8a7790: adapt DTS for I2C slave support

 arch/arm/boot/dts/r8a7790-lager.dts |  15 ++--
 drivers/i2c/Kconfig                 |  10 +++
 drivers/i2c/Makefile                |   1 +
 drivers/i2c/busses/i2c-rcar.c       | 122 ++++++++++++++++++++++++++---
 drivers/i2c/i2c-core.c              |  44 +++++++++++
 drivers/i2c/i2c-slave-eeprom.c      | 152 ++++++++++++++++++++++++++++++++++++
 include/linux/i2c.h                 |  22 ++++++
 7 files changed, 352 insertions(+), 14 deletions(-)
 create mode 100644 drivers/i2c/i2c-slave-eeprom.c

-- 
2.0.0


WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: linux-i2c@vger.kernel.org
Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Jean Delvare <jdelvare@suse.de>,
	Magnus Damm <magnus.damm@gmail.com>
Subject: [RFC 0/4] i2c: slave support framework for Linux devices
Date: Tue,  9 Sep 2014 16:54:26 +0200	[thread overview]
Message-ID: <1410274470-12712-1-git-send-email-wsa@the-dreams.de> (raw)

Finally, here is my take on the often desired feature that Linux can not only
be an I2C master, but also an I2C slave. Compared to my draft sent out last
week, this RFC has been tested on hardware (Renesas Lager board) and works \o/

One big part still missing is documentation, so brave ones need to "use the
source". However, this approach turned out to be even less intrusive than
expected, so that is hopefully a good sign.

Basically, an I2C slave is a standard I2C client providing a callback function.
When registering as a slave, the connection to the I2C adapter is made which
uses the callback when a slave event happens. That splits the HW support
(enabling slave mode on the adapter) and SW support (here a generic eeprom
simulator) nicely IMO.

Besides documentation, there are still some error checks missing and more
features could also be added (of course). Yet, I think this version is good
enough to discuss the steps taken here.

The patches are based on top of 3.17-rc4, but will easily apply to renesas/devel.
A git tree can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/slave-support

Comments welcome! Thanks,

   Wolfram


Wolfram Sang (4):
  i2c: core changes for slave support
  i2c: slave: add eeprom simulator driver
  i2c: rcar: add slave support
  ARM: shmobile: r8a7790: adapt DTS for I2C slave support

 arch/arm/boot/dts/r8a7790-lager.dts |  15 ++--
 drivers/i2c/Kconfig                 |  10 +++
 drivers/i2c/Makefile                |   1 +
 drivers/i2c/busses/i2c-rcar.c       | 122 ++++++++++++++++++++++++++---
 drivers/i2c/i2c-core.c              |  44 +++++++++++
 drivers/i2c/i2c-slave-eeprom.c      | 152 ++++++++++++++++++++++++++++++++++++
 include/linux/i2c.h                 |  22 ++++++
 7 files changed, 352 insertions(+), 14 deletions(-)
 create mode 100644 drivers/i2c/i2c-slave-eeprom.c

-- 
2.0.0


WARNING: multiple messages have this Message-ID (diff)
From: wsa@the-dreams.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 0/4] i2c: slave support framework for Linux devices
Date: Tue,  9 Sep 2014 16:54:26 +0200	[thread overview]
Message-ID: <1410274470-12712-1-git-send-email-wsa@the-dreams.de> (raw)

Finally, here is my take on the often desired feature that Linux can not only
be an I2C master, but also an I2C slave. Compared to my draft sent out last
week, this RFC has been tested on hardware (Renesas Lager board) and works \o/

One big part still missing is documentation, so brave ones need to "use the
source". However, this approach turned out to be even less intrusive than
expected, so that is hopefully a good sign.

Basically, an I2C slave is a standard I2C client providing a callback function.
When registering as a slave, the connection to the I2C adapter is made which
uses the callback when a slave event happens. That splits the HW support
(enabling slave mode on the adapter) and SW support (here a generic eeprom
simulator) nicely IMO.

Besides documentation, there are still some error checks missing and more
features could also be added (of course). Yet, I think this version is good
enough to discuss the steps taken here.

The patches are based on top of 3.17-rc4, but will easily apply to renesas/devel.
A git tree can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/slave-support

Comments welcome! Thanks,

   Wolfram


Wolfram Sang (4):
  i2c: core changes for slave support
  i2c: slave: add eeprom simulator driver
  i2c: rcar: add slave support
  ARM: shmobile: r8a7790: adapt DTS for I2C slave support

 arch/arm/boot/dts/r8a7790-lager.dts |  15 ++--
 drivers/i2c/Kconfig                 |  10 +++
 drivers/i2c/Makefile                |   1 +
 drivers/i2c/busses/i2c-rcar.c       | 122 ++++++++++++++++++++++++++---
 drivers/i2c/i2c-core.c              |  44 +++++++++++
 drivers/i2c/i2c-slave-eeprom.c      | 152 ++++++++++++++++++++++++++++++++++++
 include/linux/i2c.h                 |  22 ++++++
 7 files changed, 352 insertions(+), 14 deletions(-)
 create mode 100644 drivers/i2c/i2c-slave-eeprom.c

-- 
2.0.0

             reply	other threads:[~2014-09-09 14:54 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09 14:54 Wolfram Sang [this message]
2014-09-09 14:54 ` [RFC 0/4] i2c: slave support framework for Linux devices Wolfram Sang
2014-09-09 14:54 ` Wolfram Sang
2014-09-09 14:54 ` [RFC 1/4] i2c: core changes for slave support Wolfram Sang
2014-09-09 14:54   ` Wolfram Sang
2014-09-09 14:54   ` Wolfram Sang
2014-09-09 14:54   ` Wolfram Sang
2014-09-09 14:54 ` [RFC 2/4] i2c: slave: add eeprom simulator driver Wolfram Sang
2014-09-09 14:54   ` Wolfram Sang
2014-09-09 14:54   ` Wolfram Sang
2014-09-09 14:54   ` Wolfram Sang
2014-09-09 16:34   ` Wolfram Sang
2014-09-09 16:34     ` Wolfram Sang
2014-09-09 16:34     ` Wolfram Sang
2014-09-09 14:54 ` [RFC 3/4] i2c: rcar: add slave support Wolfram Sang
2014-09-09 14:54   ` Wolfram Sang
2014-09-09 14:54   ` Wolfram Sang
2014-09-09 14:54   ` Wolfram Sang
2014-09-09 14:54 ` [RFC 4/4] ARM: shmobile: r8a7790: adapt DTS for I2C " Wolfram Sang
2014-09-09 14:54   ` Wolfram Sang
2014-09-09 14:54   ` Wolfram Sang
2014-09-11 12:17   ` Marc Dietrich
2014-09-11 12:17     ` Marc Dietrich
2014-09-11 12:17     ` Marc Dietrich
2014-09-11 14:12     ` Wolfram Sang
2014-09-11 14:12       ` Wolfram Sang
2014-09-11 14:12       ` Wolfram Sang
2014-09-11 14:12       ` Wolfram Sang
2014-09-11 14:40       ` Wolfram Sang
2014-09-11 14:40         ` Wolfram Sang
2014-09-11 14:40         ` Wolfram Sang
2014-09-11 14:52         ` Marc Dietrich
2014-09-11 14:52           ` Marc Dietrich
2014-09-11 14:52           ` Marc Dietrich
2014-09-11 14:52           ` Marc Dietrich
2014-09-11 14:54           ` Wolfram Sang
2014-09-11 14:54             ` Wolfram Sang
2014-09-11 14:54             ` Wolfram Sang
2014-09-12  7:51             ` Marc Dietrich
2014-09-12  7:51               ` Marc Dietrich
2014-09-12  7:51               ` Marc Dietrich
2014-09-12  7:51               ` Marc Dietrich
2014-09-12  8:08               ` Geert Uytterhoeven
2014-09-12  8:08                 ` Geert Uytterhoeven
2014-09-12  8:08                 ` Geert Uytterhoeven
2014-09-12  8:08                 ` Geert Uytterhoeven
2014-09-12  8:33               ` Wolfram Sang
2014-09-12  8:33                 ` Wolfram Sang
2014-09-12  8:33                 ` Wolfram Sang
2014-09-12  8:33                 ` Wolfram Sang
2014-09-12  9:06                 ` Marc Dietrich
2014-09-12  9:06                   ` Marc Dietrich
2014-09-12  9:06                   ` Marc Dietrich
2014-09-12  9:58                   ` Wolfram Sang
2014-09-12  9:58                     ` Wolfram Sang
2014-09-12  9:58                     ` Wolfram Sang
2014-09-12 10:10                     ` Geert Uytterhoeven
2014-09-12 10:10                       ` Geert Uytterhoeven
2014-09-12 10:10                       ` Geert Uytterhoeven
2014-09-12 10:10                       ` Geert Uytterhoeven
2014-09-12 10:26                       ` Wolfram Sang
2014-09-12 10:26                         ` Wolfram Sang
2014-09-12 10:26                         ` Wolfram Sang
2014-09-12 10:26                         ` Wolfram Sang
2014-09-12 11:42                     ` Marc Dietrich
2014-09-12 11:42                       ` Marc Dietrich
2014-09-12 11:42                       ` Marc Dietrich
2014-09-12 12:15                       ` Wolfram Sang
2014-09-12 12:15                         ` Wolfram Sang
2014-09-12 12:15                         ` Wolfram Sang
2014-09-11 14:49       ` Marc Dietrich
2014-09-11 14:49         ` Marc Dietrich
2014-09-11 14:49         ` Marc Dietrich
2014-09-11 12:06 ` [RFC 0/4] i2c: slave support framework for Linux devices Marc Dietrich
2014-09-11 12:06   ` Marc Dietrich
2014-09-11 12:06   ` Marc Dietrich
2014-09-12  8:58 ` Uwe Kleine-König
2014-09-12  8:58   ` Uwe Kleine-König
2014-09-12  8:58   ` Uwe Kleine-König
2014-09-12  8:58   ` Uwe Kleine-König
2014-09-12  9:12   ` Wolfram Sang
2014-09-12  9:12     ` Wolfram Sang
2014-09-12  9:12     ` 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=1410274470-12712-1-git-send-email-wsa@the-dreams.de \
    --to=wsa@the-dreams.de \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.