openwrt/staging/blogic.git
12 years agostaging: comedi: adl_pci9118: remove PCI9118_EXTDEBUG and DPRINTK
H Hartley Sweeten [Tue, 11 Sep 2012 23:39:44 +0000 (16:39 -0700)]
staging: comedi: adl_pci9118: remove PCI9118_EXTDEBUG and DPRINTK

These macros enable a bunch of function trace messages. These should
not be in the final driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9118: remove devpriv and this_board macros
H Hartley Sweeten [Tue, 11 Sep 2012 23:39:10 +0000 (16:39 -0700)]
staging: comedi: adl_pci9118: remove devpriv and this_board macros

These macros rely on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adv_pci1710: use cfc_check_trigger_is_unique
H Hartley Sweeten [Tue, 11 Sep 2012 22:09:39 +0000 (15:09 -0700)]
staging: comedi: adv_pci1710: use cfc_check_trigger_is_unique

Use the helper function cfc_check_trigger_is_unique for the "step 2a"
tests of pci171x_ai_cmdtest().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adv_pci1710: single source triggers are unique
H Hartley Sweeten [Tue, 11 Sep 2012 22:09:23 +0000 (15:09 -0700)]
staging: comedi: adv_pci1710: single source triggers are unique

If a single source trigger passes "step 1" of the do_cmdtest function
they are already unique. There is no need to recheck them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adv_pci1710: use cfc_check_trigger_src
H Hartley Sweeten [Tue, 11 Sep 2012 22:09:06 +0000 (15:09 -0700)]
staging: comedi: adv_pci1710: use cfc_check_trigger_src

Use the helper function cfc_check_trigger_src for the "step 1"
tests of pci171x_ai_cmdtest().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adv_pci1710: remove "dummy" boardinfo entry
H Hartley Sweeten [Tue, 11 Sep 2012 22:08:52 +0000 (15:08 -0700)]
staging: comedi: adv_pci1710: remove "dummy" boardinfo entry

The legacy attach used the "dummy" boardinfo entry to allow
matching a boardinfo to a pci card based on the "name" passed
by the comedi core. This driver now uses the PCI auto config
mechanism which always matches to the PCI vendor/device ids.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adv_pci1710: remove unnecessary 'valid'
H Hartley Sweeten [Tue, 11 Sep 2012 22:08:37 +0000 (15:08 -0700)]
staging: comedi: adv_pci1710: remove unnecessary 'valid'

The 'valid' variable in the private data is only used in the
detach of the board to determine if the pci1710_reset() function
can be called. That function only requires a valid dev->iobase
to work. Use that for the check instead and remove the unneeded
variable from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adv_pci1710: use attach_pci callback
H Hartley Sweeten [Tue, 11 Sep 2012 22:08:21 +0000 (15:08 -0700)]
staging: comedi: adv_pci1710: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adv_pci1710: remove board attach noise
H Hartley Sweeten [Tue, 11 Sep 2012 22:08:06 +0000 (15:08 -0700)]
staging: comedi: adv_pci1710: remove board attach noise

Remove the kernel message noise during the attach of the board.
Use a simple/clean dev_info at the end of the attach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: silicom: checkpatch cleanup: header tabs n spaces
Daniel Cotey [Wed, 12 Sep 2012 05:29:55 +0000 (22:29 -0700)]
Staging: silicom: checkpatch cleanup: header tabs n spaces

Fix defines to comply with style guidelines

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: silicom: minor cleanup: remove unused define
Daniel Cotey [Wed, 12 Sep 2012 05:29:06 +0000 (22:29 -0700)]
Staging: silicom: minor cleanup: remove unused define

DEVICE_NODE not used

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: silicom: checkpatch: cleanup macros
Daniel Cotey [Wed, 12 Sep 2012 05:28:08 +0000 (22:28 -0700)]
Staging: silicom: checkpatch: cleanup macros

Fix msec_delay_bp macro formatting

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove pci_dev_put()
H Hartley Sweeten [Tue, 11 Sep 2012 20:54:21 +0000 (13:54 -0700)]
staging: comedi: adl_pci9111: remove pci_dev_put()

This driver no longer walks the pci bus to find the pci_dev.
The pci_dev_put() is no longer needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove the function description comments
H Hartley Sweeten [Tue, 11 Sep 2012 20:51:16 +0000 (13:51 -0700)]
staging: comedi: icp_multi: remove the function description comments

These comments are pretty obvious. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove devpriv macro
H Hartley Sweeten [Tue, 11 Sep 2012 20:50:56 +0000 (13:50 -0700)]
staging: comedi: icp_multi: remove devpriv macro

This macro relies on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: use attach_pci callback
H Hartley Sweeten [Tue, 11 Sep 2012 20:50:41 +0000 (13:50 -0700)]
staging: comedi: icp_multi: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it. The
boardinfo is also not needed now so remove it also.

This also allows removing the icp_multi.h header completely.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove board attach noise
H Hartley Sweeten [Tue, 11 Sep 2012 20:50:06 +0000 (13:50 -0700)]
staging: comedi: icp_multi: remove board attach noise

Remove the kernel message noise during the attach of the board.
Use a simple/clean dev_info at the end of the attach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: the number of subdevices is fixed
H Hartley Sweeten [Tue, 11 Sep 2012 20:49:43 +0000 (13:49 -0700)]
staging: comedi: icp_multi: the number of subdevices is fixed

This board always has 5 subdevices.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove have_irq from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:49:26 +0000 (13:49 -0700)]
staging: comedi: icp_multi: remove have_irq from boardinfo

The board supported by this driver always supports interrupts.
Remove the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove iorange from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:49:10 +0000 (13:49 -0700)]
staging: comedi: icp_multi: remove iorange from boardinfo

This variable is not used in the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove cardtype from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:48:50 +0000 (13:48 -0700)]
staging: comedi: icp_multi: remove cardtype from boardinfo

This variable is not used in the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove rangecode from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:48:27 +0000 (13:48 -0700)]
staging: comedi: icp_multi: remove rangecode from boardinfo

The analog inputs and outputs for this driver use the same table
to set the analog range. Remove the boardinfo for it and just
reference the table directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove rangelist_ai from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:48:09 +0000 (13:48 -0700)]
staging: comedi: icp_multi: remove rangelist_ai from boardinfo

There is only one board type supported by this driver and the
analog input ranges are constant. Remove the boardinfo for it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove ranglist_ao from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:47:52 +0000 (13:47 -0700)]
staging: comedi: icp_multi: remove ranglist_ao from boardinfo

This variable is not used by the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove ai_maxdata from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:47:36 +0000 (13:47 -0700)]
staging: comedi: icp_multi: remove ai_maxdata from boardinfo

The analog inputs of this board always have 12-bit resolution.
Remove the boardinfo and just open-code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove ao_maxdata from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:47:20 +0000 (13:47 -0700)]
staging: comedi: icp_multi: remove ao_maxdata from boardinfo

The analog outputs of this board always have 12-bit resolution.
Remove the boardinfo and just open-code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove n_aichand from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:47:03 +0000 (13:47 -0700)]
staging: comedi: icp_multi: remove n_aichand from boardinfo

The analog inputs for this board always support differential
inputs and the number of channels is half the normal analog
input number.

Remove the n_aichand field from the boardinfo and fix the code
accordingly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove n_aichan from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:46:34 +0000 (13:46 -0700)]
staging: comedi: icp_multi: remove n_aichan from boardinfo

There is only one board type supported by this driver and the
number of analog input channels is constant. Remove the
boardinfo for it and just open-code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove n_aochan from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:46:17 +0000 (13:46 -0700)]
staging: comedi: icp_multi: remove n_aochan from boardinfo

There is only one board type supported by this driver and the
number of analog output channels is constant. Remove the
boardinfo for it and just open-code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove n_dichan from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:46:02 +0000 (13:46 -0700)]
staging: comedi: icp_multi: remove n_dichan from boardinfo

There is only one board type supported by this driver and the
number of digital input channels is constant. Remove the
boardinfo for it and just open-code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove n_dochan from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:45:46 +0000 (13:45 -0700)]
staging: comedi: icp_multi: remove n_dochan from boardinfo

