Re: [PATCH V10 2/2] i2c/designware: Provide i2c bus recovery support

2013-05-31 Thread Viresh Kumar
On 13 May 2013 14:48, Viresh Kumar  wrote:
> On 5 April 2013 12:12, Viresh Kumar  wrote:
>> Hi Wolfram,
>>
>> On 25 January 2013 15:17, Viresh Kumar  wrote:
>>> Add bus recovery support for designware_i2c controller. It uses generic gpio
>>> based i2c_gpio_recover_bus() routine. Platforms need to pass struct
>>> i2c_bus_recovery_info as platform data to designware I2C controller.
>>>
>>> Signed-off-by: Vincenzo Frascino 
>>> Signed-off-by: Shiraz Hashim 
>>> Signed-off-by: Viresh Kumar 
>>> ---
>>> V9->V10: None
>>>
>>>  drivers/i2c/busses/i2c-designware-core.c| 5 -
>>>  drivers/i2c/busses/i2c-designware-platdrv.c | 6 ++
>>>  2 files changed, 10 insertions(+), 1 deletion(-)
>>
>> Can you apply this one too?
>
> Ping!!

Ping!!
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V10 2/2] i2c/designware: Provide i2c bus recovery support

2013-05-13 Thread Viresh Kumar
On 5 April 2013 12:12, Viresh Kumar  wrote:
> Hi Wolfram,
>
> On 25 January 2013 15:17, Viresh Kumar  wrote:
>> Add bus recovery support for designware_i2c controller. It uses generic gpio
>> based i2c_gpio_recover_bus() routine. Platforms need to pass struct
>> i2c_bus_recovery_info as platform data to designware I2C controller.
>>
>> Signed-off-by: Vincenzo Frascino 
>> Signed-off-by: Shiraz Hashim 
>> Signed-off-by: Viresh Kumar 
>> ---
>> V9->V10: None
>>
>>  drivers/i2c/busses/i2c-designware-core.c| 5 -
>>  drivers/i2c/busses/i2c-designware-platdrv.c | 6 ++
>>  2 files changed, 10 insertions(+), 1 deletion(-)
>
> Can you apply this one too?

Ping!!
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V10 2/2] i2c/designware: Provide i2c bus recovery support

2013-04-04 Thread Viresh Kumar
Hi Wolfram,

On 25 January 2013 15:17, Viresh Kumar  wrote:
> Add bus recovery support for designware_i2c controller. It uses generic gpio
> based i2c_gpio_recover_bus() routine. Platforms need to pass struct
> i2c_bus_recovery_info as platform data to designware I2C controller.
>
> Signed-off-by: Vincenzo Frascino 
> Signed-off-by: Shiraz Hashim 
> Signed-off-by: Viresh Kumar 
> ---
> V9->V10: None
>
>  drivers/i2c/busses/i2c-designware-core.c| 5 -
>  drivers/i2c/busses/i2c-designware-platdrv.c | 6 ++
>  2 files changed, 10 insertions(+), 1 deletion(-)

Can you apply this one too?
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH V10 2/2] i2c/designware: Provide i2c bus recovery support

2013-01-25 Thread Viresh Kumar
Add bus recovery support for designware_i2c controller. It uses generic gpio
based i2c_gpio_recover_bus() routine. Platforms need to pass struct
i2c_bus_recovery_info as platform data to designware I2C controller.

Signed-off-by: Vincenzo Frascino 
Signed-off-by: Shiraz Hashim 
Signed-off-by: Viresh Kumar 
---
V9->V10: None

 drivers/i2c/busses/i2c-designware-core.c| 5 -
 drivers/i2c/busses/i2c-designware-platdrv.c | 6 ++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-designware-core.c 
b/drivers/i2c/busses/i2c-designware-core.c
index f5258c2..d0423ef 100644
--- a/drivers/i2c/busses/i2c-designware-core.c
+++ b/drivers/i2c/busses/i2c-designware-core.c
@@ -539,7 +539,10 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg 
msgs[], int num)
ret = wait_for_completion_interruptible_timeout(&dev->cmd_complete, HZ);
if (ret == 0) {
dev_err(dev->dev, "controller timed out\n");
-   i2c_dw_init(dev);
+
+   if (i2c_recover_bus(adap) < 0)
+   i2c_dw_init(dev);
+
ret = -ETIMEDOUT;
goto done;
} else if (ret < 0)
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c 
b/drivers/i2c/busses/i2c-designware-platdrv.c
index 343357a..9142f0c 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -141,6 +141,12 @@ static int dw_i2c_probe(struct platform_device *pdev)
adap->dev.parent = &pdev->dev;
adap->dev.of_node = pdev->dev.of_node;
 
+   /* Bus recovery support */
+   adap->bus_recovery_info = dev_get_platdata(&pdev->dev);
+   if (adap->bus_recovery_info)
+   adap->bus_recovery_info->recover_bus =
+   i2c_generic_gpio_recovery;
+
adap->nr = pdev->id;
r = i2c_add_numbered_adapter(adap);
if (r) {
-- 
1.7.12.rc2.18.g61b472e


--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html