[PATCH 1/2] i2c: omap: convert to module_platform_driver()

2013-04-23 Thread Grygorii Strashko
-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-omap.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 4cc2f05..70d3fed 100644 --- a/drivers/i2c/busses/i2c-omap.c

Re: [PATCH 0/2] OMAP: fix boot sequence

2013-04-23 Thread Grygorii Strashko
On 04/23/2013 08:34 PM, Tony Lindgren wrote: * Grygorii Strashko grygorii.stras...@ti.com [130423 06:25]: Hi There are two public discussions now related to OMAP boot and drivers initialization issues: Multiple issues with omap4 panda es in linux next http://www.spinics.net/lists/linux-omap

Re: [PATCH 11/11] i2c: omap: enhance pinctrl support

2013-05-31 Thread Grygorii Strashko
On 05/31/2013 01:13 PM, Hebbar Gururaja wrote: Amend the I2C omap pin controller to optionally take a pin control handle and set the state of the pins to: - default on boot, resume and before performing an i2c transfer - idle after initial default, after resume default, and after each i2c xfer

Re: [PATCH 1/2] i2c: omap: convert to module_platform_driver()

2013-06-04 Thread Grygorii Strashko
Hi Kevin, On 06/03/2013 11:59 PM, Kevin Hilman wrote: Grygorii Strashko grygorii.stras...@ti.com writes: The OMAP I2C driver has a relation to pinctrl-single driver. As result, its probe will be deferred during system boot until late init time, because the pinctrl-single is initizalized

Re: [PATCH 11/11] i2c: omap: enhance pinctrl support

2013-06-04 Thread Grygorii Strashko
Hi Kevin, Gururaja On 05/31/2013 08:34 PM, Kevin Hilman wrote: Hebbar Gururaja gururaja.heb...@ti.com writes: Amend the I2C omap pin controller to optionally take a pin control handle and set the state of the pins to: - default on boot, resume and before performing an i2c transfer - idle

Re: [PATCH] i2c: Let users disable Probe an I2C bus for certain devices

2013-06-05 Thread Grygorii Strashko
Hi On 06/04/2013 08:49 PM, Wolfram Sang wrote: On Tue, Jun 04, 2013 at 08:33:42PM +0300, Grygorii Strashko wrote: Currently the I2C devices instantiation Method 3 Probe an I2C bus for certain devices (see Documentation/i2c/instantiating-devices) is always enabled for all platforms (boards

Re: [PATCH 1/2] i2c: omap: convert to module_platform_driver()

2013-06-06 Thread Grygorii Strashko
On 06/05/2013 04:50 PM, Wolfram Sang wrote: The similar patch already exists: https://patchwork.kernel.org/patch/2448251/ - [v2,1/2] RTC: rtc-twl: Fix rtc_reg_map initialization from Peter Ujfalusi So, I think it is best if you resend this patch after all the fixes it needs are applied or you

Re: [PATCH] i2c: Let users disable Probe an I2C bus for certain devices

2013-06-07 Thread Grygorii Strashko
Hi Wolfram, On 06/07/2013 12:06 PM, Wolfram Sang wrote: 3) Thinking about Mainline: To reach the same target - no I2C detection - and taking into account above assumption No changes in default behavior the following will need to be done: - change i2c-omap/i2c-gpio DT bindings and add parameter

[PATCH 0/5] v3.10-rc4: fix OMAP4 boot failure if CONFIG_SENSORS_LM75=y

2013-06-07 Thread Grygorii Strashko
. This patch series based on top of: http://patchwork.ozlabs.org/patch/248188/ Grygorii Strashko (4): i2c: omap: add runtime check in isr to be sure that i2c is enabled i2c: omap: handle all irqs befor unblocking omap_i2c_xfer_msg() i2c: omap: query STP always when NACK is received i2c: omap: remove

[PATCH 5/5] i2c: omap: remove omap_i2c_isr() hw irq handler

2013-06-07 Thread Grygorii Strashko
Hilman khil...@linaro.org Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- This is clean-up patch. drivers/i2c/busses/i2c-omap.c | 33 + 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c

[PATCH 4/5] i2c: omap: query STP always when NACK is received

2013-06-07 Thread Grygorii Strashko
received during the last message transmitting/recieving. This may lead to stuck Bus in Bus Busy until I2C IP reset (idle/enable). Hence, fix it by querying Stop condition (STP) always when NACK is received. CC: Kevin Hilman khil...@linaro.org CC: Felipe Balbi ba...@ti.com Signed-off-by: Grygorii

[PATCH 3/5] i2c: omap: handle all irqs befor unblocking omap_i2c_xfer_msg()

2013-06-07 Thread Grygorii Strashko
: omap: ack IRQ in parts. CC: Kevin Hilman khil...@linaro.org Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-omap.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index

[PATCH 0/5] v3.10-rc4: fix OMAP4 boot failure if CONFIG_SENSORS_LM75=y

2013-06-07 Thread Grygorii Strashko
. This patch series based on top of: http://patchwork.ozlabs.org/patch/248188/ Grygorii Strashko (4): i2c: omap: add runtime check in isr to be sure that i2c is enabled i2c: omap: handle all irqs befor unblocking omap_i2c_xfer_msg() i2c: omap: query STP always when NACK is received i2c: omap: remove

[PATCH 2/5] i2c: omap: add runtime check in isr to be sure that i2c is enabled

2013-06-07 Thread Grygorii Strashko
IRQ_NONE; } Produce warning in case if ISR called when i2c is disabled CC: Kevin Hilman khil...@linaro.org Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-omap.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/i2c/busses/i2c

[PATCH 1/5] i2c: omap: fix spurious IRQs: disable/enable IRQ at INTC when idle

2013-06-07 Thread Grygorii Strashko
() |- oops is here - I2C module is in idle state Cc: Nishanth Menon n...@ti.com Signed-off-by: Kevin Hilman khil...@linaro.org Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-omap.c |4 1 file changed, 4 insertions

Re: [RFC] i2c: add deprecation warning for class based instantiation

2013-06-19 Thread Grygorii Strashko
Hi Wolfram, On 06/19/2013 01:15 PM, Wolfram Sang wrote: On Fri, Jun 07, 2013 at 11:09:26AM +0200, Wolfram Sang wrote: Class based instantiation can cause huge delays when booting. This mechanism was used when it was not possible to describe slaves on I2C busses. We now have other mechanisms,

Re: [RFC] i2c: add deprecation warning for class based instantiation

2013-06-19 Thread Grygorii Strashko
On 06/07/2013 12:09 PM, Wolfram Sang wrote: Class based instantiation can cause huge delays when booting. This mechanism was used when it was not possible to describe slaves on I2C busses. We now have other mechanisms, so most embedded I2C will not need classes and it was explicitly not

[RFC 1/2] i2c: omap: drop class based instantiation of slaves

2013-06-19 Thread Grygorii Strashko
undefined (remove I2C_CLASS_HWMON). CC: Tony Lindgren t...@atomide.com Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-omap.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index

[RFC 2/2] i2c: gpio: drop class based instantiation of slaves

2013-06-19 Thread Grygorii Strashko
, so disable it by leaving I2C adapter class field undefined (remove I2C_CLASS_HWMON and I2C_CLASS_SPD) and add a deprecation warning to allow users, relying on this mechanism, to switch to something better. CC: Haavard Skinnemoen hskinnem...@gmail.com Signed-off-by: Grygorii Strashko

Re: [PATCH 3/5] i2c: omap: handle all irqs befor unblocking omap_i2c_xfer_msg()

2013-06-19 Thread Grygorii Strashko
Hi Felipe, On 06/07/2013 10:05 PM, Felipe Balbi wrote: Hi, On Fri, Jun 07, 2013 at 09:46:06PM +0300, Grygorii Strashko wrote: ARDY|NACK and ARDY|AL are set together in OMAP_I2C_STAT_REG, which will be Have you seen that happen ever ? AL is Arbitration Lost, we never put OMAP in a multi-master

