RE: [PATCH 6/7] i2c: img-scb: add handle for stop detected interrupt

2015-07-29 Thread Sifan Naeem
Hi James, -Original Message- From: James Hogan Sent: 29 July 2015 16:34 To: Sifan Naeem; Wolfram Sang; linux-i2c@vger.kernel.org Subject: Re: [PATCH 6/7] i2c: img-scb: add handle for stop detected interrupt On 27/07/15 12:56, Sifan Naeem wrote: Stop Detected interrupt

RE: [PATCH 5/7] i2c: img-scb: remove fifo EMPTYING interrupts handle

2015-07-29 Thread Sifan Naeem
Hi James, -Original Message- From: James Hogan Sent: 29 July 2015 17:01 To: Sifan Naeem; Wolfram Sang; linux-i2c@vger.kernel.org Subject: Re: [PATCH 5/7] i2c: img-scb: remove fifo EMPTYING interrupts handle On 27/07/15 12:56, Sifan Naeem wrote: This interrupt could have been

RE: [PATCH 7/7] i2c: img-scb: add handle for Master halt interrupt

2015-07-29 Thread Sifan Naeem
Hi James, -Original Message- From: James Hogan Sent: 29 July 2015 16:59 To: Sifan Naeem; Wolfram Sang; linux-i2c@vger.kernel.org Subject: Re: [PATCH 7/7] i2c: img-scb: add handle for Master halt interrupt On 27/07/15 12:56, Sifan Naeem wrote: Master halt is issued after each

RE: [PATCH 1/8] i2c: img-scb: enable fencing for all versions of the ip

2015-07-28 Thread Sifan Naeem
Hi James, -Original Message- From: James Hogan Sent: 27 July 2015 21:21 To: Sifan Naeem Cc: Wolfram Sang; linux-i2c@vger.kernel.org; Stable kernel (v3.19+) Subject: Re: [PATCH 1/8] i2c: img-scb: enable fencing for all versions of the ip Hi Sifan, On Mon, Jul 27, 2015 at 12

RE: [PATCH 5/8] i2c: img-scb: reset interrupts in img_i2c_soft_reset

2015-07-28 Thread Sifan Naeem
Hi James, -Original Message- From: James Hogan Sent: 28 July 2015 12:36 To: Sifan Naeem; Wolfram Sang; linux-i2c@vger.kernel.org Cc: Stable kernel (v3.19+) Subject: Re: [PATCH 5/8] i2c: img-scb: reset interrupts in img_i2c_soft_reset On 27/07/15 12:47, Sifan Naeem wrote: Reset

RE: [PATCH 7/8] i2c: img-scb: improve transaction complete handle

2015-07-29 Thread Sifan Naeem
Hi James, -Original Message- From: James Hogan Sent: 29 July 2015 13:22 To: Sifan Naeem; Wolfram Sang; linux-i2c@vger.kernel.org Cc: Stable kernel (v3.19+) Subject: Re: [PATCH 7/8] i2c: img-scb: improve transaction complete handle Hi Sifan, On 27/07/15 12:47, Sifan Naeem wrote

RE: [PATCH 4/7] i2c: img-scb: mark transaction as complete when no more data to write

2015-07-29 Thread Sifan Naeem
Hi James, On 27/07/15 12:55, Sifan Naeem wrote: We can mark the transfer as complete without waiting for the stop bit. This is important when handling repeated start transfers as we have to start the next transfer without the stop bit being issued. This doesn't affect the older

RE: [PATCH 3/7] i2c: img-scb: mark transaction as complete when all data is read

2015-07-29 Thread Sifan Naeem
Hi James, On 27/07/15 12:55, Sifan Naeem wrote: We can mark the transfer as complete without waiting for the stop bit. This is important when handling repeated start transfers as we have to start the next transfer without the stop bit being issued. Signed-off-by: Sifan Naeem sifan.na

RE: [PATCH 6/8] i2c: img-scb: remove start bit detected status after handling

2015-07-29 Thread Sifan Naeem
-Original Message- From: James Hogan Sent: 28 July 2015 14:53 To: Sifan Naeem; Wolfram Sang; linux-i2c@vger.kernel.org Cc: Stable kernel (v3.19+) Subject: Re: [PATCH 6/8] i2c: img-scb: remove start bit detected status after handling On 27/07/15 12:47, Sifan Naeem wrote

