[PATCH v2 00/33] staging: comedi: dt9812: cleanup driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This comedi driver is for a USB device and should be using the
comedi (*auto_attach) mechanism to attach to the device. Currently
the driver is a bit of a mess has a huge disconnect between the
loading of the usb_driver and the attaching of the comedi_device.
Right now this driver will even allow attaching to the comedi_device
even if the usb device is not attached to the system.

This series cleans up the driver and moves all the USB (*probe)
functionality into the comedi (*auto_attach) and the USB (*disconnect)
into the comedi (*detach). This ensures that a usb device is attached
before the comedi core does the (*auto_attach) to attach to the device.
This also allows consolidating all the private data into one struct
and makes the driver a lot easier to understand.

v2: address some issues pointed out by Ian Abbott

H Hartley Sweeten (33):
  staging: comedi: dt9812: move the usb framework functions to EOF
  staging: comedi: dt9812: rename the private data struct
  staging: comedi: dt9812: rename 'comedi' variable in struct slot_dt9812
  staging: comedi: dt9812: remove attaching by serial number
  staging: comedi: dt9812: tidy up usb_bulk_msg() calls
  staging: comedi: dt9812: pass the comedi_device * to dt9812_digital_in()
  staging: comedi: dt9812: pass the comedi_device * to dt9812_digital_out()
  staging: comedi: dt9812: pass the comedi_device * to dt9812_digital_out_shadow()
  staging: comedi: dt9812: pass the comedi_device * to dt9812_analog_in()
  staging: comedi: dt9812: pass the comedi_device * to dt9812_configure_gain()
  staging: comedi: dt9812: pass the comedi_device * to dt9812_configure_mux()
  staging: comedi: dt9812: pass the comedi_device * to dt9812_analog_out()
  staging: comedi: dt9812: tidy up the usb endpoint enumeration
  staging: comedi: dt9812: pass the comedi_device * to dt9812_analog_out_shadow()
  staging: comedi: dt9812: move the sempaphore used by the comedi_driver
  staging: comedi: dt9812: use module_comedi_usb_driver()
  staging: comedi: dt9812: move shadow values to private data
  staging: comedi: dt9812: remove 'interface' from usb private data
  staging: comedi: dt9812: factor the endpoint setup out of dt9812_probe()
  staging: comedi: dt9812: factor the device reset out of dt9812_probe()
  staging: comedi: dt9812: convert to use comedi (*auto_attach)
  staging: comedi: dt9812: remove unused variables from private data
  staging: comedi: dt9812: convert digital in subdevice to (*insn_bits)
  staging: comedi: dt9812: convert digital out subdevice to (*insn_bits)
  staging: comedi: dt9812: cleanup analog in subdevice (*insn_read)
  staging: comedi: dt9812: cleanup analog out subdevice (*insn_read)
  staging: comedi: dt9812: cleanup analog out subdevice (*insn_write)
  staging: comedi: dt9812: remove pr_fmt()
  staging: comedi: dt9812: use dev->class_dev for all dev_{level} messages
  staging: comedi: dt9812: remove some #if 0'ed out code
  staging: comedi: dt9812: usb_bulk_msg() timeout is in milliseconds
  staging: comedi: dt9812: default the analog input gain to 1
  staging: comedi: dt9812: do not allow attaching to unsupported devices

 drivers/staging/comedi/drivers/dt9812.c | 1031 ++++++++++++-------------------
 1 file changed, 396 insertions(+), 635 deletions(-)

-- 
1.8.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux