]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
i2c: sunxi: add P2WI (Push/Pull 2 Wire Interface) controller support
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Wed, 11 Jun 2014 09:17:30 +0000 (11:17 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 11 Jun 2014 22:24:06 +0000 (00:24 +0200)
commit3e833490fae55633f6adc03a5e6172d47c01f3e4
tree3288418e64b59594729bdd049bff06120dfc6a64
parentbb336ba0aaa5bef253d60bdeb08537ddecc7f42f
i2c: sunxi: add P2WI (Push/Pull 2 Wire Interface) controller support

The P2WI controller looks like an SMBus controller which only supports byte
data transfers. But, it differs from standard SMBus protocol on several
aspects:
- it supports only one slave device, and thus drop the address field
- it adds a parity bit every 8bits of data
- only one read access is required to read a byte (instead of a write
  followed by a read access in standard SMBus protocol)
- there's no Ack bit after each byte transfer

This means this bus cannot be used to interface with standard SMBus
devices (the only known device to support this interface is the AXP221
PMIC).
However the P2WI protocol is close enough to SMBus to be integrated in
the I2C subsystem (see this thread [1] for detailed reasons that led to
integrating this driver in the I2C subsystem).

[1] http://www.spinics.net/lists/linux-i2c/msg15066.html

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/Kconfig
drivers/i2c/busses/Makefile
drivers/i2c/busses/i2c-sun6i-p2wi.c [new file with mode: 0644]