Skip to content

Commit

Permalink
viafb: reduce I2C timeout and delay
Browse files Browse the repository at this point in the history
This patch reduces the value for I2C timeout and udelay.
The udelay was reduced to 10 (old: 40) which is still very high as for
standard-mode I2C even 5 should work. This gives a speedup of factor 4
when talking to I2C devices.
The timeout was reduced to 2 (old: 20) which is taken from the radeon
driver so it should work as well. This gives a speedup of factor 10 when
detecting that there is no I2C device we want to talk to.
This causes a huge improvement of device initialization time.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Cc: Joseph Chan <JosephChan@via.com.tw>
  • Loading branch information
Florian Tobias Schandinat authored and Florian Tobias Schandinat committed Sep 24, 2010
1 parent ee40b7d commit e029ab0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/via/via_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ static int create_i2c_bus(struct i2c_adapter *adapter,
algo->setscl = via_i2c_setscl;
algo->getsda = via_i2c_getsda;
algo->getscl = via_i2c_getscl;
algo->udelay = 40;
algo->timeout = 20;
algo->udelay = 10;
algo->timeout = 2;
algo->data = adap_cfg;

sprintf(adapter->name, "viafb i2c io_port idx 0x%02x",
Expand Down

0 comments on commit e029ab0

Please sign in to comment.