Commit Graph

322830 Commits

Author SHA1 Message Date
Lars-Peter Clausen 7b123c85bb staging:iio:adc: Add AD7791 driver
This patch adds support for the Analog Devices AD7787, AD7788, AD7789, AD7790
and AD7791 Sigma Delta Analog-to-Digital converters.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-08 10:20:09 +01:00
Lars-Peter Clausen bf83238019 iio:ad5446: Add device ids for ad5301/ad5311/ad5321
The ad5301/ad5311/ad5321 are software compatible to the ad5602/ad5612/ad5622.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-08 10:14:46 +01:00
Lars-Peter Clausen 2fafbce250 iio:ad5446: Add support for the ad5300/ad5310/ad5320
The ad5300/ad5310/ad5320 is a family of single channel DACs with a SPI interface
similar to the ad5601/ad5611/ad5621 but use a different shift factor for the
data word.

While we are at it also reorder the device part numbers in the ad5446 driver
Kconfig to be ordered alphabetically.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-08 10:14:45 +01:00
Lars-Peter Clausen ce56ade6ae iio: Drop timestamp parameter from buffer store_to callback
Drop timestamp parameter from buffer store_to callback and subsequently from
iio_push_to_buffer. The timestamp parameter is unused and it seems likely that
it will stay unused in the future, so it should be safe to remove it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-08 10:14:34 +01:00
DanielC 6aa2039d81 Staging: silicom: C99 cleanup of libbp_sd.h
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:15:10 -07:00
DanielC 4bf8a6c0ed Staging: silicom: C99 cleanup of bypass.h
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:15:10 -07:00
DanielC 8b22b0b26f Staging: silicom: C99 cleanup of bp_ioctl.h
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:15:10 -07:00
DanielC 7040e556c9 staging: add Silicom Bypass driver
The Silicom Bypass Network Interface Cards (NICs) are network cards with
paired ports (2 or 4).  The pairs either act as a "wire" allowing the
network packets to pass or insert the device in between the two ports.
When paired with the on-board hardware watchdog or other failsafe, they
provide high availability for the network in the face of software
outages or maintenance.

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:12:43 -07:00
Devendra Naga 960cf81187 staging: vt6655: vt6655_init_info function must be void type
this is because it doesn't fail anywhere and returning a value
from it will be completely unnecesary.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:07:37 -07:00
Devendra Naga cfd1fc1f5f staging: vt6655: return ENOMEM rather than ENODEV when alloc_etherdev fail
when alloc_etherdev fails we should be returning ENOMEM, not ENODEV

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:07:37 -07:00
Devendra Naga 502eb5369f staging: vt6655: fix coding style problem at assigning netdev_ops
we are using spaces at the beginning of the line, we should use
tabs instead

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:07:37 -07:00
Devendra Naga bf76ebd9cf staging: vt6655: fix coding style issues in device_get_options
a) put the device_get_options functions' opening brace below
b) replace spaces with tabs

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:07:37 -07:00
Devendra Naga 3ac9e0fd2a staging: vt6655: fix coding style warnings
a) replace spaces with tabs
b) put the opening brace of get_chip_name below it

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:07:37 -07:00
Dan Magenheimer 7892e560d4 staging: ramster: fix build warnings
Fix build warnings resulting from in-progress work that was
not entirely ifdef'd out.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:05:03 -07:00
Stephen Hemminger 2065945540 staging: tpci200: fix section mismatch warning
PCI probe routines have to be named _probe to avoid section mismatch warning.
Found when doing 'make allmodconfig'

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:02:20 -07:00
Wei Yongjun e89a3370b0 staging: tidspbridge: move the dereference below the NULL test
The dereference should be moved below the NULL test.

spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:02:20 -07:00
H Hartley Sweeten 5da80ee8d8 staging: comedi: me4000: convert printk's to dev_printk's
A lot of the messages produced by this driver are just noise and
need to be removed. For now just convert them all to dev_printk's.

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>
2012-09-07 21:54:43 -07:00
H Hartley Sweeten 81dd181161 staging: comedi: me4000: remove me4000.h
Move the remaining defines in this header to the c file. Nothing
in the header is needed by any other file.

