summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
AgeCommit message (Collapse)AuthorFilesLines
2015-09-10mm: mark most vm_operations_struct constKirill A. Shutemov1-1/+1
With two exceptions (drm/qxl and drm/radeon) all vm_operations_struct structs should be constant. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Minchan Kim <minchan@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-09-08Merge tag 'libnvdimm-for-4.3' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: "This update has successfully completed a 0day-kbuild run and has appeared in a linux-next release. The changes outside of the typical drivers/nvdimm/ and drivers/acpi/nfit.[ch] paths are related to the removal of IORESOURCE_CACHEABLE, the introduction of memremap(), and the introduction of ZONE_DEVICE + devm_memremap_pages(). Summary: - Introduce ZONE_DEVICE and devm_memremap_pages() as a generic mechanism for adding device-driver-discovered memory regions to the kernel's direct map. This facility is used by the pmem driver to enable pfn_to_page() operations on the page frames returned by DAX ('direct_access' in 'struct block_device_operations'). For now, the 'memmap' allocation for these "device" pages comes from "System RAM". Support for allocating the memmap from device memory will arrive in a later kernel. - Introduce memremap() to replace usages of ioremap_cache() and ioremap_wt(). memremap() drops the __iomem annotation for these mappings to memory that do not have i/o side effects. The replacement of ioremap_cache() with memremap() is limited to the pmem driver to ease merging the api change in v4.3. Completion of the conversion is targeted for v4.4. - Similar to the usage of memcpy_to_pmem() + wmb_pmem() in the pmem driver, update the VFS DAX implementation and PMEM api to provide persistence guarantees for kernel operations on a DAX mapping. - Convert the ACPI NFIT 'BLK' driver to map the block apertures as cacheable to improve performance. - Miscellaneous updates and fixes to libnvdimm including support for issuing "address range scrub" commands, clarifying the optimal 'sector size' of pmem devices, a clarification of the usage of the ACPI '_STA' (status) property for DIMM devices, and other minor fixes" * tag 'libnvdimm-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (34 commits) libnvdimm, pmem: direct map legacy pmem by default libnvdimm, pmem: 'struct page' for pmem libnvdimm, pfn: 'struct page' provider infrastructure x86, pmem: clarify that ARCH_HAS_PMEM_API implies PMEM mapped WB add devm_memremap_pages mm: ZONE_DEVICE for "device memory" mm: move __phys_to_pfn and __pfn_to_phys to asm/generic/memory_model.h dax: drop size parameter to ->direct_access() nd_blk: change aperture mapping from WC to WB nvdimm: change to use generic kvfree() pmem, dax: have direct_access use __pmem annotation dax: update I/O path to do proper PMEM flushing pmem: add copy_from_iter_pmem() and clear_pmem() pmem, x86: clean up conditional pmem includes pmem: remove layer when calling arch_has_wmb_pmem() pmem, x86: move x86 PMEM API to new pmem.h header libnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option pmem: switch to devm_ allocations devres: add devm_memremap libnvdimm, btt: write and validate parent_uuid ...
2015-08-14staging: comedi: me4000: use bitwise AND instead of logicalDan Carpenter1-2/+2
This was supposed to bitwise AND but there is a typo. Fixes: 1a02387063fb ('staging: comedi: me4000: remove 'board' from me4000_ai_insn_read()') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14staging: comedi: adl_pci7x3x: fix digital output on PCI-7230Ian Abbott1-2/+14
The "adl_pci7x3x" driver replaced the "adl_pci7230" and "adl_pci7432" drivers in commits 8f567c373c4b ("staging: comedi: new adl_pci7x3x driver") and 657f77d173d3 ("staging: comedi: remove adl_pci7230 and adl_pci7432 drivers"). Although the new driver code agrees with the user manuals for the respective boards, digital outputs stopped working on the PCI-7230. This has 16 digital output channels and the previous adl_pci7230 driver shifted the 16 bit output state left by 16 bits before writing to the hardware register. The new adl_pci7x3x driver doesn't do that. Fix it in `adl_pci7x3x_do_insn_bits()` by checking for the special case of the subdevice having only 16 channels and duplicating the 16 bit output state into both halves of the 32-bit register. That should work both for what the board actually does and for what the user manual says it should do. Fixes: 8f567c373c4b ("staging: comedi: new adl_pci7x3x driver") Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: <stable@vger.kernel.org> # 3.13+, needs backporting for 3.7 to 3.12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14staging: comedi: hwdrv_apci3501: remove "magic" numbers in ↵H Hartley Sweeten1-1/+2
apci3501_read_insn_timer() Use register bit defines from addi_tcw.h to remove the "magic" numbers. 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>
2015-08-14staging: comedi: hwdrv_apci3501: remove "magic" numbers in ↵H Hartley Sweeten1-4/+4
apci3501_write_insn_timer() Use register bit defines from addi_tcw.h to remove the "magic" numbers. 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>
2015-08-14staging: comedi: hwdrv_apci3501: remove "magic" numbers in ↵H Hartley Sweeten1-5/+13
apci3501_config_insn_timer() Use register bit defines from addi_tcw.h to remove the "magic" numbers. 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>
2015-08-14staging: comedi: addi_apci_3501: remove "magic" numbers in apci3501_interrupt()H Hartley Sweeten1-5/+7
Use register bit defines from addi_tcw.h to remove the "magic" numbers. 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>
2015-08-14staging: comedi: addi_apci_3501: use addi_tcw.h for the timer registersH Hartley Sweeten2-27/+23
The APCI3501_TIMER_* register defines in this driver are that same as the ADDI_TCW_* defines with an additional offset. Add a 'tcw' (timer/counter/watchdog) member to the private data to hold the address for the iobase of the registers. Use that and the defines from addi_tcw.h to address the registers. 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>
2015-08-14staging: comedi: addi_apci_3501: rename CamelCase vars in apci3501_interrupt()H Hartley Sweeten1-10/+11
Rename the CamelCase local variables. 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>
2015-08-14staging: comedi: addi_apci_3501: prefer using the BIT macroH Hartley Sweeten1-3/+3
Change the register bit defines to use the BIT macro. 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>
2015-08-14staging: comedi: addi_apci_3501: rename private data 'i_IobaseAmcc'H Hartley Sweeten1-8/+7
Rename this CamelCase member of the private data. Also, fix the type of the member, it holds a pci_resource_start() address and should be an unsigned long. 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>
2015-08-14staging: comedi: hwdrv_apci3501: refactor apci3501_config_insn_timer()H Hartley Sweeten1-36/+23
The handling for the watchdog and timer modes is very similar. Refactor this function to use a common code path for both modes. 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>
2015-08-14staging: comedi: hwdrv_apci3501: rename 'ul_Command1' in ↵H Hartley Sweeten1-10/+11
apci3501_config_insn_timer() Rename this CamelCase local variable. For aesthetics, split the mask/set operations. 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>
2015-08-14staging: comedi: hwdrv_apci3501: refactor apci3501_read_insn_timer()H Hartley Sweeten1-12/+5
The handling of the ADDIDATA_WATCHDOG and ADDIDATA_TIMER is identical. Refactor this function to use a common code path for both timer modes. Remove the incorrect dev_err() noise. The subdevice is valid but the timer_mode is not supported. 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>
2015-08-14staging: comedi: hwdrv_apci3501: refactor apci3501_write_insn_timer()H Hartley Sweeten1-35/+13
The handling of the ADDIDATA_WATCHDOG and ADDIDATA_TIMER is identical except for the "stop" operation. Refactor this function to use a common code path for both timer modes. 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>
2015-08-14staging: comedi: hwdrv_apci3501: rename 'ul_Command1' in ↵H Hartley Sweeten1-18/+20
apci3501_write_insn_timer() Rename this CamelCase local variable. For aesthetics, split the mask/set operations. 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>
2015-08-14staging: comedi: addi_apci_3501: rename private data 'b_TimerSelectMode'H Hartley Sweeten2-9/+9
Rename this CamelCase member of 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>
2015-08-14staging: comedi: hwdrv_apci3501: remove useless read/mask to stop watchdogH Hartley Sweeten1-2/+0
The watchdog is stopped in apci3501_write_insn_timer() by writing a 0 to the timer control register. There is no need to read the register first and mask it (as done when the timer is used as a timer). Reported-by: coverity (CID 1227052) 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>
2015-08-14staging: comedi: comedi_fops: absorb comedi_free_board_minor()H Hartley Sweeten1-8/+5
This function is only called by comedi_cleanup_board_minors() and the 'minor' parameter will always be < COMEDI_NUM_BOARD_MINORS. For aesthetics, absorb the function and remove the unnecessary BUG_ON(). Split the comedi_clear_board_minor() out to clarify that the return value is a comedi_device pointer. 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>
2015-08-14staging: comedi: comedi_fops: remove BUG_ON() in ↵H Hartley Sweeten1-1/+0
comedi_dev_get_from_board_minor() This function is only called by comedi_dev_get_from_minor() and the 'minor' value will always be < COMEDI_NUM_BOARD_MINORS. Remove the unnecessary BUG_ON(). 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>
2015-08-14staging: comedi: comedi_fops: remove BUG_ON() in comedi_free_subdevice_minor()H Hartley Sweeten1-4/+2
Drivers should not crash the kernel. This function is only called by comedi_device_detach_cleanup() and the s->minor will always be valid or the device wouldn't have attached in the first place. Leave the checks for safety in accessing the comedi_subdevice_minor_table array but remove the BUG_ON() calls. 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>
2015-08-14staging: comedi: comedi_fops: remove BUG_ON() in comedi_cleanup()H Hartley Sweeten1-7/+0
The BUG_ON() checks in this function are not necessary. comedi_cleanup_board_minors() clears all the entries in the comedi_board_minor_table array and will call comedi_device_cleanup() for all attached devices. comedi_device_cleanup() will then clear the entries in the comedi_subdevice_minor_table array with comedi_free_subdevice_minor(). Remove the BUG_ON(), drivers should not crash the kernel. 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>
2015-08-14staging: comedi: comedi_fops: remove remaining BUG_ON() checksH Hartley Sweeten1-2/+0
The BUG_ON() checks in comedi_subdevice_from_minor() and comedi_dev_get_from_subdevice_minor() are not necessary. The 'minor' numbers for a given comedi driver are setup by comedi_dev_get_from_subdevice_minor() and will always be in the correct range. Drivers should not crash the kernel, remove the BUG_ON() checks. 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>
2015-08-14staging: comedi: hwdrv_apci1564: remove magic numbers in ↵H Hartley Sweeten2-4/+5
apci1564_counter_insn_read() Use the bit defines from addi_tcw.h to remove the magic numbers in this function. Add the missing define for ADDI_TCW_STATUS_HARDWARE_TRIG. 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>
2015-08-14staging: comedi: hwdrv_apci1564: tidy up apci1564_counter_insn_write()H Hartley Sweeten1-2/+1
Clear the gate and trig bits in the common code path. 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>
2015-08-14staging: comedi: hwdrv_apci1564: fix counter "mode" settingH Hartley Sweeten1-1/+1
According to the (broken) original driver, data[4] passed to this function is the "timer mode". It appears the original code used the wrong shift to set the bits. Use the ADDI_TCW_CTRL_MODE() macro so that the correct bits get set. 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>
2015-08-14staging: comedi: hwdrv_apci1564: remove useless code in ↵H Hartley Sweeten1-6/+5
apci1564_counter_insn_config() The gate, trig, and ena, bits in the 'ctrl' are cleared at the start of the function. There is no reason clear these bits for each step. 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>
2015-08-14staging: comedi: hwdrv_apci1564: remove magic number in ↵H Hartley Sweeten1-1/+2
apci1564_timer_insn_read() Use the bit define from addi_tcw.h to remove the magic number. 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>
2015-08-14staging: comedi: hwdrv_apci1564: tidy up apci1564_timer_insn_write()H Hartley Sweeten1-3/+2
Clear the gate and trig bits in the common code path. 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>
2015-08-14staging: comedi: hwdrv_apci1564: use addi_tcw.h definesH Hartley Sweeten2-35/+45
Use the ADDI_TCW_CTRL_REG bit defines in addi_tcw.h to remove the "magic" numbers. Add some missing bit defines and mask defines to addi_tcw.h to help cleanup the code. 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>
2015-08-14staging: comedi: addi_apci_1564: tidy up APCI1564_EEPROM_REG bit definesH Hartley Sweeten1-5/+5
Use the BIT() macro to define the bits. 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>
2015-08-14staging: comedi: addi_apci_1564: define the APCI1564_DI_IRQ_REG bitsH Hartley Sweeten2-18/+10
Define the bits in this register. Remove the old defines in hwdrv_apci1564.c. 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>
2015-08-14staging: comedi: addi_apci_1564: define the APCI1564_DO_IRQ_REG bitsH Hartley Sweeten1-0/+1
Define the bits in this register. 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>
2015-08-14staging: comedi: addi_apci_1564: define the APCI1564_DO_INT_STATUS_REG bitsH Hartley Sweeten1-0/+2
Define the bits in this register. 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>
2015-08-14staging: comedi: addi_apci_1564: define the APCI1564_DO_INT_CTRL_REG bitsH Hartley Sweeten2-6/+2
Define the bits in this register. Remove the old defines in hwdrv_apci1564.c. 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>
2015-08-14staging: comedi: hwdrv_apci1564: remove unused definesH Hartley Sweeten1-5/+0
These defines are not used. Remove them. 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>
2015-08-14staging: comedi: addi_tcw.h: prefer using the BIT macroH Hartley Sweeten1-24/+24
Use the BIT macro to define the register bits. 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>
2015-08-14staging: comedi: serial2002: Use monotonic clockAbhilash Jindal1-5/+5
Wall time obtained from do_gettimeofday is susceptible to sudden jumps due to user setting the time or due to NTP. Monotonic time is constantly increasing time better suited for comparing two timestamps. Signed-off-by: Abhilash Jindal <klock.android@gmail.com> 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>
2015-08-14staging: comedi: ni_usb6501: fix possible out-of-bounds accessH Hartley Sweeten1-16/+11
Coverity reports a possible Out-of-bounds access (ARRAY_VS_SINGLETON) with the 'const u8 *port' parameter passed to ni6501_port_command(). This param is an actual array for the SET_PORT_DIR operation, called by ni6501_dio_insn_config(). But for the WRITE_PORT and READ_PORT operations, called by ni6501_dio_insn_bits(), it is just the address of an u8 local variable. Fix the coverity issue by changing the parameter to an unsigned int and pass the raw values from ni6501_dio_insn_config() and ni6501_dio_insn_bits(). ni6501_port_command() then handles the masking and shifting needed to load the value into the u8 transmit buffer. For consistency, change the access of the 'bitmap' parameter from an array access to a pointer operation. Reported-by: coverity (CID 1248624) 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>
2015-08-10arch, drivers: don't include <asm/io.h> directly, use <linux/io.h> insteadDan Williams1-0/+1
Preparation for uniform definition of ioremap, ioremap_wc, ioremap_wt, and ioremap_cache, tree-wide. Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2015-08-10Merge 4.2-rc6 into staging-nextGreg Kroah-Hartman1-0/+1
We want the IIO and staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07staging: comedi: me4000: update MODULE_DESCRIPTIONH Hartley Sweeten1-1/+1
Change the MODULE_DESCRIPTION to something more useful than "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>
2015-08-07staging: comedi: me4000: updata driver status in comedi commentH Hartley Sweeten1-4/+2
Firmware loading was fixed by: Commit: ac584af5 "staging: comedi: me4000: fix firmware downloading" Change the driver status to "untested" and remove the comments about the driver being broken, 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>
2015-08-07staging: comedi: me4000: cleanup multi-line commentsH Hartley Sweeten1-37/+37
Format the multi-line comments in the kernel 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>
2015-08-07staging: comedi: me4000: usleep_range is preferred over udelayH Hartley Sweeten1-3/+3
Fix checkpatch issue: "CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt". `udelay()` is only used in the firmware upload process. Replace them with `usleep_range()` with a reasonable upper limit. 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>
2015-08-07staging: comedi: me4000: introduce me4000_ai_get_sample()H Hartley Sweeten1-10/+13
The hardware returns two's complement values for the analog input samples. These need to be converted to the unsigned binary format that the comedi core expects. Introduce a helper function to handle this. 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>
2015-08-07staging: comedi: me4000: comedi_handle_events() will stop conversionsH Hartley Sweeten1-47/+7
The irq handler does not need to manually stop conversions and disable interrupts when "end-of-acquisition", "error", or "overflow" events are detected. The comedi_handle_events() will call the subdevice (*cancel) when these are detected and stop the acquisition. 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>
2015-08-07staging: comedi: me4000: tidy up analog output subdevice initH Hartley Sweeten1-12/+8
For aesthetics, add some white space to the analog output subdevice initialization. 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>
2015-08-07staging: comedi: me4000: fix me4000_detach()H Hartley Sweeten1-2/+6
There is no real reason to reset the board when detaching. The comedi core will ensure that any commands are canceled before the detach. But the PLX interrupts should be disabled. 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>