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

2014-05-09 Thread Boris BREZILLON
On 09/05/2014 16:31, Maxime Ripard wrote: Hi Boris, On Wed, May 07, 2014 at 07:58:35PM +0200, Boris BREZILLON wrote: [...] + + r = platform_get_resource(pdev, IORESOURCE_MEM, 0); + p2wi-regs = devm_ioremap_resource(dev, r); + if (IS_ERR(p2wi-regs)) { +

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

2014-05-09 Thread Hans de Goede
Hi, On 05/09/2014 04:50 PM, Boris BREZILLON wrote: On 09/05/2014 16:31, Maxime Ripard wrote: Hi Boris, On Wed, May 07, 2014 at 07:58:35PM +0200, Boris BREZILLON wrote: [...] + +r = platform_get_resource(pdev, IORESOURCE_MEM, 0); +p2wi-regs = devm_ioremap_resource(dev, r); +

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

2014-05-07 Thread Boris BREZILLON
The P2WI 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