RE: [PATCH 8/8] i2c: img-scb: verify support for requested bit rate

2015-07-29 Thread Sifan Naeem
Hi James, On 27/07/15 12:47, Sifan Naeem wrote: The requested bit rate can be outside the range supported by the driver. The maximum bit rate this driver supports at the moment is 400Khz. Return -EINVAL if the bit rate is larger than 400khz. Maximum speed supported by the driver can

[PATCH v2 4/7] i2c: img-scb: fix LOW and HIGH period values for the SCL clock

2015-08-14 Thread Sifan Naeem
, and adjusts the TCKH and TCKL values from there should the minimum value for TCKL not be met. This results in duty cycles closer to 50%. Fixes: commit 27bce457d588 (i2c: img-scb: Add Imagination Technologies I2C SCB driver) Signed-off-by: Sifan Naeem sifan.na...@imgtec.com Acked-by: James Hogan james.ho

[PATCH v2 1/7] i2c: img-scb: enable fencing for all versions of the ip

2015-08-14 Thread Sifan Naeem
of the ip, the version check is dropped. Fixes: commit 27bce457d588 (i2c: img-scb: Add Imagination Technologies I2C SCB driver) Signed-off-by: Sifan Naeem sifan.na...@imgtec.com Acked-by: James Hogan james.ho...@imgtec.com Reviewed-by: James Hartley james.hart...@imgtec.com --- drivers/i2c/busses

[PATCH v2 1/5] i2c: img-scb: support I2C_M_IGNORE_NAK

2015-08-14 Thread Sifan Naeem
-by: Sifan Naeem sifan.na...@imgtec.com Acked-by: James Hogan james.ho...@imgtec.com Reviewed-by: James Hartley james.hart...@imgtec.com --- drivers/i2c/busses/i2c-img-scb.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers

[PATCH v2 2/7] i2c: img-scb: do dummy writes before fifo access

2015-08-14 Thread Sifan Naeem
Move scb_wr_rd_fence to before reading from fifo and writing to fifo to make sure the the first read/write is done after the required number of cycles. Fixes: commit 27bce457d588 (i2c: img-scb: Add Imagination Technologies I2C SCB driver) Signed-off-by: Sifan Naeem sifan.na...@imgtec.com Acked

[PATCH v2 5/7] i2c: img-scb: remove start bit detected status after handling

2015-08-14 Thread Sifan Naeem
Remove start bit detected status after it is handled, doing so will prevent this condition being hit for every interrupt on a particular transfer. Fixes: commit 27bce457d588 (i2c: img-scb: Add Imagination Technologies I2C SCB driver) Signed-off-by: Sifan Naeem sifan.na...@imgtec.com Reviewed

[PATCH v2 0/5] i2c: img-scb: enchancements to support i2c on pistachio

2015-08-14 Thread Sifan Naeem
reworked with J Hogan suggestions. 4/5 reworked with J Hogan suggestions. 5/5 moved v1 2/7: support repeated starts on IP v3.3 to the end Sifan Naeem (5): i2c: img-scb: support I2C_M_IGNORE_NAK i2c: img-scb: remove fifo EMPTYING interrupts handle i2c: img-scb: add handle

[PATCH v2 2/5] i2c: img-scb: remove fifo EMPTYING interrupts handle

2015-08-14 Thread Sifan Naeem
Now that we are using the transaction halt interrupt to safely control repeated start transfers, we no longer need to handle the fifo emptying interrupts. Handling this interrupt along with Transaction Halt interrupt can cause erratic behaviour. Signed-off-by: Sifan Naeem sifan.na...@imgtec.com

[PATCH v2 3/5] i2c: img-scb: add handle for stop detected interrupt

2015-08-14 Thread Sifan Naeem
bit. Signed-off-by: Sifan Naeem sifan.na...@imgtec.com --- drivers/i2c/busses/i2c-img-scb.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c index 75a44e794d75..17e13ff475bb 100644 --- a/drivers/i2c

[PATCH v2 0/7] i2c: img-scb: fixes to support i2c on pistachio

2015-08-14 Thread Sifan Naeem
space removed 5/7: line_status used instead of i2c-line_status 6/7: reworked v1 7/8 and added as new patch 7/7: reworked, limit bitrate to maximum supported 12 digit hash id used. Sifan Naeem (7): i2c: img-scb: enable fencing for all versions of the ip i2c: img

