aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-tiny-usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-tiny-usb.c')
-rw-r--r--drivers/i2c/busses/i2c-tiny-usb.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c
index e29b6d5ba8e..b5b1bbf37d3 100644
--- a/drivers/i2c/busses/i2c-tiny-usb.c
+++ b/drivers/i2c/busses/i2c-tiny-usb.c
@@ -31,11 +31,13 @@
31#define CMD_I2C_IO_BEGIN (1<<0) 31#define CMD_I2C_IO_BEGIN (1<<0)
32#define CMD_I2C_IO_END (1<<1) 32#define CMD_I2C_IO_END (1<<1)
33 33
34/* i2c bit delay, default is 10us -> 100kHz */ 34/* i2c bit delay, default is 10us -> 100kHz max
35 (in practice, due to additional delays in the i2c bitbanging
36 code this results in a i2c clock of about 50kHz) */
35static unsigned short delay = 10; 37static unsigned short delay = 10;
36module_param(delay, ushort, 0); 38module_param(delay, ushort, 0);
37MODULE_PARM_DESC(delay, "bit delay in microseconds, " 39MODULE_PARM_DESC(delay, "bit delay in microseconds "
38 "e.g. 10 for 100kHz (default is 100kHz)"); 40 "(default is 10us for 100kHz max)");
39 41
40static int usb_read(struct i2c_adapter *adapter, int cmd, 42static int usb_read(struct i2c_adapter *adapter, int cmd,
41 int value, int index, void *data, int len); 43 int value, int index, void *data, int len);
@@ -137,7 +139,7 @@ static const struct i2c_algorithm usb_algorithm = {
137 * Future Technology Devices International Ltd., later a pair was 139 * Future Technology Devices International Ltd., later a pair was
138 * bought from EZPrototypes 140 * bought from EZPrototypes
139 */ 141 */
140static struct usb_device_id i2c_tiny_usb_table [] = { 142static const struct usb_device_id i2c_tiny_usb_table[] = {
141 { USB_DEVICE(0x0403, 0xc631) }, /* FTDI */ 143 { USB_DEVICE(0x0403, 0xc631) }, /* FTDI */
142 { USB_DEVICE(0x1c40, 0x0534) }, /* EZPrototypes */ 144 { USB_DEVICE(0x1c40, 0x0534) }, /* EZPrototypes */
143 { } /* Terminating entry */ 145 { } /* Terminating entry */