There is only one board type supported by this driver and the
number of digital output channels is constant. Remove the
boardinfo for it and just open-code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove n_ctrs from boardinfo
H Hartley Sweeten [Tue, 11 Sep 2012 20:45:31 +0000 (13:45 -0700)]
staging: comedi: icp_multi: remove n_ctrs from boardinfo

There is only one board type supported by this driver and the
number of counter channels is constant. Remove the boardinfo
for it and just open-code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: remove ICP_MULTI_EXTDEBUG
H Hartley Sweeten [Tue, 11 Sep 2012 20:45:16 +0000 (13:45 -0700)]
staging: comedi: icp_multi: remove ICP_MULTI_EXTDEBUG

This define enables a bunch of function trace messages. These
should be removed in the final driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: icp_multi: convert to a pci_driver
H Hartley Sweeten [Tue, 11 Sep 2012 20:44:59 +0000 (13:44 -0700)]
staging: comedi: icp_multi: convert to a pci_driver

This driver is for a PCI device not a legacy device.

Convert it from a module_comedi_driver to a module_comedi_pci_driver.
This will allow using the comedi_pci_auto_config mechanism to attach
to the device.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/bridges/tpci200: Store the irq holder in slot_irq.
Jens Taprogge [Tue, 11 Sep 2012 11:35:13 +0000 (13:35 +0200)]
Staging: ipack/bridges/tpci200: Store the irq holder in slot_irq.

This way we do no longer need to keep a dangling pointer to struct
ipack_device in tpci200_slot after the device has been removed.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: delete .remove_device() callback
Samuel Iglesias Gonsálvez [Tue, 11 Sep 2012 11:35:12 +0000 (13:35 +0200)]
Staging: ipack: delete .remove_device() callback

As the IP module driver takes care of freeing its resources.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/bridges/tpci200: remove tpci200_slot_unregister
Samuel Iglesias Gonsálvez [Tue, 11 Sep 2012 11:35:11 +0000 (13:35 +0200)]
Staging: ipack/bridges/tpci200: remove tpci200_slot_unregister

It is not needed as the IP module should free its IRQ using
tpci200_free_irq callback.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/bridges/tpci200: delete ipack_device_unregister calls when exiting
Samuel Iglesias Gonsálvez [Tue, 11 Sep 2012 11:35:10 +0000 (13:35 +0200)]
Staging: ipack/bridges/tpci200: delete ipack_device_unregister calls when exiting

As the ipack_bus_unregister() takes care of unregistering the devices plugged
in the carrier, it is not needed to do it in the carrier driver.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: unregister devices when uninstall the carrier device.
Samuel Iglesias Gonsálvez [Tue, 11 Sep 2012 11:35:09 +0000 (13:35 +0200)]
Staging: ipack: unregister devices when uninstall the carrier device.

Find the IP modules that are plugged to the carrier and unregister them.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/devices/ipoctal: free the IRQ.
Samuel Iglesias Gonsálvez [Tue, 11 Sep 2012 11:35:08 +0000 (13:35 +0200)]
Staging: ipack/devices/ipoctal: free the IRQ.

As the IRQ was requested by the driver, it should free it also.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/devices/ipoctal: change exiting procedure
Samuel Iglesias Gonsálvez [Tue, 11 Sep 2012 11:35:07 +0000 (13:35 +0200)]
Staging: ipack/devices/ipoctal: change exiting procedure

The ipoctal devices can be uninstalled from the ipack_driver_unregister()
call as the device model calles the bus's .remove() function for each device
registered by the driver and it will execute the .remove() function of the
ipoctal driver.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/bridges/tpci200: fix the uninstall the ipack device
Samuel Iglesias Gonsálvez [Tue, 11 Sep 2012 11:35:06 +0000 (13:35 +0200)]
Staging: ipack/bridges/tpci200: fix the uninstall the ipack device