[PATCH 5/7] i2c: img-scb: remove fifo EMPTYING interrupts handle

2015-07-27 Thread Sifan Naeem
EMPTYING interrupts is no longer necessary. Handling this interrupt along with Transaction Halt interrupt can cause erratic behaviour. Signed-off-by: Sifan Naeem sifan.na...@imgtec.com --- drivers/i2c/busses/i2c-img-scb.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH 0/7] i2c: img-scb: enchancements to support i2c on pistachio

2015-07-27 Thread Sifan Naeem
/?l=linux-i2cm=143799753022541w=2 Sifan Naeem (7): i2c: img-scb: support I2C_M_IGNORE_NAK i2c: img-scb: support repeated starts on IP v3.3 i2c: img-scb: mark transaction as complete when all data is read i2c: img-scb: mark transaction as complete when no more data to write i2c: img-scb

[PATCH 6/7] i2c: img-scb: add handle for stop detected interrupt

2015-07-27 Thread Sifan Naeem
. Signed-off-by: Sifan Naeem sifan.na...@imgtec.com --- drivers/i2c/busses/i2c-img-scb.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c index 10141a9..90faf48 100644 --- a/drivers

[PATCH 2/7] i2c: img-scb: support repeated starts on IP v3.3

2015-07-27 Thread Sifan Naeem
away so that we only process a single byte, not doing so will result in all remaining bytes been processed and a stop bit being issued, which will prevent us having a repeated start. This change will have no effect on earlier versions of the IP. Signed-off-by: Sifan Naeem sifan.na...@imgtec.com

[PATCH 3/7] i2c: img-scb: mark transaction as complete when all data is read

2015-07-27 Thread Sifan Naeem
We can mark the transfer as complete without waiting for the stop bit. This is important when handling repeated start transfers as we have to start the next transfer without the stop bit being issued. Signed-off-by: Sifan Naeem sifan.na...@imgtec.com --- drivers/i2c/busses/i2c-img-scb.c |7

[PATCH 7/7] i2c: img-scb: add handle for Master halt interrupt

2015-07-27 Thread Sifan Naeem
to facilitate a repeated start transfer without issuing a stop bit. Signed-off-by: Sifan Naeem sifan.na...@imgtec.com --- drivers/i2c/busses/i2c-img-scb.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c

[PATCH 4/7] i2c: img-scb: mark transaction as complete when no more data to write

2015-07-27 Thread Sifan Naeem
We can mark the transfer as complete without waiting for the stop bit. This is important when handling repeated start transfers as we have to start the next transfer without the stop bit being issued. This doesn't affect the older versions of the IP. Signed-off-by: Sifan Naeem sifan.na

[PATCH 1/7] i2c: img-scb: support I2C_M_IGNORE_NAK

2015-07-27 Thread Sifan Naeem
-by: Sifan Naeem sifan.na...@imgtec.com --- drivers/i2c/busses/i2c-img-scb.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c index 07a039c..31cd8c3 100644 --- a/drivers/i2c/busses/i2c-img-scb.c

[PATCH 8/8] i2c: img-scb: verify support for requested bit rate

2015-07-27 Thread Sifan Naeem
in the future. Fixes: 27bce4 (i2c: img-scb: Add Imagination Technologies I2C SCB driver) Signed-off-by: Sifan Naeem sifan.na...@imgtec.com Cc: Stable kernel (v3.19+) sta...@vger.kernel.org --- drivers/i2c/busses/i2c-img-scb.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/i2c

[PATCH 7/8] i2c: img-scb: improve transaction complete handle

2015-07-27 Thread Sifan Naeem
Imagination Technologies I2C SCB driver) Signed-off-by: Sifan Naeem sifan.na...@imgtec.com Cc: Stable kernel (v3.19+) sta...@vger.kernel.org --- drivers/i2c/busses/i2c-img-scb.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses

[PATCH 1/8] i2c: img-scb: enable fencing for all versions of the ip

2015-07-27 Thread Sifan Naeem
of the ip, the version check is dropped. Fixes: 27bce4 (i2c: img-scb: Add Imagination Technologies I2C SCB driver) Signed-off-by: Sifan Naeem sifan.na...@imgtec.com Cc: Stable kernel (v3.19+) sta...@vger.kernel.org --- drivers/i2c/busses/i2c-img-scb.c |8 ++-- 1 file changed, 2 insertions