Re: [PATCH 2/5] i2c: omap: add runtime check in isr to be sure that i2c is enabled

2013-06-19 Thread Grygorii Strashko
Hi Felipe, On 06/07/2013 10:02 PM, Felipe Balbi wrote: Hi, On Fri, Jun 07, 2013 at 09:46:05PM +0300, Grygorii Strashko wrote: Add runtime check at the beginning of omap_i2c_isr/omap_i2c_isr_thread to be sure that i2c is enabled, before performing IRQ handling and accessing I2C IP registers

Re: [PATCH 1/5] i2c: omap: fix spurious IRQs: disable/enable IRQ at INTC when idle

2013-06-19 Thread Grygorii Strashko
On 06/07/2013 11:51 PM, Kevin Hilman wrote: Grygorii Strashko grygorii.stras...@ti.com writes: From: Kevin Hilman khil...@deeprootsystems.com Currently, runtime PM is used to keep the device enabled only during active transfers and for a configurable runtime PM autosuspend timout after

Re: [PATCH] i2c-omap: always send stop after nack

2013-07-16 Thread Grygorii Strashko
Hi Hein, Felipe On 07/16/2013 12:42 PM, Felipe Balbi wrote: Hi, On Tue, Jul 16, 2013 at 05:33:47PM +0800, Hein Tibosch wrote: On 7/16/2013 5:03 PM, Felipe Balbi wrote: Hi, On Tue, Jul 16, 2013 at 04:19:35PM +0800, Hein Tibosch wrote: Hi Vikram, On a OMAP4460, i2c-bus-3: A driver (lm75)

Re: [PATCH] i2c-omap: always send stop after nack

2013-07-16 Thread Grygorii Strashko
Hi Felipe, On 07/16/2013 02:27 PM, Felipe Balbi wrote: Hi, On Tue, Jul 16, 2013 at 02:01:11PM +0300, Grygorii Strashko wrote: On a OMAP4460, i2c-bus-3: A driver (lm75) is causing many 'timeout waiting for bus ready' errors. SDA remains high (as it should), but SCL remains low after a NACK

Re: [PATCH] i2c-omap: always send stop after nack

2013-08-20 Thread Grygorii Strashko
On 08/19/2013 03:11 PM, Wolfram Sang wrote: Hi, Which means your original patch starts to make a lot more sense. I wonder is this is really what we should be doing though - breaking out of the loop, I mean. Yup, that is fine. I applied the old patch with Acks from Hein and Felipe to -next.

Re: [PATCH] i2c: davinci: raw read and write endian fix

2013-11-21 Thread Grygorii Strashko
functions. If the first simply reads/writes register, the second will byteswap it if host operates in BE mode. Changes are trivial sed like replacement of __raw_xxx functions with xxx_relaxed variant. Reviewed-by: Grygorii Strashko grygorii.stras...@ti.com Signed-off-by: Taras Kondratiuk

Re: [PATCH v2 1/5] i2c: Don't start transfers when suspended

2014-07-22 Thread Grygorii Strashko
Hi On 07/17/2014 05:48 PM, Bastian Hecht wrote: i2c transfer requests come in very uncontrolled, like from interrupt routines. We might be suspended when this happens. To avoid i2c timeouts caused by powered down busses we check for suspension. Several bus drivers handle this problem on

Re: i2c-davinci.c: CPU FREQ causes lock up due to xfr_complete

2014-07-30 Thread Grygorii Strashko
On 07/30/2014 09:18 AM, Sekhar Nori wrote: On Tuesday 29 July 2014 11:00 PM, Grygorii Strashko wrote: Hi Jon, On 07/29/2014 06:53 PM, Jon Cormier wrote: A slimmer patch suggested by Grygorii Strashko grygorii.stras...@ti.com Ok. The problem seems to be deeper than at first look. You have

Re: i2c: omap: fix NACK and Arbitration Lost irq handling

