public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] i2c: Adapter timeout is in jiffies
       [not found] ` <20090222160705.63563a14-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
@ 2009-02-22 15:20   ` Lennert Buytenhek
       [not found]     ` <20090222152059.GI17040-mfnYTeDhw6uOVk/H6u/4e9i2O/JbrIOy@public.gmane.org>
  2009-02-24 16:33   ` Mark A. Greer
  2009-02-25  1:12   ` Sean MacLennan
  2 siblings, 1 reply; 4+ messages in thread
From: Lennert Buytenhek @ 2009-02-22 15:20 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Linux I2C, Clifford Wolf, Sean MacLennan, Stefan Roese,
	Dan Williams, Grant Likely, Mark A. Greer, Wolfram Sang

On Sun, Feb 22, 2009 at 04:07:05PM +0100, Jean Delvare wrote:

> From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> Subject: i2c: Adapter timeout is in jiffies
> 
> i2c_adapter.timeout is in jiffies. Fix all drivers which thought
> otherwise. It didn't really matter as long as the value was only used
> inside the driver, but soon i2c-core will use it too so it must have
> the proper unit.
> 
> Note: for the i2c-mpc driver, this fixes a bug in polling mode.
> Timeout would trigger after 1 jiffy, which is most probably not what
> the author wanted.
> 
> Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> Cc: Clifford Wolf <clifford-cPpHkPqGOEfk7+2FdBfRIA@public.gmane.org>
> Cc: Sean MacLennan <smaclennan-Qtffpm9i2AVWk0Htik3J/w@public.gmane.org>
> Cc: Stefan Roese <sr-ynQEQJNshbs@public.gmane.org>
> Cc: Lennert Buytenhek <kernel-OLH4Qvv75CYX/NnBR394Jw@public.gmane.org>
> Cc: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> Cc: Mark A. Greer <mgreer-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
> Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
>  drivers/i2c/busses/i2c-ibm_iic.c |    6 +++---
>  drivers/i2c/busses/i2c-iop3xx.c  |    2 +-
>  drivers/i2c/busses/i2c-mpc.c     |    4 ++--
>  drivers/i2c/busses/i2c-mv64xxx.c |    7 +++----
>  drivers/i2c/busses/i2c-pca-isa.c |    2 +-
>  5 files changed, 10 insertions(+), 11 deletions(-)

The i2c-mv64xxx part:

Acked-by: Lennert Buytenhek <buytenh-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>

Although I wonder if we shouldn't move away from expressing time
intervals in jiffies.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: Adapter timeout is in jiffies
       [not found]     ` <20090222152059.GI17040-mfnYTeDhw6uOVk/H6u/4e9i2O/JbrIOy@public.gmane.org>
@ 2009-02-22 18:52       ` Jean Delvare
  0 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2009-02-22 18:52 UTC (permalink / raw)
  To: Lennert Buytenhek
  Cc: Linux I2C, Clifford Wolf, Sean MacLennan, Stefan Roese,
	Dan Williams, Grant Likely, Mark A. Greer, Wolfram Sang

Hi Lennert,

On Sun, 22 Feb 2009 16:20:59 +0100, Lennert Buytenhek wrote:
> On Sun, Feb 22, 2009 at 04:07:05PM +0100, Jean Delvare wrote:
> 
> > From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> > Subject: i2c: Adapter timeout is in jiffies
> > 
> > i2c_adapter.timeout is in jiffies. Fix all drivers which thought
> > otherwise. It didn't really matter as long as the value was only used
> > inside the driver, but soon i2c-core will use it too so it must have
> > the proper unit.
> > 
> > Note: for the i2c-mpc driver, this fixes a bug in polling mode.
> > Timeout would trigger after 1 jiffy, which is most probably not what
> > the author wanted.
> > 
> > Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> > Cc: Clifford Wolf <clifford-cPpHkPqGOEfk7+2FdBfRIA@public.gmane.org>
> > Cc: Sean MacLennan <smaclennan-Qtffpm9i2AVWk0Htik3J/w@public.gmane.org>
> > Cc: Stefan Roese <sr-ynQEQJNshbs@public.gmane.org>
> > Cc: Lennert Buytenhek <kernel-OLH4Qvv75CYX/NnBR394Jw@public.gmane.org>
> > Cc: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> > Cc: Mark A. Greer <mgreer-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
> > Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > ---
> >  drivers/i2c/busses/i2c-ibm_iic.c |    6 +++---
> >  drivers/i2c/busses/i2c-iop3xx.c  |    2 +-
> >  drivers/i2c/busses/i2c-mpc.c     |    4 ++--
> >  drivers/i2c/busses/i2c-mv64xxx.c |    7 +++----
> >  drivers/i2c/busses/i2c-pca-isa.c |    2 +-
> >  5 files changed, 10 insertions(+), 11 deletions(-)
> 
> The i2c-mv64xxx part:
> 
> Acked-by: Lennert Buytenhek <buytenh-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>

Thanks.

> Although I wonder if we shouldn't move away from expressing time
> intervals in jiffies.

Why? This is what time_after() and wait_event_interruptible_timeout()
want, so this is the most efficient way (as discussed recently [1]).

[1] http://marc.info/?l=linux-i2c&m=123507862624484&w=2

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: Adapter timeout is in jiffies
       [not found] ` <20090222160705.63563a14-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
  2009-02-22 15:20   ` [PATCH] i2c: Adapter timeout is in jiffies Lennert Buytenhek
@ 2009-02-24 16:33   ` Mark A. Greer
  2009-02-25  1:12   ` Sean MacLennan
  2 siblings, 0 replies; 4+ messages in thread
From: Mark A. Greer @ 2009-02-24 16:33 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Linux I2C, Clifford Wolf, Sean MacLennan, Stefan Roese,
	Lennert Buytenhek, Dan Williams, Grant Likely, Mark A.Greer,
	Wolfram Sang

On Sun, Feb 22, 2009 at 04:07:05PM +0100, Jean Delvare wrote:
> From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> Subject: i2c: Adapter timeout is in jiffies
> 
> i2c_adapter.timeout is in jiffies. Fix all drivers which thought
> otherwise. It didn't really matter as long as the value was only used
> inside the driver, but soon i2c-core will use it too so it must have
> the proper unit.
> 
> Note: for the i2c-mpc driver, this fixes a bug in polling mode.
> Timeout would trigger after 1 jiffy, which is most probably not what
> the author wanted.
> 
> Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> Cc: Clifford Wolf <clifford-cPpHkPqGOEfk7+2FdBfRIA@public.gmane.org>
> Cc: Sean MacLennan <smaclennan-Qtffpm9i2AVWk0Htik3J/w@public.gmane.org>
> Cc: Stefan Roese <sr-ynQEQJNshbs@public.gmane.org>
> Cc: Lennert Buytenhek <kernel-OLH4Qvv75CYX/NnBR394Jw@public.gmane.org>
> Cc: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> Cc: Mark A. Greer <mgreer-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
> Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
>  drivers/i2c/busses/i2c-ibm_iic.c |    6 +++---
>  drivers/i2c/busses/i2c-iop3xx.c  |    2 +-
>  drivers/i2c/busses/i2c-mpc.c     |    4 ++--
>  drivers/i2c/busses/i2c-mv64xxx.c |    7 +++----
>  drivers/i2c/busses/i2c-pca-isa.c |    2 +-
>  5 files changed, 10 insertions(+), 11 deletions(-)

For the i2c-mv64xxx.c part:

Acked-by: Mark A. Greer <mgreer-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: Adapter timeout is in jiffies
       [not found] ` <20090222160705.63563a14-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
  2009-02-22 15:20   ` [PATCH] i2c: Adapter timeout is in jiffies Lennert Buytenhek
  2009-02-24 16:33   ` Mark A. Greer
