Re: [PATCHv8 3/5] OMAP: I2C: Reset support

2011-12-16 Thread Tony Lindgren
* Shubhrajyoti  [111216 00:25]:
> Hi Benoit,
> 
> On Friday 16 December 2011 02:21 PM, Cousson, Benoit wrote:
> > Hi Shubhro,
> >
> > On 12/13/2011 11:55 AM, Shubhrajyoti D wrote:
> >> Under some error conditions the i2c driver may do a reset.
> >> Adding a reset field and support in the device-specific code to aid
> >> error-recovery.
> >>
> >> Signed-off-by: Shubhrajyoti D
> >> ---
> >>   arch/arm/plat-omap/i2c.c |2 ++
> >>   include/linux/i2c-omap.h |1 +
> >>   2 files changed, 3 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
> >> index db071bc..6cddde2 100644
> >> --- a/arch/arm/plat-omap/i2c.c
> >> +++ b/arch/arm/plat-omap/i2c.c
> >> @@ -179,6 +179,8 @@ static inline int omap2_i2c_add_bus(int bus_id)
> >>*/
> >>   if (cpu_is_omap34xx())
> >>   pdata->set_mpu_wkup_lat =
> >> omap_pm_set_max_mpu_wakeup_lat_compat;
> >> +
> >> +pdata->device_reset = omap_device_reset;
> >
> > We should avoid introducing any new pdata function pointers since we
> > are in the process of removing them for DT support.
> However if the driver has to do a reset due to some error what is the
> recommended way?
> Currently we used to access the SYSC directly I am removing the same and
> introducing this  function pointer.

Sounds like this sould be possible to handle with pm_runtime
calls from the driver which should end up making the right
hwmod calls.

Regards,

Tony
--
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: [PATCHv8 3/5] OMAP: I2C: Reset support

2011-12-16 Thread Shubhrajyoti
Hi Benoit,

On Friday 16 December 2011 02:21 PM, Cousson, Benoit wrote:
> Hi Shubhro,
>
> On 12/13/2011 11:55 AM, Shubhrajyoti D wrote:
>> Under some error conditions the i2c driver may do a reset.
>> Adding a reset field and support in the device-specific code to aid
>> error-recovery.
>>
>> Signed-off-by: Shubhrajyoti D
>> ---
>>   arch/arm/plat-omap/i2c.c |2 ++
>>   include/linux/i2c-omap.h |1 +
>>   2 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
>> index db071bc..6cddde2 100644
>> --- a/arch/arm/plat-omap/i2c.c
>> +++ b/arch/arm/plat-omap/i2c.c
>> @@ -179,6 +179,8 @@ static inline int omap2_i2c_add_bus(int bus_id)
>>*/
>>   if (cpu_is_omap34xx())
>>   pdata->set_mpu_wkup_lat =
>> omap_pm_set_max_mpu_wakeup_lat_compat;
>> +
>> +pdata->device_reset = omap_device_reset;
>
> We should avoid introducing any new pdata function pointers since we
> are in the process of removing them for DT support.
However if the driver has to do a reset due to some error what is the
recommended way?
Currently we used to access the SYSC directly I am removing the same and
introducing this  function pointer.

>
> Regards,
> Benoit

--
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: [PATCHv8 3/5] OMAP: I2C: Reset support

2011-12-16 Thread Cousson, Benoit

Hi Shubhro,

On 12/13/2011 11:55 AM, Shubhrajyoti D wrote:

Under some error conditions the i2c driver may do a reset.
Adding a reset field and support in the device-specific code to aid
error-recovery.

Signed-off-by: Shubhrajyoti D
---
  arch/arm/plat-omap/i2c.c |2 ++
  include/linux/i2c-omap.h |1 +
  2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index db071bc..6cddde2 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -179,6 +179,8 @@ static inline int omap2_i2c_add_bus(int bus_id)
 */
if (cpu_is_omap34xx())
pdata->set_mpu_wkup_lat = omap_pm_set_max_mpu_wakeup_lat_compat;
+
+   pdata->device_reset = omap_device_reset;


We should avoid introducing any new pdata function pointers since we are 
in the process of removing them for DT support.


Regards,
Benoit
--
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: [PATCHv8 3/5] OMAP: I2C: Reset support

2011-12-16 Thread Paul Walmsley
On Tue, 13 Dec 2011, Shubhrajyoti D wrote:

> Under some error conditions the i2c driver may do a reset.
> Adding a reset field and support in the device-specific code to aid
> error-recovery.
> 
> Signed-off-by: Shubhrajyoti D 

Thanks, queued for 3.3.


- Paul
--
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