2014-11-17 Thread Grygorii Strashko
On 11/15/2014 03:12 AM, Alexander Kochetkov wrote: commit 1d7afc95946487945cc7f5019b41255b72224b70 (i2c: omap: ack IRQ in parts) changed the interrupt handler to complete transfers without clearing XRDY (AL case) and ARDY (NACK case) flags. XRDY or ARDY interrupt will be fired again (in parallel

[PATCH 2/5] i2c: davinci: query STP always when NACK is received

2014-11-20 Thread Grygorii Strashko
...@deeprootsystems.com CC: Santosh Shilimkar ssant...@kernel.org CC: Murali Karicheri m-kariche...@ti.com Reported-by: Hein Tibosch hein_tibo...@yahoo.es Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-davinci.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions

[PATCH 5/5] i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery

2014-11-20 Thread Grygorii Strashko
using I2C bus recovery infrastructure] Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-davinci.c | 100 +- include/linux/platform_data/i2c-davinci.h | 1 + 2 files changed, 100 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH 4/5] i2c: davinci: use bus recovery infrastructure

2014-11-20 Thread Grygorii Strashko
...@deeprootsystems.com CC: Santosh Shilimkar ssant...@kernel.org CC: Murali Karicheri m-kariche...@ti.com Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-davinci.c | 76 ++-- 1 file changed, 35 insertions(+), 41 deletions(-) diff

[PATCH 0/5] i2c: davinci improvements and fixes

2014-11-20 Thread Grygorii Strashko
with ICPFUNC [2] https://lkml.org/lkml/2014/2/28/133 [PATCH] i2c-davinci: Implement a bus recovery that actually works CC: Sekhar Nori nsek...@ti.com CC: Kevin Hilman khil...@deeprootsystems.com CC: Santosh Shilimkar ssant...@kernel.org CC: Murali Karicheri m-kariche...@ti.com Grygorii Strashko (5

[PATCH 1/5] i2c: i2c-davinci: switch to use platform_get_irq

2014-11-20 Thread Grygorii Strashko
: Kevin Hilman khil...@deeprootsystems.com CC: Santosh Shilimkar ssant...@kernel.org CC: Murali Karicheri m-kariche...@ti.com Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-davinci.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

Re: [1/5] i2c: i2c-davinci: switch to use platform_get_irq

2014-11-21 Thread Grygorii Strashko
On 11/20/2014 11:48 PM, Uwe Kleine-König wrote: Hello Grygorii, On Thu, Nov 20, 2014 at 12:03:04PM +0200, Grygorii Strashko wrote: Switch Davinci I2C driver to use platform_get_irq(), because - it is not recommened to use platform_get_resource(pdev, IORESOURCE_IRQ, ..) for requesting

Re: [2/5] i2c: davinci: query STP always when NACK is received

2014-11-21 Thread Grygorii Strashko
Hi Uwe, On 11/21/2014 12:19 AM, Uwe Kleine-König wrote: On Thu, Nov 20, 2014 at 12:03:05PM +0200, Grygorii Strashko wrote: According to I2C specification the NACK should be handled as folowing: s/folowing/follows/ When SDA remains HIGH during this ninth clock pulse, this is defined

Re: [1/5] i2c: i2c-davinci: switch to use platform_get_irq

2014-11-21 Thread Grygorii Strashko
On 11/21/2014 04:03 PM, Rob Herring wrote: On Fri, Nov 21, 2014 at 5:01 AM, Grygorii Strashko grygorii.stras...@ti.com wrote: On 11/20/2014 11:48 PM, Uwe Kleine-König wrote: Hello Grygorii, On Thu, Nov 20, 2014 at 12:03:04PM +0200, Grygorii Strashko wrote: Switch Davinci I2C driver to use

Re: [2/5] i2c: davinci: query STP always when NACK is received

2014-11-21 Thread Grygorii Strashko
Hi Uwe, On 11/21/2014 03:10 PM, Uwe Kleine-König wrote: On Fri, Nov 21, 2014 at 02:48:57PM +0200, Grygorii Strashko wrote: On 11/21/2014 12:19 AM, Uwe Kleine-König wrote: diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 9bbfb8f..2cef115 100644