Using the call to the ipack_device_unregister() function to avoid the
strange way it was doing, as the device model will take care of calling
the bus's .remove function when a device is being unregistered.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/bridges/tpci200: increment the reference counter of the pci_dev
Samuel Iglesias Gonsálvez [Tue, 11 Sep 2012 11:35:05 +0000 (13:35 +0200)]
Staging: ipack/bridges/tpci200: increment the reference counter of the pci_dev

As indicated in the documentation of pci_dev_get.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/bridges/tpci200: reorder the iounmap and pci_release_region
Samuel Iglesias Gonsálvez [Tue, 11 Sep 2012 11:35:04 +0000 (13:35 +0200)]
Staging: ipack/bridges/tpci200: reorder the iounmap and pci_release_region

Move iounmap and pci_release_region to tpci200_unregister(), as it is the place
where the clean-up of the device is done.

Also, renamed iounmap() to pci_iounmap() as the mapped region was requested
from PCI bus.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: check the device ID space CRC.
Jens Taprogge [Tue, 11 Sep 2012 11:35:03 +0000 (13:35 +0200)]
Staging: ipack: check the device ID space CRC.

We check the CRC and store the result of the check in struct ipac_device.
A warning is emitted if the check fails.  However we leave it to the
IPack module device to refuse to initialize due to a bad CRC.  I have seen
otherwise good modules with bad CRCs.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: reset previous timeouts during device registration.
Jens Taprogge [Tue, 11 Sep 2012 11:35:02 +0000 (13:35 +0200)]
Staging: ipack: reset previous timeouts during device registration.

Resetting the previous timeout we avoid to read the timeout status register
and see timeout errors that don't correspond to the present state of the
device.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: Switch to 8MHz operation before reading ID.
Jens Taprogge [Tue, 11 Sep 2012 11:35:01 +0000 (13:35 +0200)]
Staging: ipack: Switch to 8MHz operation before reading ID.

Reading the ID space at 8 MHz is always supported.  Most carriers will
boot up in 8MHz mode.  Still, play it safe and ensure we are operating at
8Mhz.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/bridges/tpci200: remove struct list_head
Samuel Iglesias Gonsálvez [Tue, 11 Sep 2012 11:35:00 +0000 (13:35 +0200)]
Staging: ipack/bridges/tpci200: remove struct list_head

As the linked list was removed before, delete the useless struct list_head

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: remove field driver from struct ipack_device.
Jens Taprogge [Tue, 11 Sep 2012 11:34:59 +0000 (13:34 +0200)]
Staging: ipack: remove field driver from struct ipack_device.

After a successful match is found the driver field in struct device is
set by the core device code. We can use this field.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: Choose the optimum bus speed by default.
Jens Taprogge [Tue, 11 Sep 2012 11:34:58 +0000 (13:34 +0200)]
Staging: ipack: Choose the optimum bus speed by default.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: Obtain supported speeds from ID ROM.
Jens Taprogge [Tue, 11 Sep 2012 11:34:57 +0000 (13:34 +0200)]
Staging: ipack: Obtain supported speeds from ID ROM.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/bridges/tpci200: provide new callbacks to tpci200
Jens Taprogge [Tue, 11 Sep 2012 11:34:56 +0000 (13:34 +0200)]
Staging: ipack/bridges/tpci200: provide new callbacks to tpci200

Provide get_clockrate, set_clockrate, get_error, get_timeout and reset_timeout
callbacks.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: Provide several carrier callbacks.
Jens Taprogge [Tue, 11 Sep 2012 11:34:55 +0000 (13:34 +0200)]
Staging: ipack: Provide several carrier callbacks.

We provide callbacks to:
 - set/get the clockrate a module is accessed at,
 - get the error state of a slot,
 - get/reset the timeout state of a slot.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/bridges/tpci200: Put the TPCI200 control registers into a struct.
Jens Taprogge [Tue, 11 Sep 2012 11:34:54 +0000 (13:34 +0200)]
Staging: ipack/bridges/tpci200: Put the TPCI200 control registers into a struct.

This saves us from a little pointer arithmetic and cleans up the code a bit.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: omap-thermal: improve conf data handling and initialization
Eduardo Valentin [Tue, 11 Sep 2012 16:06:55 +0000 (19:06 +0300)]
staging: omap-thermal: improve conf data handling and initialization

