aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/via_i2c.c
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-09-16 22:10:33 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-09-23 22:15:14 -0400
commite029ab0d02b94d633d8e82a46dfdb7fd94a62216 (patch)
tree4bd9807493945b64c2af4928c850ace4f93adaf2 /drivers/video/via/via_i2c.c
parentee40b7d1c0391944cdd328d4e2432bd4c110c644 (diff)
viafb: reduce I2C timeout and delay
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>
Diffstat (limited to 'drivers/video/via/via_i2c.c')
-rw-r--r--drivers/video/via/via_i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/via/via_i2c.c b/drivers/video/via/via_i2c.c
index 021112e279de..3844b558b7bd 100644
--- a/drivers/video/via/via_i2c.c
+++ b/drivers/video/via/via_i2c.c
@@ -202,8 +202,8 @@ static int create_i2c_bus(struct i2c_adapter *adapter,
202 algo->setscl = via_i2c_setscl; 202 algo->setscl = via_i2c_setscl;
203 algo->getsda = via_i2c_getsda; 203 algo->getsda = via_i2c_getsda;
204 algo->getscl = via_i2c_getscl; 204 algo->getscl = via_i2c_getscl;
205 algo->udelay = 40; 205 algo->udelay = 10;
206 algo->timeout = 20; 206 algo->timeout = 2;
207 algo->data = adap_cfg; 207 algo->data = adap_cfg;
208 208
209 sprintf(adapter->name, "viafb i2c io_port idx 0x%02x", 209 sprintf(adapter->name, "viafb i2c io_port idx 0x%02x",