lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue,  9 Sep 2014 16:54:26 +0200
From:	Wolfram Sang <wsa@...-dreams.de>
To:	linux-i2c@...r.kernel.org
Cc:	linux-sh@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Jean Delvare <jdelvare@...e.de>,
	Magnus Damm <magnus.damm@...il.com>
Subject: [RFC 0/4] i2c: slave support framework for Linux devices

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