While registering the thermal zone, it is required to have the cooling
devices already setup, so that the .bind callback can succeed.

Due to that, the driver code needs to be reorganized so that we first
setup the cooling devices then the zones. This way we cope with the
right thermal framework initialization sequence.

This patch changes the order of the thermal zone initialization,
so that we create it only when the cooling devices are available.
It also adds some defensive checks for the config data, so that
the callbacks are ready for calls when the data is still not
initialized.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: omap-thermal: fix polling period settings
Eduardo Valentin [Tue, 11 Sep 2012 16:06:54 +0000 (19:06 +0300)]
staging: omap-thermal: fix polling period settings

While registering the omap thermal zones we need to
properly specify TC1 and TC2, as long as the proper
passive polling period and monitor period.

This patch fixes the parameters passed while registering
the thermal zone.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: omap-thermal: remove checkpatch.pl warnings on data files
Eduardo Valentin [Tue, 11 Sep 2012 16:06:53 +0000 (19:06 +0300)]
staging: omap-thermal: remove checkpatch.pl warnings on data files

Simple checkpatch.pl clean ups.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: omap-thermal: Correct checkpatch.pl warnings
J Keerthy [Tue, 11 Sep 2012 16:06:52 +0000 (19:06 +0300)]
staging: omap-thermal: Correct checkpatch.pl warnings

Removes checkpatch warnings on omap-bandgap.c.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: fix brace coding style issues
Güngör Erseymen [Tue, 11 Sep 2012 14:56:42 +0000 (17:56 +0300)]
staging: comedi: fix brace coding style issues

Fix coding style issues by removing unnecessary braces.

Signed-off-by: Güngör Erseymen <gelurine@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove unnecessary comments
H Hartley Sweeten [Tue, 11 Sep 2012 17:49:04 +0000 (10:49 -0700)]
staging: comedi: adl_pci9111: remove unnecessary comments

Remove some obvious comments.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove extra i8253_cascade_ns_to_timer_2div()
H Hartley Sweeten [Tue, 11 Sep 2012 17:48:47 +0000 (10:48 -0700)]
staging: comedi: adl_pci9111: remove extra i8253_cascade_ns_to_timer_2div()

The comedi core always calls the 'do_cmdtest' function before it
calls the 'do_cmd' function. The 'do_cmdtest' for this driver calls
i8253_cascade_ns_to_timer_2div() to validate the cmd->convert_arg.
This call sets the dev_private 'div1' and 'div2' values needed to
program the 8254 timer. There is no need to call the i8253 function
a second time in the do_cmd function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: use cfc_check_trigger_is_unique
H Hartley Sweeten [Tue, 11 Sep 2012 17:48:28 +0000 (10:48 -0700)]
staging: comedi: adl_pci9111: use cfc_check_trigger_is_unique

Use the helper function cfc_check_trigger_is_unique.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: comedi_fc: introduce cfc_check_trigger_is_unique
H Hartley Sweeten [Tue, 11 Sep 2012 17:48:10 +0000 (10:48 -0700)]
staging: comedi: comedi_fc: introduce cfc_check_trigger_is_unique

"Step 2" of each do_cmdtest checks that the trigger sources are
unique by doing something like this for each trigger:

if (cmd->start_src != TRIG_TIMER &&
    cmd->start_src != TRIG_FOLLOW &&
    cmd->start_src != TRIG_EXT)
err++;
/* Test the remaining triggers similarly */

if (err)
return 2;

Introduce a helper function in comedi_fc to handle this boilerplate.
The drivers can then just do:

err |= cfc_check_trigger_is_unique(cmd->start_src);
/* Test the remaining triggers similarly */

if (err)
return 2;

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: single source triggers are unique
H Hartley Sweeten [Tue, 11 Sep 2012 17:47:52 +0000 (10:47 -0700)]
staging: comedi: adl_pci9111: single source triggers are unique

If a single source trigger passes "step 1" of the do_cmdtest function
they are already unique. There is no need to recheck them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: use cfc_check_trigger_src
H Hartley Sweeten [Tue, 11 Sep 2012 17:47:33 +0000 (10:47 -0700)]
staging: comedi: adl_pci9111: use cfc_check_trigger_src

