Re: [PATCH] i2c: s3c2410: Add SMBus emulation for block read

2013-04-15 Thread Wolfram Sang
I don't know if that can happen, but if the block has length 0 (that is, only consists of a single byte that is read as 0) the is_msglast() test returns 0 which might be wrong. Maybe even if it cannot regularily happen handle it in a sane way? Length of 0 is illegal according to the specs,

Re: [PATCH] i2c: s3c2410: Add SMBus emulation for block read

2013-04-09 Thread Wolfram Sang
On Tue, Mar 26, 2013 at 07:59:56PM +0530, Prasanna Kumar wrote: From: Jaemin Yoo jmin@samsung.com SMBus read and write are supported by the emulation layer of i2c framework if the controller doesn't have SMBus features. I2C_M_RECV_LEN flag is used to let i2c drivers know rx length is

Re: [PATCH] i2c: s3c2410: Add SMBus emulation for block read

2013-04-09 Thread Uwe Kleine-König
Hello, On Tue, Mar 26, 2013 at 07:59:56PM +0530, Prasanna Kumar wrote: diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 17c5c37..e4ab9ea 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -309,6 +309,12 @@ static

[PATCH] i2c: s3c2410: Add SMBus emulation for block read

2013-03-26 Thread Prasanna Kumar
From: Jaemin Yoo jmin@samsung.com SMBus read and write are supported by the emulation layer of i2c framework if the controller doesn't have SMBus features. I2C_M_RECV_LEN flag is used to let i2c drivers know rx length is not yet determined but will be read to the first byte in rx buffer.