[PATCH 5/8] i2c: img-scb: reset interrupts in img_i2c_soft_reset

2015-07-27 Thread Sifan Naeem
I2C SCB driver) Signed-off-by: Sifan Naeem sifan.na...@imgtec.com Cc: Stable kernel (v3.19+) sta...@vger.kernel.org --- drivers/i2c/busses/i2c-img-scb.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c

[PATCH 3/8] i2c: img-scb: use DIV_ROUND_UP to round divisor values

2015-07-27 Thread Sifan Naeem
Using % can be slow depending on the architecture. Using DIV_ROUND_UP is nicer and more efficient way to do it. Fixes: 27bce4 (i2c: img-scb: Add Imagination Technologies I2C SCB driver) Signed-off-by: Sifan Naeem sifan.na...@imgtec.com Cc: Stable kernel (v3.19+) sta...@vger.kernel.org

[PATCH 0/8] i2c: img-scb: fixes to support i2c on pistachio

2015-07-27 Thread Sifan Naeem
to and then to dump data from the eeprom. i2ctransfer was used to test repeated starts and verified using a scope. Cc: Stable kernel (v3.19+) sta...@vger.kernel.org Sifan Naeem (8): i2c: img-scb: enable fencing for all versions of the ip i2c: img-scb: do dummy writes before fifo access i2c: img

[PATCH 6/8] i2c: img-scb: remove start bit detected status after handling