Remove the pci9111_check_trigger_src macro and use the helper
function cfc_check_trigger_src instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: comedi_fc: introduce cfc_check_trigger_src
H Hartley Sweeten [Tue, 11 Sep 2012 17:47:08 +0000 (10:47 -0700)]
staging: comedi: comedi_fc: introduce cfc_check_trigger_src

All of the comedi drivers that support the 'cmd' callback also
require a 'do_cmdtest' callback. The do_cmdtest validates the
comedi_cmd before it is executed.

"Step 1" of each do_cmdtest does a trivial validation of the
trigger sources by doing something like this for each trigger:

int err = 0;
unsigned int tmp;

tmp = cmd->start_src;
src &= TRIG_NOW;
if (!src || tmp != src)
err++;
/* Test the remaining triggers similarly */

if (err)
return 1;

Introduce a helper function in comedi_fc to handle this boilerplate.
The drivers can then just do:

err |= cfc_check_trigger_src(&cmd->start_src, TRIG_NOW);
/* Test the remaining triggers similarly */

if (err)
return 1;

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/gdm72xx: remove camel-case vars in gdm_qos
Macpaul Lin [Tue, 11 Sep 2012 07:55:31 +0000 (15:55 +0800)]
staging/gdm72xx: remove camel-case vars in gdm_qos

Remove camel-case variables in gdm_qos.h and gdm_qos.c

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Cc: Paul Stewart <pstew@chromium.org>
Cc: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: Prepare for irqs.h removal
Tony Lindgren [Tue, 11 Sep 2012 05:31:06 +0000 (22:31 -0700)]
staging: tidspbridge: Prepare for irqs.h removal

Let's define some things locally to avoid breaking build
when irqs.h is removed.

This is needed for the ARM common zImage support.

Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: "wlags49_h2" Fix typos.
Justin P. Mattock [Mon, 10 Sep 2012 23:01:27 +0000 (16:01 -0700)]
staging: "wlags49_h2" Fix typos.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove unnecessary 'is_valid'
H Hartley Sweeten [Tue, 11 Sep 2012 02:04:57 +0000 (19:04 -0700)]
staging: comedi: adl_pci9111: remove unnecessary 'is_valid'

The 'is_valid' variable in the private data is only used in the
detach of the board to determine if the pci9111_reset() function
can be called. That function only requires a valid dev->iobase
to work. Use that for the check instead and remove the unneeded
variable from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: cleanup timer_divisor_[12]
H Hartley Sweeten [Tue, 11 Sep 2012 02:04:37 +0000 (19:04 -0700)]
staging: comedi: adl_pci9111: cleanup timer_divisor_[12]

For aesthetic reasons, rename the symbols.

Remove the unnecessary () around the symbols in the calls to
i8253_cascade_ns_to_timer_2div().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: cleanup pci9111_hr_ai_range
H Hartley Sweeten [Tue, 11 Sep 2012 02:04:18 +0000 (19:04 -0700)]
staging: comedi: adl_pci9111: cleanup pci9111_hr_ai_range

For aesthetic reasons, rename the symbol and fix the whitespace.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: cleanup the io register map
H Hartley Sweeten [Tue, 11 Sep 2012 02:04:00 +0000 (19:04 -0700)]
staging: comedi: adl_pci9111: cleanup the io register map

Finish renaming the defines for the register map. Move the bit
defines so that they are associated with the register. Remove
the unneeded '0' bit defines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: change pci9111_fifo_reset into a function
H Hartley Sweeten [Tue, 11 Sep 2012 02:03:39 +0000 (19:03 -0700)]
staging: comedi: adl_pci9111: change pci9111_fifo_reset into a function

This macro relies on a local variable having a specific name.
It's used multiple places so change it into a function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove pci9111_trigger_and_autoscan_[sg]et macros
H Hartley Sweeten [Tue, 11 Sep 2012 02:03:19 +0000 (19:03 -0700)]
staging: comedi: adl_pci9111: remove pci9111_trigger_and_autoscan_[sg]et macros