Re: [4/5] i2c: davinci: use bus recovery infrastructure

2014-11-21 Thread Grygorii Strashko
Hi Uwe, On 11/21/2014 09:07 PM, Uwe Kleine-König wrote: On Thu, Nov 20, 2014 at 12:03:07PM +0200, Grygorii Strashko wrote: This patch converts Davinci I2C driver to use I2C bus recovery infrastructure, introduced by commit 5f9296ba21b3 (i2c: Add bus recovery infrastructure

Re: [5/5] i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery

2014-11-24 Thread Grygorii Strashko
Hi Uwe, On 11/23/2014 07:04 PM, Uwe Kleine-König wrote: On Thu, Nov 20, 2014 at 12:03:08PM +0200, Grygorii Strashko wrote: @@ -664,6 +759,7 @@ static int davinci_i2c_probe(struct platform_device *pdev) if (!of_property_read_u32(pdev-dev.of_node, clock-frequency

Re: [4/5] i2c: davinci: use bus recovery infrastructure

2014-11-24 Thread Grygorii Strashko
Hi Uwe, On 11/23/2014 10:36 PM, Uwe Kleine-König wrote: On Fri, Nov 21, 2014 at 09:33:22PM +0200, Grygorii Strashko wrote: On 11/21/2014 09:07 PM, Uwe Kleine-König wrote: On Thu, Nov 20, 2014 at 12:03:07PM +0200, Grygorii Strashko wrote: Just another general comment about the driver

Re: [2/5] i2c: davinci: query STP always when NACK is received

2014-11-24 Thread Grygorii Strashko
Hi Uwe, On 11/23/2014 10:33 PM, Uwe Kleine-König wrote: On Fri, Nov 21, 2014 at 05:33:37PM +0200, Grygorii Strashko wrote: On 11/21/2014 03:10 PM, Uwe Kleine-König wrote: On Fri, Nov 21, 2014 at 02:48:57PM +0200, Grygorii Strashko wrote: On 11/21/2014 12:19 AM, Uwe Kleine-König wrote: diff

Re: [5/5] i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery

2014-11-24 Thread Grygorii Strashko
On 11/24/2014 08:13 PM, Mike Looijmans wrote: On 24-11-2014 14:15, Grygorii Strashko wrote: Hi Uwe, On 11/23/2014 07:04 PM, Uwe Kleine-König wrote: On Thu, Nov 20, 2014 at 12:03:08PM +0200, Grygorii Strashko wrote: @@ -664,6 +759,7 @@ static int davinci_i2c_probe(struct platform_device

Re: [5/5] i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery

2014-11-25 Thread Grygorii Strashko
Hi Uwe, On 11/24/2014 09:45 PM, Uwe Kleine-König wrote: On Mon, Nov 24, 2014 at 03:15:58PM +0200, Grygorii Strashko wrote: On 11/23/2014 07:04 PM, Uwe Kleine-König wrote: On Thu, Nov 20, 2014 at 12:03:08PM +0200, Grygorii Strashko wrote: @@ -664,6 +759,7 @@ static int davinci_i2c_probe(struct

[PATCH v2 5/5] i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery

2014-11-26 Thread Grygorii Strashko
-by: Grygorii Strashko grygorii.stras...@ti.com --- .../devicetree/bindings/i2c/i2c-davinci.txt| 3 + drivers/i2c/busses/i2c-davinci.c | 102 - include/linux/platform_data/i2c-davinci.h | 1 + 3 files changed, 105 insertions(+), 1 deletion

[PATCH v2 1/5] i2c: i2c-davinci: switch to use platform_get_irq

2014-11-26 Thread Grygorii Strashko
...@deeprootsystems.com CC: Santosh Shilimkar ssant...@kernel.org CC: Murali Karicheri m-kariche...@ti.com Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-davinci.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/i2c/busses/i2c

[PATCH v2 3/5] i2c: recovery: change input parameter to i2c_adapter for prepare/unprepare_recovery

2014-11-26 Thread Grygorii Strashko
...@pengutronix.de Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/i2c-core.c | 4 ++-- include/linux/i2c.h| 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 2f90ac6..72b6e34 100644 --- a/drivers/i2c/i2c-core.c

[PATCH v2 4/5] i2c: davinci: use bus recovery infrastructure

2014-11-26 Thread Grygorii Strashko
...@deeprootsystems.com CC: Santosh Shilimkar ssant...@kernel.org CC: Murali Karicheri m-kariche...@ti.com Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-davinci.c | 77 +++- 1 file changed, 36 insertions(+), 41 deletions(-) diff --git

[PATCH v2 2/5] i2c: davinci: query STP always when NACK is received

2014-11-26 Thread Grygorii Strashko
-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-davinci.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 7f54903..1990ae8 100644 --- a/drivers/i2c/busses/i2c

Re: [PATCH v2 1/5] i2c: i2c-davinci: switch to use platform_get_irq

2014-11-26 Thread Grygorii Strashko
On 11/26/2014 05:54 PM, Uwe Kleine-König wrote: Hello Grygorii, On Wed, Nov 26, 2014 at 03:59:49PM +0200, Grygorii Strashko wrote: Switch Davinci I2C driver to use platform_get_irq(), because it is not recommened to use platform_get_resource(pdev, IORESOURCE_IRQ, ..) for requesting IRQ

Re: [PATCH v2 2/5] i2c: davinci: query STP always when NACK is received

2014-11-26 Thread Grygorii Strashko
On 11/26/2014 05:57 PM, Uwe Kleine-König wrote: Hello, I don't understand your use of query in the subject and later in the commit log. Do you mean send? will change to generate. Ok? On Wed, Nov 26, 2014 at 03:59:50PM +0200, Grygorii Strashko wrote: According to I2C specification the NACK

Re: [PATCH v2 5/5] i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery

2014-11-26 Thread Grygorii Strashko
On 11/26/2014 06:04 PM, Uwe Kleine-König wrote: On Wed, Nov 26, 2014 at 03:59:53PM +0200, Grygorii Strashko wrote: Having a board where the I2C bus locks up occasionally made it clear that the bus recovery in the i2c-davinci driver will only work on some boards, because on regular boards

[PATCH 5/5] i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery

2014-12-01 Thread Grygorii Strashko
and Mike Looijmans and reimplemented ICPFUNC bus recovery using I2C bus recovery infrastructure] Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- .../devicetree/bindings/i2c/i2c-davinci.txt| 3 + drivers/i2c/busses/i2c-davinci.c | 102

[PATCH v3 4/5] i2c: davinci: use bus recovery infrastructure

2014-12-01 Thread Grygorii Strashko
CC: Santosh Shilimkar ssant...@kernel.org CC: Murali Karicheri m-kariche...@ti.com Acked-by: Uwe Kleine-König u.kleine-koe...@pengutronix.de Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-davinci.c | 77 +++- 1 file changed

[PATCH v3 1/5] i2c: i2c-davinci: switch to use platform_get_irq

2014-12-01 Thread Grygorii Strashko
...@deeprootsystems.com CC: Santosh Shilimkar ssant...@kernel.org CC: Murali Karicheri m-kariche...@ti.com Acked-by: Uwe Kleine-König u.kleine-koe...@pengutronix.de Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-davinci.c | 20 1 file changed, 12 insertions

[PATCH v3 2/5] i2c: davinci: generate STP always when NACK is received

2014-12-01 Thread Grygorii Strashko
...@pengutronix.de Reported-by: Hein Tibosch hein_tibo...@yahoo.es Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/busses/i2c-davinci.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c

[PATCH v3 0/5] i2c: davinci improvements and fixes

2014-12-01 Thread Grygorii Strashko
...@ti.com Grygorii Strashko (5): i2c: i2c-davinci: switch to use platform_get_irq i2c: davinci: generate STP always when NACK is received i2c: recovery: change input parameter to i2c_adapter for prepare/unprepare_recovery i2c: davinci: use bus recovery infrastructure i2c: davinci: use

[PATCH v3 3/5] i2c: recovery: change input parameter to i2c_adapter for prepare/unprepare_recovery

2014-12-01 Thread Grygorii Strashko
...@pengutronix.de Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com --- drivers/i2c/i2c-core.c | 4 ++-- include/linux/i2c.h| 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 2f90ac6..72b6e34 100644 --- a/drivers/i2c/i2c-core.c

Re: [PATCH 2/3] i2c: davinci: Refactor i2c_davinci_wait_bus_not_busy()

2015-03-12 Thread Grygorii Strashko
On 12 March 2015 at 10:50, Alexander Sverdlin alexander.sverd...@nokia.com wrote: On 11/03/15 19:35, ext grygorii.stras...@linaro.org wrote: +if (i2c_davinci_wait_status_change(dev, DAVINCI_I2C_STR_BB, 0)) { +dev_warn(dev-dev, timeout waiting for bus ready\n); +

Re: [PATCH] i2c: omap: implement bus recovery

2015-03-11 Thread Grygorii Strashko
Hi Felipe, On 03/11/2015 03:50 AM, Felipe Balbi wrote: On Mon, Mar 09, 2015 at 11:39:17AM -0500, Felipe Balbi wrote: On Thu, Feb 19, 2015 at 12:06:49PM -0600, Felipe Balbi wrote: If either SCL or SDA are stuck low, we need to recover the bus using the procedure described on section 3.1.16 of

Re: [PATCH v3 3/5] i2c: recovery: change input parameter to i2c_adapter for prepare/unprepare_recovery

2015-03-05 Thread Grygorii Strashko
Hi Wolfram, On 12/04/2014 08:29 PM, Wolfram Sang wrote: On Mon, Dec 01, 2014 at 05:34:05PM +0200, Grygorii Strashko wrote: This patch changes type of input parameter for .prepare/unprepare_recovery() callbacks from struct i2c_bus_recovery_info * to struct i2c_adapter *. This allows to simplify

Re: [PATCH] i2c: omap: fix bus recovery setup

2015-07-14 Thread Grygorii Strashko
low level), we need to set them to 1 (which means high-impedance) to avoid unwanted changes on the pins. As a precaution, reset all these bits to their default values after recovery is complete. Reviewed-by: Grygorii Strashko grygorii.stras...@ti.com Signed-off-by: Jan Luebbe j

Re: Alternative approach to solve the deferred probe

2015-10-21 Thread Grygorii Strashko
On 10/21/2015 06:36 PM, Frank Rowand wrote: > On 10/21/2015 1:18 AM, Russell King - ARM Linux wrote: >> On Tue, Oct 20, 2015 at 08:58:19PM -0700, Frank Rowand wrote: >>> On 10/20/2015 8:46 AM, Russell King - ARM Linux wrote: > > < snip > > + static bool driver_deferred_probe_enable =

Re: Alternative approach to solve the deferred probe

2015-10-21 Thread Grygorii Strashko
On 10/21/2015 09:02 PM, Frank Rowand wrote: > On 10/21/2015 9:55 AM, Grygorii Strashko wrote: >> On 10/21/2015 06:36 PM, Frank Rowand wrote: >>> On 10/21/2015 1:18 AM, Russell King - ARM Linux wrote: >>>> On Tue, Oct 20, 2015 at 08:58:19PM -0700, Frank Rowand wrot

Re: Alternative approach to solve the deferred probe

2015-10-22 Thread Grygorii Strashko
Hi Russell, On 10/21/2015 09:28 PM, Russell King - ARM Linux wrote: > On Wed, Oct 21, 2015 at 09:13:48PM +0300, Grygorii Strashko wrote: >> But I worry a bit (and that my main point) about these few additional >> rounds of deferred device probing which I have right now and which

Re: Alternative approach to solve the deferred probe

2015-10-21 Thread Grygorii Strashko
Hi Russell, On 10/21/2015 08:20 PM, Russell King - ARM Linux wrote: > On Wed, Oct 21, 2015 at 07:55:29PM +0300, Grygorii Strashko wrote: >> On 10/21/2015 06:36 PM, Frank Rowand wrote: >>> The above is currently the last point for probe to succeed or defer >>> (until

[PATCH] i2c: core: fix wakeup irq parsing

2015-11-12 Thread Grygorii Strashko
..@ti.com> Cc: <sta...@vger.kernel.org> # v4.3 Fixes: 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree") Signed-off-by: Grygorii Strashko <grygorii.stras...@ti.com> --- drivers/i2c/i2c-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

Re: [PATCH v2] dts: keystone: Use new "ti,keystone-i2c" compatible

2015-10-20 Thread Grygorii Strashko
On 10/20/2015 06:06 PM, Wolfram Sang wrote: On Mon, Sep 14, 2015 at 11:07:02AM +0200, Alexander Sverdlin wrote: Now as "i2c-davinci" driver has special handling for Keystone it's time to switch the device tree to use new "compatible" property. Old one is left for backwards- compatibility.

Re: [PATCH v2] dts: keystone: Use new "ti,keystone-i2c" compatible

2015-10-21 Thread Grygorii Strashko
On 09/14/2015 12:07 PM, Alexander Sverdlin wrote: Now as "i2c-davinci" driver has special handling for Keystone it's time to switch the device tree to use new "compatible" property. Old one is left for backwards- compatibility. Signed-off-by: Alexander Sverdlin

Re: [PATCH v2 5/5] i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery

2015-07-07 Thread Grygorii Strashko
On 07/07/2015 05:13 PM, Wolfram Sang wrote: On Tue, Jul 07, 2015 at 03:48:52PM +0200, Uwe Kleine-König wrote: On Tue, Jul 07, 2015 at 03:37:49PM +0200, Jan Lübbe wrote: On Mi, 2014-11-26 at 19:05 +0200, Grygorii Strashko wrote: On 11/26/2014 06:04 PM, Uwe Kleine-König wrote: On Wed, Nov 26

Re: [RFC PATCH] i2c: busses: i2c-omap: Increase timeout for i2c interrupt

2015-07-10 Thread Grygorii Strashko
Hi Wolfram, On 07/10/2015 12:09 PM, Wolfram Sang wrote: 60 s sounds way too much and actually I simply don't believe this is the root cause. If I take a look into the driver, then I see, that I agree, this is just a workaround. the design is not really the best. The whole IRQ handling

Re: [RFC PATCH] i2c: busses: i2c-omap: Increase timeout for i2c interrupt

2015-07-10 Thread Grygorii Strashko
On 07/10/2015 04:26 PM, Alexander Sverdlin wrote: Hi! On 10/07/15 15:17, ext Vignesh R wrote: I would propose you to throw away spinlocks. Convert threaded IRQ to Agree. Looks like spinlock is not needed. just one hardirq handler. And continue debugging. You will reduce the load of the

Re: [PATCH] i2c: davinci: Fix bus rate calculation on Keystone SoC

2015-07-10 Thread Grygorii Strashko
Hi, On 07/10/2015 07:02 PM, Sekhar Nori wrote: On Friday 10 July 2015 01:23 AM, Wolfram Sang wrote: On Thu, Jun 18, 2015 at 12:22:33PM -0400, Murali Karicheri wrote: On 06/18/2015 05:00 AM, Sekhar Nori wrote: On Thursday 18 June 2015 02:23 PM, Alexander Sverdlin wrote: According to KeyStone

Re: [PATCH v2 1/2] i2c: davinci: Optimize clock generation on Keystone SoC

2015-09-04 Thread Grygorii Strashko
out this change Keystone-based systems (having 204.8MHz input clock) choose prescaler 29 (PSC=28). Using d=5 in this case leads to bus bitrate ~353kHz instead of requested 400kHz. After correction, assuming d=6 bus rate is ~392kHz. This gives ~11% transfer rate increase. Thanks Alexander.