2015-07-27 Thread Sifan Naeem
Remove start bit detected status after it is handled, doing so will prevent this condition being hit for every interrupt on a particular transfer. Fixes: 27bce4 (i2c: img-scb: Add Imagination Technologies I2C SCB driver) Signed-off-by: Sifan Naeem sifan.na...@imgtec.com Cc: Stable kernel (v3.19

[PATCH 2/8] i2c: img-scb: do dummy writes before fifo access

2015-07-27 Thread Sifan Naeem
Move scb_wr_rd_fence to before reading from fifo and writing to fifo to make sure the the first read/write is done after the required number of cycles. Fixes: 27bce4 (i2c: img-scb: Add Imagination Technologies I2C SCB driver) Signed-off-by: Sifan Naeem sifan.na...@imgtec.com Acked-by: James Hogan

[PATCH 4/8] i2c: img-scb: fix LOW and HIGH period values for the SCL clock

2015-07-27 Thread Sifan Naeem
and adjusts the TCKH and TCKL values from there if the minimum value for TCKL is not met. This will make sure the i2c clock duty cycle is at 50% or close 50% whenever possible. Fixes: 27bce4 (i2c: img-scb: Add Imagination Technologies I2C SCB driver) Signed-off-by: Sifan Naeem sifan.na...@imgtec.com Cc

RE: [PATCH v2 2/5] i2c: img-scb: remove fifo EMPTYING interrupts handle

2015-10-09 Thread Sifan Naeem
Hi James, > -Original Message- > From: James Hogan > Sent: 03 September 2015 09:54 > To: Sifan Naeem; Wolfram Sang; linux-i2c@vger.kernel.org; Ezequiel Garcia > Cc: Ionela Voinescu > Subject: Re: [PATCH v2 2/5] i2c: img-scb: remove fifo EMPTYING interrupts > handle &

[PATCH v3 7/7] i2c: img-scb: verify support for requested bit rate

2015-09-10 Thread Sifan Naeem
. Maximum speed supported by the driver can be increased to 1Mhz by adding support for "fast plus mode" in the future. Fixes: commit 27bce457d588 ("i2c: img-scb: Add Imagination Technologies I2C SCB driver") Signed-off-by: Sifan Naeem <sifan.na...@imgtec.com> Acked

[PATCH v3 0/7] i2c: img-scb: fixes to support i2c on pistachio

2015-09-10 Thread Sifan Naeem
tus 7/7: use %u instead if %d for unsigned Sifan Naeem (7): i2c: img-scb: enable fencing for all versions of the ip i2c: img-scb: do dummy writes before fifo access i2c: img-scb: use DIV_ROUND_UP to round divisor values i2c: img-scb: fix LOW and HIGH period values for the SCL clock i2c:

[PATCH v3 3/7] i2c: img-scb: use DIV_ROUND_UP to round divisor values

2015-09-10 Thread Sifan Naeem
Using % can be slow depending on the architecture. Using DIV_ROUND_UP is nicer and more efficient way to do it. Fixes: commit 27bce457d588 ("i2c: img-scb: Add Imagination Technologies I2C SCB driver") Signed-off-by: Sifan Naeem <sifan.na...@imgtec.com> Acked-by: James

[PATCH v3 4/7] i2c: img-scb: fix LOW and HIGH period values for the SCL clock

2015-09-10 Thread Sifan Naeem
, and adjusts the TCKH and TCKL values from there should the minimum value for TCKL not be met. This results in duty cycles closer to 50%. Fixes: commit 27bce457d588 ("i2c: img-scb: Add Imagination Technologies I2C SCB driver") Signed-off-by: Sifan Naeem <sifan.na...@imgtec.com> Acked

[PATCH v3 5/7] i2c: img-scb: use line_status instead of i2c->line_status

2015-09-10 Thread Sifan Naeem
i2c->line_status accumulates the line status bits that have been seen with each interrupt. As we're only interested in that bit from the current interrupt, refer to line_status (the argument to img_i2c_auto) instead of i2c->line_status. Signed-off-by: Sifan Naeem <sifan.na...@imgtec.com&

[PATCH v3 1/7] i2c: img-scb: enable fencing for all versions of the ip

2015-09-10 Thread Sifan Naeem
of the ip, the version check is dropped. Fixes: commit 27bce457d588 ("i2c: img-scb: Add Imagination Technologies I2C SCB driver") Signed-off-by: Sifan Naeem <sifan.na...@imgtec.com> Acked-by: James Hogan <james.ho...@imgtec.com> Reviewed-by: James Hartley <james.hart...@img

[PATCH v3 1/5] i2c: img-scb: support I2C_M_IGNORE_NAK

2015-11-19 Thread Sifan Naeem
-by: Sifan Naeem <sifan.na...@imgtec.com> Acked-by: James Hogan <james.ho...@imgtec.com> Reviewed-by: James Hartley <james.hart...@imgtec.com> --- drivers/i2c/busses/i2c-img-scb.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/buss

[PATCH v3 0/5] i2c: img-scb: enchancements to support i2c on pistachio

2015-11-19 Thread Sifan Naeem
ggestions. 3/5 reworked with J Hogan suggestions. 4/5 reworked with J Hogan suggestions. 5/5 moved v1 2/7: "support repeated starts on IP v3.3 to" the end Sifan Naeem (5): i2c: img-scb: support I2C_M_IGNORE_NAK i2c: img-scb: remove fifo EMPTYING interrupts han

[PATCH v3 4/5] i2c: img-scb: add handle for Master halt interrupt

2015-11-19 Thread Sifan Naeem
to facilitate a repeated start transfer without issuing a stop bit. Signed-off-by: Sifan Naeem <sifan.na...@imgtec.com> Reviewed-by: James Hartley <james.hart...@imgtec.com> --- drivers/i2c/busses/i2c-img-scb.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --g

[PATCH v3 3/5] i2c: img-scb: add handle for stop detected interrupt

2015-11-19 Thread Sifan Naeem
Stop Detected interrupt is triggered when a Stop bit is detected on the bus, which indicates the end of the current transfer. When the end of a transfer is indicated by the Stop Detected interrupt, drain the FIFO and signal completion for the transaction. Signed-off-by: Sifan Naeem <sifan

[PATCH v3 5/5] i2c: img-scb: support repeated starts on IP v3.3

2015-11-19 Thread Sifan Naeem
away so that we only process a single byte, not doing so will result in all remaining bytes been processed and a stop bit being issued, which will prevent us having a repeated start. This change will have no effect on earlier versions of the IP. Signed-off-by: Sifan Naeem <sifan.na...@imgtec.

[PATCH v3 2/5] i2c: img-scb: remove fifo EMPTYING interrupts handle

2015-11-19 Thread Sifan Naeem
Now that we are using the transaction halt interrupt to safely control repeated start transfers, we no longer need to handle the fifo emptying interrupts. Handling this interrupt along with Transaction Halt interrupt can cause erratic behaviour. Signed-off-by: Sifan Naeem <sifan.na...@imgtec.