These macros rely on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove pci9111_interrupt_and_fifo_[sg]et macros
H Hartley Sweeten [Tue, 11 Sep 2012 02:03:00 +0000 (19:03 -0700)]
staging: comedi: adl_pci9111: remove pci9111_interrupt_and_fifo_[sg]et macros

These macros rely on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove pci9111_interrupt_clear macro
H Hartley Sweeten [Tue, 11 Sep 2012 02:02:40 +0000 (19:02 -0700)]
staging: comedi: adl_pci9111: remove pci9111_interrupt_clear macro

This macro relies on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove pci9111_software_trigger macro
H Hartley Sweeten dev [Tue, 11 Sep 2012 02:02:20 +0000 (19:02 -0700)]
staging: comedi: adl_pci9111: remove pci9111_software_trigger macro

This macro relies on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove pci9111_is_fifo_* macros
H Hartley Sweeten [Tue, 11 Sep 2012 02:01:50 +0000 (19:01 -0700)]
staging: comedi: adl_pci9111: remove pci9111_is_fifo_* macros

These macros rely on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove pci9111_ai_channel_[gs]et macros
H Hartley Sweeten [Tue, 11 Sep 2012 02:01:31 +0000 (19:01 -0700)]
staging: comedi: adl_pci9111: remove pci9111_ai_channel_[gs]et macros

These macros rely on a local variable having a specific name.

The comedi code makes sure the channel number is valid so the mask
of PCI9111_CHANNEL_MASK can be remove.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove pci9111_ai_range_[gs]et macros
H Hartley Sweeten [Tue, 11 Sep 2012 02:01:12 +0000 (19:01 -0700)]
staging: comedi: adl_pci9111: remove pci9111_ai_range_[gs]et macros

These macros rely on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: use local variables for the chan/range
H Hartley Sweeten [Tue, 11 Sep 2012 02:00:46 +0000 (19:00 -0700)]
staging: comedi: adl_pci9111: use local variables for the chan/range

Simplify the chan/range in pci9111_ai_insn_read() by using local
variables for hold the values and by just passing insn->chanspec
to the CR_* macros instead of using (&insn->chanspec)[0].

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove INTERRUPT_DEBUG code
H Hartley Sweeten [Tue, 11 Sep 2012 02:00:29 +0000 (19:00 -0700)]
staging: comedi: adl_pci9111: remove INTERRUPT_DEBUG code

This debug output should be removed in the final driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove AI_DO_CMD_DEBUG code
H Hartley Sweeten [Tue, 11 Sep 2012 02:00:11 +0000 (19:00 -0700)]
staging: comedi: adl_pci9111: remove AI_DO_CMD_DEBUG code

This debug output should be removed in the final driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: use attach_pci callback
H Hartley Sweeten [Tue, 11 Sep 2012 01:59:54 +0000 (18:59 -0700)]
staging: comedi: adl_pci9111: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it. The
boardinfo is also not needed now so remove it also.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove the io_range values from the private data
H Hartley Sweeten [Tue, 11 Sep 2012 01:59:38 +0000 (18:59 -0700)]
staging: comedi: adl_pci9111: remove the io_range values from the private data

These values are not used by the driver. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove the board attach noise
H Hartley Sweeten [Tue, 11 Sep 2012 01:59:21 +0000 (18:59 -0700)]
staging: comedi: adl_pci9111: remove the board attach noise

Remove the kernel messages about the io base/range for the pci
resources.

Move the board attach messages to the end of the attach and use
a simple/clean dev_info message for it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: analog input subdevice is fixed
H Hartley Sweeten [Tue, 11 Sep 2012 01:59:02 +0000 (18:59 -0700)]
staging: comedi: adl_pci9111: analog input subdevice is fixed

The analog input subdevice is the same for all boards supported by
this driver. Remove the boardinfo just open-code the values in the
attach function.

Note: the only other board that could be supported by this driver is
the ADLink PCI-9111DG board. This board has 12-bit analog inputs
instead of the 16-bit inputs of the PCI-9111HR board. Unfortunately
these boards share the same PCI vendor/device id.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove 'single' channel list check
H Hartley Sweeten [Tue, 11 Sep 2012 01:58:46 +0000 (18:58 -0700)]
staging: comedi: adl_pci9111: remove 'single' channel list check

