[PATCH] i2c: qup: use address helper function in read transfer

2016-05-05 Thread Naveen Kaje
qup_i2c_issue_read() derives the address from i2c_msg. This called in the read path when I2C_M_RD flag is set. Therefore, use the 8 bit address helper function. Signed-off-by: Naveen Kaje --- drivers/i2c/busses/i2c-qup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: [V2, 1/2] drivers: i2c: qup: Fix broken dma when CONFIG_DEBUG_SG is enabled

2016-05-06 Thread Naveen Kaje
: Sricharan R Reviewed-by: Andy Gross Tested on QDF2432 with ACPI and SMBus support patches for regressions. Note that this platform does not use DMA mode. Tested-by: Naveen Kaje --- drivers/i2c/busses/i2c-qup.c | 53 ++-- 1 file changed, 17 insertions

Re: [V2,2/2] drivers: i2c: qup: Fix error handling

2016-05-06 Thread Naveen Kaje
x27; which happens when waiting for events that would never happen when there is already an error condition on the bus. Signed-off-by: Sricharan R Reviewed-by: Andy Gross Hi Sricharan, Looks good to me. Tested on QDF2432 platform. Reviewed-by: Naveen Kaje Tested-by: Naveen Kaje --- d

[PATCH 1/2] i2c: qup: add ACPI support

2016-05-03 Thread Naveen Kaje
Add support to get the device parameters from ACPI. Assume that the clocks are managed by firmware. Signed-off-by: Naveen Kaje --- drivers/i2c/busses/i2c-qup.c | 61 +--- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/drivers/i2c/busses

[PATCH 2/2] i2c: qup: support SMBus block read

2016-05-03 Thread Naveen Kaje
from this byte, the QUP hardware is configured to read the rest. Signed-off-by: Naveen Kaje --- drivers/i2c/busses/i2c-qup.c | 95 ++-- 1 file changed, 66 insertions(+), 29 deletions(-) diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c

Re: [PATCH 0/2] drivers: i2c: qup: Some misc fixes

2016-05-04 Thread Naveen Kaje
From: Naveen Kaje Hi Sricharan, I tested these changes. They did not cause any regressions on QDF2432. Note that QDF2432 does not use DMA mode. I based my patches (http://marc.info/?l=linux-i2c&m=146231797008963&w=2 and http://marc.info/?l=linux-i2c&m=146231798708969&w=2) on to

Re: [PATCH 1/2] i2c: qup: add ACPI support

2016-05-11 Thread Naveen Kaje
On 5/10/2016 12:05 AM, Sricharan wrote: +additional lists Add support to get the device parameters from ACPI. Assume that the clocks are managed by firmware. Signed-off-by: Naveen Kaje --- + bool input_clk_ctrl = true; qup = devm_kzalloc(&pdev->dev, size

Re: [PATCH 2/2] i2c: qup: support SMBus block read

2016-05-11 Thread Naveen Kaje
hardware to read one byte. Once the message length is known from this byte, the QUP hardware is configured to read the rest. Signed-off-by: Naveen Kaje --- drivers/i2c/busses/i2c-qup.c | 95 ++--- --- 1 file changed, 66 insertions(+), 29 deletions(-) diff

[PATCH v2 2/2] i2c: qup: support SMBus block read

2016-05-11 Thread Naveen Kaje
from this byte, the QUP hardware is configured to read the rest. Signed-off-by: Naveen Kaje --- drivers/i2c/busses/i2c-qup.c | 72 ++-- 1 file changed, 69 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c

[PATCH v2 1/2] i2c: qup: add ACPI support

2016-05-11 Thread Naveen Kaje
Add support to get the device parameters from ACPI. Assume that the clocks are managed by firmware. Signed-off-by: Naveen Kaje --- drivers/i2c/busses/i2c-qup.c | 59 +--- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/drivers/i2c/busses

Re: [PATCH v2 1/2] i2c: qup: add ACPI support

2016-05-19 Thread Naveen Kaje
Hi Sricharan, On 5/18/2016 12:04 AM, Sricharan wrote: Hi, Add support to get the device parameters from ACPI. Assume that the clocks are managed by firmware. Signed-off-by: Naveen Kaje --- drivers/i2c/busses/i2c-qup.c | 59 +--- 1 file changed, 44

Re: [PATCH v2 2/2] i2c: qup: support SMBus block read

2016-05-19 Thread Naveen Kaje
Hi Sricharan, On 5/18/2016 1:06 AM, Sricharan wrote: Hi, +static bool qup_i2c_check_msg_len(struct i2c_msg *msg) { + return ((msg->flags & I2C_M_RD) && (msg->flags & I2C_M_RECV_LEN)); } + +static int qup_i2c_set_tags_smb(u16 addr, u8 *tags, struct qup_i2c_dev *qup, +

Re: [PATCH v2 2/2] i2c: qup: support SMBus block read

2016-05-19 Thread Naveen Kaje
Hi Timur, Sricharan, On 5/19/2016 2:21 PM, Timur Tabi wrote: Naveen Kaje wrote: +tags[len++] = QUP_TAG_V2_DATARD; +/* 0 implies 256 bytes */ +if (data_len == QUP_READ_LIMIT) +tags[len++] = 0; +else +tags[len++] = data_len