While moving the defines, reorder them so that the bit defines
are associated with the register they go with. Also, convert the
bit defines to bit shifts to make them a bit clearer.

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>
2012-09-07 21:54:43 -07:00
H Hartley Sweeten cc6f3336fa staging: comedi: me4000: move struct me4000_info definition
Move the struct me4000_info definition from the header to the c
file. This struct is not used by any other file.

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>
2012-09-07 21:54:43 -07:00
H Hartley Sweeten 523c5d8e69 staging: comedi: me4000: remove ME4000_CNT_* defines
Since this driver is using the 8253.h helpers, these defines are
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>
2012-09-07 21:54:43 -07:00
H Hartley Sweeten 83eef17c78 staging: comedi: me4000: cleanup me4000_cnt_insn_config()
Absorb the cnt_reset and cnt_config helper functions. They are
now both just single line routines.

Remove the printk noise about "Invalid instruction length".

Fix the return value, the value should be the number of data values
used to perform the instruction. The GPCT_RESET instruction only
has one parameter.

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>
2012-09-07 21:54:43 -07:00
H Hartley Sweeten db9132e030 staging: comedi: me4000: use the 8253 helper functions
The counter subdevice of this board is a standard 8254 compatible
counter/timer. Instead of open-coding the 8254 timer io, use the
helper functions provided by 8253.h.

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>
2012-09-07 21:54:43 -07:00
H Hartley Sweeten 2f348ecd2b staging: comedi: me4000: add namespace to reset_board()
Rename reset_board() to me4000_reset() so it has namespace associated
with this driver. Change it's return type to void, it always succeeds.

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>
2012-09-07 21:54:43 -07:00
H Hartley Sweeten b179748d21 staging: comedi: me4000: fix the interrupt request/free
Only set the dev->irq when the request_irq is successful.
Use the dev->board_name for the name passed to request_irq.
Change the printk messages into dev_warn().
Make sure free_irq is called in the detach.

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>
2012-09-07 21:54:42 -07:00
H Hartley Sweeten 39780a1caf staging: comedi: me4000: combine the checks for valid io addresses
Combine the sanity checks for valid io addresses into one if().

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>
2012-09-07 21:54:42 -07:00
H Hartley Sweeten fe531d12ac staging: comedi: me4000: remove program_regbase from private data
The program_regbase variable in the private data is only used
when the board is first attached. This variable holds the pci
base address used to read/write the xilinx part to upload the
firmware.

Use a local variable in the xilinx_download() function to hold
this address and remove program_regbase 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>
2012-09-07 21:54:42 -07:00
H Hartley Sweeten 5f8f8d4350 staging: comedi: me4000: 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>
2012-09-07 21:53:01 -07:00
H Hartley Sweeten ba5cb4ba57 staging: comedi: me4000: cleanup me4000_probe()
Move the non pci probe related code out of the me4000_probe function
and back into the me4000_attach function in preparation of converting
this driver to the 'attach_pci' callback.

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>
2012-09-07 21:53:01 -07:00
H Hartley Sweeten f4c772f0c3 staging: comedi: me4000: store the pci_dev in the comedi_device
Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in 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>
2012-09-07 21:53:01 -07:00
H Hartley Sweeten 4b2f15f138 staging: comedi: me4000: remove forward declarations
Move some of the functions to avoid the need for the forward
declarations.

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>
2012-09-07 21:53:01 -07:00
H Hartley Sweeten 4683f9f801 staging: comedi: me4000: remove me4000_ao_range
Use range_bipolar10, which is exported by the comedi core, instead
of creating a local symbol for an identical range.

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>
2012-09-07 21:53:01 -07:00
H Hartley Sweeten 09253b396d staging: comedi: me4000: remove info 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>
2012-09-07 21:53:01 -07:00
H Hartley Sweeten b3ca977f08 staging: comedi: me4000: absorb init_board_info() into its caller
The init_board_info() function only gets the irq number from the
pci_dev. Just move the code into the function that calls 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>
2012-09-07 21:53:01 -07:00
H Hartley Sweeten 109daa7980 staging: comedi: me4000: use dev->irq to save the irq number
Use the irq variable provided in the comedi_device to save the
irq number and remove it 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>
2012-09-07 21:53:01 -07:00
H Hartley Sweeten e1d7ccb770 staging: comedi: me4000: remove ao context
The ao context is a struct containing all the register addresses
used with the ao subdevice. These can easily be calculated when
needed. Remove the me4000_ao_context struct, its initialization
function, and it's variable in the private data.

