Thread (6 messages) flat view 6 messages, 3 authors, 2014-06-11

Re: [PATCH v6 2/2] i2c: sunxi: add P2WI (Push/Pull 2 Wire Interface) controller support

From: Arnd Bergmann <hidden>
Date: 2014-06-11 08:49:06
Also in: linux-arm-kernel, linux-i2c, lkml

On Wednesday 11 June 2014 10:39:40 Boris BREZILLON wrote:
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-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Acked-by: Arnd Bergmann <redacted>
quoted hunk ↗ jump to hunk
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index c94db1c..a6023fe 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -771,6 +771,18 @@ config I2C_STU300
          This driver can also be built as a module. If so, the module
          will be called i2c-stu300.
 
+config I2C_SUN6I_P2WI
+       tristate "Allwinner sun6i internal P2WI controller"
+       depends on MACH_SUN6I && RESET_CONTROLLER
One very minor comment: I wonder if we should make this 

	depends on RESET_CONTROLLER
	depends on MACH_SUN6I || COMPILE_TEST

instead so we have better build coverage. I haven't tested if building
on other architectures works, or if there are additional dependencies.

No need to change this if there are no other comments.

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help