CHROMIUM: Correct i2c wait free time calculation
authorSimon Glass <sjg@chromium.org>
Thu, 30 Aug 2012 20:03:06 +0000 (13:03 -0700)
committerGerrit <chrome-bot@google.com>
Thu, 30 Aug 2012 22:53:33 +0000 (15:53 -0700)
We should be using usecs_to_jiffies() for microsecond values. Correct
this.

BUG=chrome-os-partner:12420
BRANCH=snow
TEST=manual
On kernel:

while true; do i2cdump  -f -y 4 0x48; done >/dev/null

On EC:

pmu 1000

See that there are no errors.

Change-Id: I589721e200ad9ad7d872ee952aece84ca2bec923
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31924
Reviewed-by: Doug Anderson <dianders@chromium.org>
drivers/i2c/busses/i2c-s3c2410.c

index 6e675c6..74332fd 100644 (file)
@@ -140,7 +140,7 @@ int s3c24xx_i2c_claim(struct s3c24xx_i2c *i2c)
                return 0;
 
        /* Start a round of trying to claim the bus */
-       stop_time = jiffies + msecs_to_jiffies(i2c->wait_free_us) + 1;
+       stop_time = jiffies + usecs_to_jiffies(i2c->wait_free_us) + 1;
        do {
                /* Indicate that we want to claim the bus */
                gpio_set_value(i2c->arb_gpios[I2C_ARB_GPIO_AP], 0);