The last value written to the ao channels still needs to be saved
in the private data 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>
2012-09-07 21:53:00 -07:00
H Hartley Sweeten cfb2cb167a staging: comedi: me4000: remove {vendor, device}_id from the private data
These values are never used. Just 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>
2012-09-07 21:53:00 -07:00
H Hartley Sweeten 395d6d0f23 staging: comedi: me4000: remove hw_revision from the private data
This value is read from the pci config space but it is never used.
Just 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>
2012-09-07 21:49:57 -07:00
H Hartley Sweeten c1db9a3090 staging: comedi: me4000: remove serial_no from the private data
This value is read from the pci config space but it is never used.
Just 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>
2012-09-07 21:49:57 -07:00
H Hartley Sweeten b08bfa38c0 staging: comedi: me4000: remove ai context
The ai context is a struct containing all the register addresses
used with the ai subdevice. These can easily be calculated when
needed. Remove the me4000_ai_context struct, its intialization
function, and it's variable in 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>
2012-09-07 21:49:57 -07:00
H Hartley Sweeten da755d1529 staging: comedi: me4000: remove dio context
The dio context is a struct containing all the register addresses
used with the dio subdevice. These can easily be calculated when
needed. Remove the me4000_dio_context struct, its intialization
function, and it's variable in 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>
2012-09-07 21:49:57 -07:00
H Hartley Sweeten 362bcbdee8 staging: comedi: me4000: use dev->iobase for the card base address
Use the iobase variable provided in the comedi_device for the
main base address used in the driver. Remove the me4000_regbase
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>
2012-09-07 21:49:57 -07:00
H Hartley Sweeten 2cb847b2a9 staging: comedi: me4000: remove the noise when probing the card
The me4000_probe() function has a bunch of error messages that
are displayed when various parts of the probe fail. These are
just added noise. 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>
2012-09-07 21:49:57 -07:00
H Hartley Sweeten d5cd01fee1 staging: comedi: me4000: absorb get_registers() into its caller
The get_registers() function reads the pci base addresses used
in the driver. It's simple enough, just move the code into the
function that calls 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>
2012-09-07 21:49:56 -07:00
H Hartley Sweeten 9c943f4ed4 staging: comedi: me4000: remove the pci resource error messages
Remove the error messages about the pci base address not being
available. They are just noise.

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>
2012-09-07 21:49:56 -07:00
H Hartley Sweeten 0818dc0a35 staging: comedi: me4000: don't save the pci resource sizes
There is no need to get the resource size for each pci bar. Nothing
in the driver uses 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>
2012-09-07 21:49:56 -07:00
H Hartley Sweeten ba98ab03f7 staging: comedi: me4000: remove struct me4000_cnt_context
The me4000_cnt_contect simply holds the unsigned long i/o addresses
used to read/write the counter registers. Thes can be calculated
as needed. Remove the struct and the associated field in 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>
2012-09-07 21:49:56 -07:00
H Hartley Sweeten 9e07273124 staging: comedi: me4000: move pci vendor/device ids to source
Move the pci vendor/device ids from the header to the c file and
actually use 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>
2012-09-07 21:45:27 -07:00
H Hartley Sweeten 06b60981aa staging: comedi: me4000: move struct me4000_board definition
Move the struct me4000_board definition from the header to the c file.
It's not used by any other source.

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>
2012-09-07 21:45:27 -07:00
H Hartley Sweeten 8407593ac3 staging: comedi: me4000: remove thisboard macro
This macro relies on a local variable having a specific name.
Remove it and use the comedi_board() helper to get the pointer.

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>
2012-09-07 21:45:27 -07:00
H Hartley Sweeten 2d504528f2 staging: comedi: me4000: remove struct me4000_ao_info
The me4000_ao_info in the boardinfo struct is used to indicate
the number of analog output channels and a couple other details
about them. Remove the extra struct and absorb the data into the
boardinfo struct.

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>
2012-09-07 21:45:27 -07:00