@ 2009-02-25  1:12   ` Sean MacLennan
  2 siblings, 0 replies; 4+ messages in thread
From: Sean MacLennan @ 2009-02-25  1:12 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Linux I2C, Clifford Wolf, Sean MacLennan, Stefan Roese,
	Lennert Buytenhek, Dan Williams, Grant Likely, Mark A. Greer,
	Wolfram Sang

On Sun, 22 Feb 2009 16:07:05 +0100
"Jean Delvare" <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org> wrote:

> From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> Subject: i2c: Adapter timeout is in jiffies
> 
> i2c_adapter.timeout is in jiffies. Fix all drivers which thought
> otherwise. It didn't really matter as long as the value was only used
> inside the driver, but soon i2c-core will use it too so it must have
> the proper unit.
> 
> Note: for the i2c-mpc driver, this fixes a bug in polling mode.
> Timeout would trigger after 1 jiffy, which is most probably not what
> the author wanted.
> 
> Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> Cc: Clifford Wolf <clifford-cPpHkPqGOEfk7+2FdBfRIA@public.gmane.org>
> Cc: Sean MacLennan <smaclennan-Qtffpm9i2AVWk0Htik3J/w@public.gmane.org>
> Cc: Stefan Roese <sr-ynQEQJNshbs@public.gmane.org>
> Cc: Lennert Buytenhek <kernel-OLH4Qvv75CYX/NnBR394Jw@public.gmane.org>
> Cc: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> Cc: Mark A. Greer <mgreer-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
> Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
>  drivers/i2c/busses/i2c-ibm_iic.c |    6 +++---
>  drivers/i2c/busses/i2c-iop3xx.c  |    2 +-
>  drivers/i2c/busses/i2c-mpc.c     |    4 ++--
>  drivers/i2c/busses/i2c-mv64xxx.c |    7 +++----
>  drivers/i2c/busses/i2c-pca-isa.c |    2 +-
>  5 files changed, 10 insertions(+), 11 deletions(-)

i2c-ibm_iic.c:

Acked-by: Sean MacLennan <smaclennan-Qtffpm9i2AVWk0Htik3J/w@public.gmane.org>

Cheers,
   Sean

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-25  1:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20090222160705.63563a14@hyperion.delvare>
     [not found] ` <20090222160705.63563a14-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-02-22 15:20   ` [PATCH] i2c: Adapter timeout is in jiffies Lennert Buytenhek
     [not found]     ` <20090222152059.GI17040-mfnYTeDhw6uOVk/H6u/4e9i2O/JbrIOy@public.gmane.org>
2009-02-22 18:52       ` Jean Delvare
2009-02-24 16:33   ` Mark A. Greer
2009-02-25  1:12   ` Sean MacLennan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox