]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
i2c-tiny-usb: Fix a comment on bus frequency
authorJean Delvare <khali@linux-fr.org>
Tue, 2 Mar 2010 11:23:40 +0000 (12:23 +0100)
committerJean Delvare <khali@linux-fr.org>
Tue, 2 Mar 2010 11:23:40 +0000 (12:23 +0100)
The description of the delay parameter is incomplete, it suggests that
there is a direct relation between the delay value and the bus
frequency. In fact, due to additional delays in the i2c bitbanging
code, the i2c clock is always much slower.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Till Harbaum <Till@Harbaum.org>
drivers/i2c/busses/i2c-tiny-usb.c

index 41adb390e49cf8428c44a3ad2c734b62a9c6fde6..b5b1bbf37d3c5bafc2979860c8ce33d7a4aa69bf 100644 (file)
 #define CMD_I2C_IO_BEGIN       (1<<0)
 #define CMD_I2C_IO_END         (1<<1)
 
-/* i2c bit delay, default is 10us -> 100kHz */
+/* i2c bit delay, default is 10us -> 100kHz max
+   (in practice, due to additional delays in the i2c bitbanging
+   code this results in a i2c clock of about 50kHz) */
 static unsigned short delay = 10;
 module_param(delay, ushort, 0);
-MODULE_PARM_DESC(delay, "bit delay in microseconds, "
-                "e.g. 10 for 100kHz (default is 100kHz)");
+MODULE_PARM_DESC(delay, "bit delay in microseconds "
+                "(default is 10us for 100kHz max)");
 
 static int usb_read(struct i2c_adapter *adapter, int cmd,
                    int value, int index, void *data, int len);