Skip to contentSkip to conversation

i2c: Adapter timeout is in jiffies

PATCH Lennert Buytenhek 4 participants 4 messages Feb 22, 2009 – Feb 25, 2009 3 messages not in the archive I2C subsystem host drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Lennert Buytenhek

author Acked-by
#2 lore raw
Quoted 21 lines · Jean Delvare

From: Jean Delvare <[email protected]>
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.

Cc Clifford Wolf <[email protected]>
Cc Sean MacLennan <smaclennan-Qtffpm9i2AVWk0Htik3J/[email protected]>
Cc Stefan Roese <[email protected]>
Cc Lennert Buytenhek <kernel-OLH4Qvv75CYX/[email protected]>
Cc Dan Williams <[email protected]>
Cc Grant Likely <grant.likely-s3s/[email protected]>
Cc Mark A. Greer <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines
---
 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:

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

A message that is not in the archive (sent off-list or not yet received): 20090222152059.GI17040-mfnYTeDhw6uOVk/H6u/4e9i2O/[email protected]

#4 lore raw

Hi Lennert,

Quoted 31 lines · Lennert Buytenhek
Quoted 21 lines · Jean Delvare

From: Jean Delvare <[email protected]>
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.

Cc Clifford Wolf <[email protected]>
Cc Sean MacLennan <smaclennan-Qtffpm9i2AVWk0Htik3J/[email protected]>
Cc Stefan Roese <[email protected]>
Cc Lennert Buytenhek <kernel-OLH4Qvv75CYX/[email protected]>
Cc Dan Williams <[email protected]>
Cc Grant Likely <grant.likely-s3s/[email protected]>
Cc Mark A. Greer <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines
---
 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(-)
Quoted 3 lines

The i2c-mv64xxx part:

Thanks.

Quoted 2 lines

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

Signature · 1 line
Jean Delvare
Acked-by
#5 lore raw
In reply to a message not in the archive
Quoted 21 lines · Jean Delvare

From: Jean Delvare <[email protected]>
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.

Cc Clifford Wolf <[email protected]>
Cc Sean MacLennan <smaclennan-Qtffpm9i2AVWk0Htik3J/[email protected]>
Cc Stefan Roese <[email protected]>
Cc Lennert Buytenhek <kernel-OLH4Qvv75CYX/[email protected]>
Cc Dan Williams <[email protected]>
Cc Grant Likely <grant.likely-s3s/[email protected]>
Cc Mark A. Greer <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines
---
 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:

#6 lore raw
In reply to a message not in the archive
Quoted 21 lines · On Sun, 22 Feb 2009 16:07:05 +0100 "Jean Delvare"…

From: Jean Delvare <[email protected]>
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.

Cc Clifford Wolf <[email protected]>
Cc Sean MacLennan <smaclennan-Qtffpm9i2AVWk0Htik3J/[email protected]>
Cc Stefan Roese <[email protected]>
Cc Lennert Buytenhek <kernel-OLH4Qvv75CYX/[email protected]>
Cc Dan Williams <[email protected]>
Cc Grant Likely <grant.likely-s3s/[email protected]>
Cc Mark A. Greer <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines
---
 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:

Cheers,
Sean