Skip to contentSkip to conversation

i2c/busses: Add support for Diolan U2C-12 USB/I2C adapter

PATCH Superseded Guenter Roeck 1 participant 1 message Jan 20, 2011

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 i2c/busses: Add support for Diolan U2C-12 USB/I2C adapter

---
v3:
- Round frequency configuration down (instead of rounding to closest value)
- Simplify diolan_usb_transfer() a bit
- Introduce diolan_write_cmd() to check if a write is needed and execute it if so.
- diolan_fw_version() and diolan_get_serial() no longer return errors.
- Change "Out of memory" error message to "no memory for device state".
- Display error message if diolan_init() fails.
- Merged patches into a single patch.

v2:
- Moved receive and transmit buffers to allocated driver memory
- diolan_usb_transfer() no longer requires buffer and length arguments
- Pass "struct i2c_diolan_u2c *" instead of "struct i2c_adapter *" to many of the internal usb access functions.
- Introduced diolan_usb_cmd(), diolan_usb_cmd_data(), and diolan_usb_cmd_data2() as front-end functions for actual commands.
- Function prefix is now diolan_ for all functions.
- Removed diolan_scan().
- Fixed race conditions in diolan_u2c_probe().
- Use i2c_{set,get}_adapdata instead of misusing adapter.algo_data.
- Driver name is now i2c-diolan-u2c (instead of i2c-u2c-usb).
- Added support for "frequency" module parameter to set i2c clock frequency
- Enabled I2C clock stretching support
- Support sending multiple commands in single usb transfer
- Several other minor changes to address review comments.

 MAINTAINERS                         |    6 +
 drivers/i2c/busses/Kconfig          |   10 +
 drivers/i2c/busses/Makefile         |    1 +
 drivers/i2c/busses/i2c-diolan-u2c.c |  530 +++++++++++++++++++++++++++++++++++
 4 files changed, 547 insertions(+), 0 deletions(-)
 create mode 100644 drivers/i2c/busses/i2c-diolan-u2c.c
MAINTAINERS +6 -0
index 1af022e..12b0be3 100644
@@ -2089,6 +2089,12 @@ F:	Documentation/serial/digiepca.txt
 F:	drivers/char/epca*
 F:	drivers/char/digi*
 
+DIOLAN U2C-12 I2C DRIVER
+M:	Guenter Roeck <guenter.roeck-IzeFyvvaP7pWk0Htik3J/[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	drivers/i2c/busses/i2c-diolan-u2c.c
+
 DIRECTORY NOTIFICATION (DNOTIFY)
 M:	Eric Paris <[email protected]>
 S:	Maintained
drivers/i2c/busses/Kconfig +10 -0
index 113505a..30f8dbd 100644
@@ -648,6 +648,16 @@ config I2C_EG20T
 
 comment "External I2C/SMBus adapter drivers"
 
+config I2C_DIOLAN_U2C
+	tristate "Diolan U2C-12 USB adapter"
+	depends on USB
+	help
+	  If you say yes to this option, support will be included for Diolan
+	  U2C-12, a USB to I2C interface.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-diolan-u2c.
+
 config I2C_PARPORT
 	tristate "Parallel port adapter"
 	depends on PARPORT
drivers/i2c/busses/Makefile +1 -0
index 9d2d0ec..3c630b7 100644
@@ -64,6 +64,7 @@ obj-$(CONFIG_I2C_XILINX)	+= i2c-xiic.o
 obj-$(CONFIG_I2C_EG20T)         += i2c-eg20t.o
 
 # External I2C/SMBus adapter drivers
+obj-$(CONFIG_I2C_DIOLAN_U2C)	+= i2c-diolan-u2c.o
 obj-$(CONFIG_I2C_PARPORT)	+= i2c-parport.o
 obj-$(CONFIG_I2C_PARPORT_LIGHT)	+= i2c-parport-light.o
 obj-$(CONFIG_I2C_TAOS_EVM)	+= i2c-taos-evm.o
drivers/i2c/busses/i2c-diolan-u2c.c new file +530 -0

530 lines not on this page · raw message

Signature · 1 line
1.7.3.1