The comedi core verifies that the chanlist elements are inrange for
the subdevice. Remove the redundant check in thie driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove chanlist_len checks
H Hartley Sweeten [Tue, 11 Sep 2012 01:58:29 +0000 (18:58 -0700)]
staging: comedi: adl_pci9111: remove chanlist_len checks

The chanlist_len is validated by the comedi core before calling
the do_cmdtest function. Remove these redundant checks.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: digital input/output subdevices are fixed
H Hartley Sweeten [Tue, 11 Sep 2012 01:58:00 +0000 (18:58 -0700)]
staging: comedi: adl_pci9111: digital input/output subdevices are fixed

The digital input and output subdevices are the same for all boards
supported by this driver. Remove the defines just open-code the values
in the attach function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: analog output subdevice is fixed
H Hartley Sweeten [Tue, 11 Sep 2012 01:57:42 +0000 (18:57 -0700)]
staging: comedi: adl_pci9111: analog output subdevice is fixed

The analog output subdevice is the same for all boards supported
by this driver. Remove the boardinfo for it and just open-code
the values in the attach function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: cleanup ai read in pci9111_ai_insn_read()
H Hartley Sweeten [Tue, 11 Sep 2012 01:55:54 +0000 (18:55 -0700)]
staging: comedi: adl_pci9111: cleanup ai read in pci9111_ai_insn_read()

The shift, maxdata, and invert values, used to handle the 12-/16-bit
analog input differences, can be calculated based on the subdevice
maxdata value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove pci9111_{hr_, )ai* macros
H Hartley Sweeten [Tue, 11 Sep 2012 01:55:04 +0000 (18:55 -0700)]
staging: comedi: adl_pci9111: remove pci9111_{hr_, )ai* macros

These macros rely on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: cleanup pci9111_ai_munge()
H Hartley Sweeten [Tue, 11 Sep 2012 01:54:42 +0000 (18:54 -0700)]
staging: comedi: adl_pci9111: cleanup pci9111_ai_munge()

The shift, maxdata, and invert values, used to handle the 12-/16-bit
analog input differences, can be calculated based on the subdevice
maxdata value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove AI_INSN_DEBUG code
H Hartley Sweeten [Tue, 11 Sep 2012 01:54:26 +0000 (18:54 -0700)]
staging: comedi: adl_pci9111: remove AI_INSN_DEBUG code

This debug output should be removed in the final driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: cleanup pci9111_ao_insn_write()
H Hartley Sweeten [Tue, 11 Sep 2012 01:54:08 +0000 (18:54 -0700)]
staging: comedi: adl_pci9111: cleanup pci9111_ao_insn_write()

Remove the unnecessary comment.

Only the last data value written needs to be cached for
readback.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: cleanup ao resolution
H Hartley Sweeten [Tue, 11 Sep 2012 01:53:49 +0000 (18:53 -0700)]
staging: comedi: adl_pci9111: cleanup ao resolution

The 'ao_resolution' in the boardinfo is not used. Remove it.

Rename the 'ao_resolution_mask' to 'ao_maxdata', this information
is copied to the ao subdevice 'maxdata'.

Remove the PCI9111_AO_RESOLUTION* defines and just open-code the
maxdata in the boardinfo.

Remove the mask of the output data in pci9111_ao_insn_write(),
the comedi core insures that the data is valid.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: cleanup pci9111_ao_insn_read()
H Hartley Sweeten [Tue, 11 Sep 2012 01:53:33 +0000 (18:53 -0700)]
staging: comedi: adl_pci9111: cleanup pci9111_ao_insn_read()

Remove the unnecessary comments.

The readback value does not need to be masked.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adl_pci9111: remove pci9111_ao_set_data macro
H Hartley Sweeten [Tue, 11 Sep 2012 01:53:16 +0000 (18:53 -0700)]
staging: comedi: adl_pci9111: remove pci9111_ao_set_data macro

This macro relies on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>