summaryrefslogtreecommitdiff
path: root/drivers/staging
AgeCommit message (Collapse)Author
2013-08-01staging: ozwpan: High resolution timersRupesh Gujare
Current implementation assumes HZ = 1000 for calculating all internal timer intervals, which creates problem on platforms where HZ != 1000. As well we need resolution of less than 10 mSec for heartbeat calculation, this creates problem on some platforms where HZ is configured as HZ = 100, or around, which restricts us to timer interval of 10 mSec. This is particularly found on embedded devices. This patch moves on to use high resolution timers to calculate all timer intervals as it allows us to have very small resolution of timer interval, removing dependency on HZ. Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: dt9812: Resolve different base types warnings.Shaun Laing
Resolves warnings from the "sparse" checker of the form "warning: incorrect type in assignment (different base types)". Signed-off-by: Shaun Laing <shaun@xresource.ca> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: allow ISA and PC/104 drivers on non-ISA systemsH Hartley Sweeten
Embedded systems with a PC/104 bus might have a configuration that does not have ISA enabled. This creates a problem in Comedi where the PC/104 drivers cannot be enabled. Remove the 'depends on ISA' for the "Comedi ISA and PC/104 drivers" menu to allow the user to select these drivers on non-ISA systems. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbduxsigma: absorb usbduxsigma_attach_common() into callerH Hartley Sweeten
This function is only called by usbduxsigma_auto_attach(). Absorb it and refactor the code a bit to match the usbdux driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbdux: tidy up usbdux_free_usb_buffers()H Hartley Sweeten
For aesthetics, pass the comedi_device pointer to this function instead of the private data pointer. The usb_kill_urb() calls are not needed. All the urbs were unlinked before this function was called. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbdux: tidy up usbdux_detach()H Hartley Sweeten
Make sure the usb intfdata is always cleared when the device is detached. Refactor the code to remove an indent level. Always unlink the urbs when the device is detached. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbduxsigma: always clear the usb intfdata in (*detach)H Hartley Sweeten
Make sure the usb intfdata is always cleared when the device is detached. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbduxsigma: move urb unlink into usbduxsigma_detach()H Hartley Sweeten
For aesthetics, move the final force unlink of the urbs from usbduxsigma_free_usb_buffers() to usbduxsigma_detach(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbduxsigma: init 'pwm_buf_sz' in usbduxsigma_auto_attach()H Hartley Sweeten
Initialize this variable with then_ai_urbs and n_ao_urbs in the attach. Then usbduxsigma_alloc_usb_buffers() can just check the variable to determine if the urb needs to be allocated. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbduxsigma: 'dac_commands' does not need to be kzalloc()'dH Hartley Sweeten
The 'dac_commands' buffer is used to pass the ao channel list from usbduxsigma_ao_cmd() to the urb callback, usbduxsigma_ao_urb_complete(). This buffer does not need to be allocated. Change it into a simple array of the correct size. Rename the variable to 'ao_chanlist' to clarify what it actually is. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbdux: tidy up usbdux_alloc_usb_buffers()H Hartley Sweeten
Tidy up the error path by doing all the basic allocations then checking for failures. We have the comedi device now so fill in the urb->context. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbduxsigma: return void from usbduxsigma_pwm_pattern()H Hartley Sweeten
This function never fails and currently returns '1' so that the usbduxsigma_pwm_write() function returns to proper value (insn->n). It's also called by usbduxsigma_pwm_config() which also returns the '1' value. The proper return code for this function should be '0' to indicate success. Change the return type of the function to void and just have the callers return the proper values. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbdux: return void from usbdux_pwm_pattern()H Hartley Sweeten
This function never fails and currently returns '1' so that the usbdux_pwm_write() function returns to proper value (insn->n). It's also called by usbdux_pwm_config() which also returns the '1' value. The proper return code for this function should be '0' to indicate success. Change the return type of the function to void and just have the callers return the proper values. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbdux: tidy up usbdux_pwm_config()H Hartley Sweeten
Rename the local variable used for the private data pointer to 'devpriv'. Tidy up the function a bit. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbdux: remove usbdux_pwm_read()H Hartley Sweeten
The pwm subdevice is not readable so this callback function is not needed. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbdux: tidy up usbdux_pwm_write()H Hartley Sweeten
Remove the sanity check of the private data. This function can only be called if the private data was successfully allocated in the attach. Tidy up the function a bit. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbdux: tidy up usbdux_pwm_pattern()H Hartley Sweeten
Rename the local variable used for the private data pointer to 'devpriv'. Remove the sanity check of the private data. This function can only be called if the private data was successfully allocated in the attach. Tidy up the function to make it more concise. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbdux: tidy up usbdux_pwm_period()H Hartley Sweeten
Rename the local variable used for the private data pointer to 'devpriv'. Fix the fx2delay calculation so it does not use floating point values. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbduxsigma: remove the usb endpoint definesH Hartley Sweeten
The endpoint defines are each only used in one place and don't help clarify the code. Remove the defines and just open code the values. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbduxsigma: generalize the ai/ao usb_kill_urb()H Hartley Sweeten
Generalize a helper function to replace for() loops in usbduxsigma_{ai,ao}_stop() that call usb_kill_urb() to unlink all the urbs. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: usbdux: generalize the usb_submit_urb functionsH Hartley Sweeten
Generalize a helper function to replace usbduxsub_submit_{in,out}urbs(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: vt6656: device.h unused variablesMalcolm Priestley
wACKDuration wRTSTransmitLen byRTSServiceField byRTSSignalField Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: vt6656: dead code wCTSDuration.Malcolm Priestley
Always set to zero, so remove. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: xillybus: Fixed sparse errorsEli Billauer
Changes: * xillybus.h: __iomem added to struct xilly_endpoint -> registers to suppress "different address spaces" errors. * xillybus_core.c: __user added as required for the same reason. * The two member names of struct xilly_endpoint_hardware of the form sync_single_for_{cpu,device} were changed to something that won't look like the well-known functions. * All *.c files: Variables and functions made static as required. Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: xillybus: Removed dependency on OF_DEVICE in KconfigEli Billauer
This variable was removed from the kernel a while ago. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: tidy up multi-line commentsH Hartley Sweeten
Tidy up the multi-line comments to follow the CodingStyle. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: remove some unnecessary parenthesesH Hartley Sweeten
These parentheses are not necessary. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: tidy up user ai/ao range initializationH Hartley Sweeten
The allocation of the user range tables could fail. Make sure to check for it. Change the kmalloc()'s to kzalloc()'s to make sure the allocated range tables are initialized to a known state. Change the local variables so they can be used for both the ai and ao range initialization and use shorter names to keep the lines < 80 chars. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: remove an unnecessary check in the attachH Hartley Sweeten
If the user does not specify the analog output range the private data 'user_ao_range_table' will not be allocated. The comedi core will detect the NULL s->range_table and automatically set it to &range_unknown. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: fix das16_detach()H Hartley Sweeten
The function das16_reset() needs a valid dev->iobase. Since the iobase is requested after the devpriv has been allocated in the attach, move the das16_reset() call into the if (devpriv) and add a if (dev->iobase). Also, move the release of the extra iobase into the if (devpriv) to prevent an invalid memory access. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: change MODULE_DESCRIPTIONH Hartley Sweeten
Change the MODULE_DESCRIPTION to something useful instead of the generic "Comedi low-level driver". Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: tidy up private data definitionH Hartley Sweeten
Remove the comments and add some whitespace to help readability. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: cleanup comedi_error() messagesH Hartley Sweeten
Some of these messages are missing the terminating '\n' and most of them have the quoted string split across lines. Change all of them to dev_err() messages and fix the issues. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: fix a > 80 char line issueH Hartley Sweeten
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: absorb das1600_mode_detect() into callerH Hartley Sweeten
This function is only called during the board attach to determine the pacer clock speed for the boards capable of bursting. Absorb it into the caller and remove the attach noise. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: cleanup printk message in board attachH Hartley Sweeten
Convert this printk message into a dev_err(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: fail attach if board id is incorrectH Hartley Sweeten
This driver probes the board id during the attach to ensure that the user is attempting to attach to the correct board type. Currently an error message is output if the ids are not consistent but the attach continues anyway. Make the attach fail if the id bits do not match. Also, cleanup the printk messages and use a dev_err() only if the probe fails. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: tidy up the register map definesH Hartley Sweeten
Add the suffix _REG to all the register defines to better indicate what they are. Add a prefix to all the register bit defines to avoid namespace clashes and to better indicate what they are. Tidy up the whitesapce. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: tidy up 8255 digital i/o subdeviceH Hartley Sweeten
The 8255 digital i/o subdevice is only available on some of the boards supported by this driver. Currently the 'i8255_offset' member of the boardinfo is used to indicate that it is available. To clarify this support, add a 'has_8255' bit-field flag to the boardinfo. We can then use this flag to conditionally allocate the space for the subdevice only when it is needed. Also, make sure to check that subdev_8255_init() is successful and propagate any errors. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: remove 'i8254_offset' from boardinfoH Hartley Sweeten
All the boards supported by this driver have an 8254 timer at offset 0x0c. Remove this unused information from the boardinfo. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: move boardinfo declarationH Hartley Sweeten
Now that the boardinfo does not require any forward declarations, move it near the definition of the struct. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: remove unnecessary test in das16_interrupt()H Hartley Sweeten
The timer is only started by the ai subdevice in das16_cmd_exec() and this function can only be called if the device is attached. Remove the unnecessary sanity check. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: move some functions to improve readabilityH Hartley Sweeten
For aesthetics, move some of the functions to make the code easier to follow. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: tidy up das16_ai_insn_read()H Hartley Sweeten
Factor out the loop that waits for the ai conversion to complete. Tidy up the function a bit. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: introduce das16_ai_{en, dis}able() helpersH Hartley Sweeten
Introduce a couple helper functions to enable and disable the analog input interrupt/dma conversions. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: remove the register map commentsH Hartley Sweeten
This is just extra cruft. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: remove unused static const variableH Hartley Sweeten
This variable is not used in the driver. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: remove unused DAS16_SIZEH Hartley Sweeten
This define is not used in the driver. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: add a 'can_burst' flag to the private dataH Hartley Sweeten
If the boardinfo 'size' is > 0x400 it indicates that the board has additional registers that allow bursting of analog input data. To better indicate this add a flag to the private data. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-01staging: comedi: das16: remove 'volatile' on private data variablesH Hartley Sweeten
As indicated by checkpatch.pl, "WARNING: Use of volatile is usually wrong: ...". The variables in the private data that are marked volatile don't need to be. Remove the volatile. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>