GitHub/MotorolaMobilityLLC/kernel-slsi.git
11 years agoMerge tag 'iio-for-3.13c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Sun, 6 Oct 2013 19:39:52 +0000 (12:39 -0700)]
Merge tag 'iio-for-3.13c' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Third set of new functionality and cleanups for IIO in the 3.13 cycle.

Driver New Functionality
* MXS - new interrupt driven touch screen support for i.MX23/28. Old
  polled implementation dropped.

Driver Cleanups
* Some spi_sync boilerplate dropped by using spi_sync_transfer
* Some switching of drivers to the fractional type for scale reading.
  Moves the ugly calculation into one place.
* Fix the documentation for *_voltage_scale which is never been correct
  or as implemented in any driver.
* HID sensor hub and children : Open the sensor hub only when someone cares.
* hmc5843 - various minor

11 years agosep: Convert sep_lock_user_pages() to get_user_pages_fast()
Jan Kara [Wed, 2 Oct 2013 14:27:52 +0000 (16:27 +0200)]
sep: Convert sep_lock_user_pages() to get_user_pages_fast()

CC: Mark Allyn <mark.a.allyn@intel.com>
CC: Jayant Mangalampalli <jayant.mangalampalli@intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoced1401: Convert driver to use get_user_pages_fast()
Jan Kara [Wed, 2 Oct 2013 14:27:49 +0000 (16:27 +0200)]
ced1401: Convert driver to use get_user_pages_fast()

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agolustre: Convert ll_get_user_pages() to use get_user_pages_fast()
Jan Kara [Wed, 2 Oct 2013 14:27:51 +0000 (16:27 +0200)]
lustre: Convert ll_get_user_pages() to use get_user_pages_fast()

CC: Peng Tao <tao.peng@emc.com>
Acked-by: Andreas Dilger <andreas.dilger@intel.com>
CC: hpdd-discuss@lists.01.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: xillybus: remove redundant Kconfig dependency
Baruch Siach [Fri, 4 Oct 2013 07:52:41 +0000 (10:52 +0300)]
staging: xillybus: remove redundant Kconfig dependency

XILLYBUS_PCIE and XILLYBUS_OF are inside 'if XILLYBUS' already, so there is not
need to depend on XILLYBUS.

Cc: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgnc: changes arguments in sizeof
Lidza Louina [Fri, 4 Oct 2013 16:18:30 +0000 (12:18 -0400)]
staging: dgnc: changes arguments in sizeof

The arguments that were passed into sizeof were
generic. This patch changes this by putting
the actual item that we need a size of instead.

For example:
-   kzalloc(sizeof(struct dgnc_board), GFP_KERNEL);
+   kzalloc(sizeof(*brd), GFP_KERNEL);

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging:iio:ad9951: Use spi_sync_transfer()
Lars-Peter Clausen [Sat, 5 Oct 2013 07:45:00 +0000 (08:45 +0100)]
staging:iio:ad9951: Use spi_sync_transfer()

Use the spi_sync_transfer() helper function instead of open-coding it. Makes the
code a bit shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ad9910: Use spi_sync_transfer()
Lars-Peter Clausen [Sat, 5 Oct 2013 07:45:00 +0000 (08:45 +0100)]
staging:iio:ad9910: Use spi_sync_transfer()

Use the spi_sync_transfer() helper function instead of open-coding it. Makes
the code a bit shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ad9852: Use spi_sync_transfer()
Lars-Peter Clausen [Sat, 5 Oct 2013 07:45:00 +0000 (08:45 +0100)]
staging:iio:ad9852: Use spi_sync_transfer()

Use the spi_sync_transfer() helper function instead of open-coding it. Makes
the code a bit shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16220: Use spi_sync_transfer()
Lars-Peter Clausen [Sat, 5 Oct 2013 07:45:00 +0000 (08:45 +0100)]
staging:iio:adis16220: Use spi_sync_transfer()

Use the spi_sync_transfer() helper function instead of open-coding it. Makes
the code a bit shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:adis16130: Use spi_sync_transfer()
Lars-Peter Clausen [Sat, 5 Oct 2013 07:45:00 +0000 (08:45 +0100)]
iio:adis16130: Use spi_sync_transfer()

Use the spi_sync_transfer() helper function instead of open-coding it. Makes
the code a bit shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:adxrs450: Use spi_sync_transfer()
Lars-Peter Clausen [Sat, 5 Oct 2013 07:45:00 +0000 (08:45 +0100)]
iio:adxrs450: Use spi_sync_transfer()

Use the spi_sync_transfer() helper function instead of open-coding it. Makes
the code a bit shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:adis16080: Use spi_sync_transfer()
Lars-Peter Clausen [Sat, 5 Oct 2013 07:45:00 +0000 (08:45 +0100)]
iio:adis16080: Use spi_sync_transfer()

Use the spi_sync_transfer() helper function instead of open-coding it. Makes
the code a bit shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:ad5449: Use spi_sync_transfer()
Lars-Peter Clausen [Sat, 5 Oct 2013 07:45:00 +0000 (08:45 +0100)]
iio:ad5449: Use spi_sync_transfer()

Use the spi_sync_transfer() helper function instead of open-coding it. Makes
the code a bit shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging: comedi: ni_6527: change MODULE_DESCRIPTION
H Hartley Sweeten [Tue, 1 Oct 2013 22:15:21 +0000 (15:15 -0700)]
staging: comedi: ni_6527: change MODULE_DESCRIPTION

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>
11 years agostaging: comedi: ni_6527: tidy up multi-line comments
H Hartley Sweeten [Tue, 1 Oct 2013 22:15:03 +0000 (15:15 -0700)]
staging: comedi: ni_6527: tidy up multi-line comments

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>
11 years agostaging: comedi: ni_6527: tidy up the comedi_driver declaration
H Hartley Sweeten [Tue, 1 Oct 2013 22:14:46 +0000 (15:14 -0700)]
staging: comedi: ni_6527: tidy up the comedi_driver declaration

For aesthetics, add some whitespace.

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>
11 years agostaging: comedi: ni_6527: tidy up ni6527_auto_attach()
H Hartley Sweeten [Tue, 1 Oct 2013 22:14:27 +0000 (15:14 -0700)]
staging: comedi: ni_6527: tidy up ni6527_auto_attach()

For aesthetics, allocate the private data memory before attempting
to enable the PCI device.

Add some whitespace to the subdevice init.

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>
11 years agostaging: comedi: ni_6527: tidy up the interrupt subdevice
H Hartley Sweeten [Tue, 1 Oct 2013 22:14:07 +0000 (15:14 -0700)]
staging: comedi: ni_6527: tidy up the interrupt subdevice

Do the request_irq() before setting up the subdevices. Only initialize
the interrupt subdevice if the irq is actually available.

Tidy up the whitespace in the subdevice init.

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>
11 years agostaging: comedi: ni_6527: introduce ni6527_reset()
H Hartley Sweeten [Tue, 1 Oct 2013 22:13:48 +0000 (15:13 -0700)]
staging: comedi: ni_6527: introduce ni6527_reset()

Factor the board reset code out of the (*attach). Do the reset as
soon as possible to ensure the interrupts are disabled.

For convienence, use the ni6257_reset() during the (*detach) instead
of just disabling the interrupts.

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>
11 years agostaging: comedi: ni_6527: remove COMEDI_MITE dependancy
H Hartley Sweeten [Tue, 1 Oct 2013 22:13:32 +0000 (15:13 -0700)]
staging: comedi: ni_6527: remove COMEDI_MITE dependancy

The COMEDI_MITE driver is a wrapper for the National Instruments
PCI MITE ASIC. This driver includes the PCI boilerplate used to
remap the resources as well as the support code for bus mastered
DMA.

The ni_6527 does not support DMA and the COMEDI_MITE driver adds
unnecessary complexity.

Remove the need for the COMEDI_MITE driver by handling the ioremap
directly in the (*attach). Store the ioremap'ed address in 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>
11 years agostaging: comedi: ni_6527: tidy up ni6527_intr_insn_config()
H Hartley Sweeten [Tue, 1 Oct 2013 22:13:14 +0000 (15:13 -0700)]
staging: comedi: ni_6527: tidy up ni6527_intr_insn_config()

Handle the instruction (data[0]) with a switch to make it easier
to add additional instructions in the future.

To clarify the code, factor out the code that sets the rising/falling
edge detection.

Rename the CamelCase defines used for the rising/falling edge detection
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>
11 years agostaging: comedi: ni_6527: tidy up ni6527_intr_cancel()
H Hartley Sweeten [Tue, 1 Oct 2013 22:12:55 +0000 (15:12 -0700)]
staging: comedi: ni_6527: tidy up ni6527_intr_cancel()

For aesthetics, use a local variable for the __iomem base address
used to write to 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>
11 years agostaging: comedi: ni_6527: tidy up ni6527_intr_cmd()
H Hartley Sweeten [Tue, 1 Oct 2013 22:12:35 +0000 (15:12 -0700)]
staging: comedi: ni_6527: tidy up ni6527_intr_cmd()

For aesthetics, use a local variable for the __iomem base address
used to write to 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>
11 years agostaging: comedi: ni_6527: rename CamelCase defines for the control register
H Hartley Sweeten [Tue, 1 Oct 2013 22:12:19 +0000 (15:12 -0700)]
staging: comedi: ni_6527: rename CamelCase defines for the control register

Rename the CamelCase defines used for the interrupt control register.

To clarify the code a bit, add two new defines to enable/disable the
interrupts.

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>
11 years agostaging: comedi: ni_6527: rename CamelCase defines for the clear register
H Hartley Sweeten [Tue, 1 Oct 2013 22:11:58 +0000 (15:11 -0700)]
staging: comedi: ni_6527: rename CamelCase defines for the clear register

Rename the CamelCase defines used for the clear register.

To clarify the code a bit, add two new defines that group the bits needed
to clear the interrupts and reset the digital input deglitch filter.

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>
11 years agostaging: comedi: ni_6527: tidy up ni6527_interrupt()
H Hartley Sweeten [Tue, 1 Oct 2013 22:11:39 +0000 (15:11 -0700)]
staging: comedi: ni_6527: tidy up ni6527_interrupt()

Rename the CamelCase defines used for the interrupt status register.

The NI6527_STATUS_IRQ bit will be set whenever the device is asserting
an interrupt. Modify the function a bit so this is the only requirement
for the interrupt to be IRQ_HANDLED. Currently an OVERFLOW interrupt is
not handled, though it's unlikely this would occur without an EDGE
interrupt.

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>
11 years agostaging: comedi: ni_6527: use dev->read_subdev in interrupt handler
H Hartley Sweeten [Tue, 1 Oct 2013 22:11:21 +0000 (15:11 -0700)]
staging: comedi: ni_6527: use dev->read_subdev in interrupt handler

The comedi_subdevice in the interrupt handler is the dev->read_subdev
that was initialized during the attach. Use that instead of accessing
the dev->subdevices[] array directly.

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>
11 years agostaging: comedi: ni_6527: tidy up ni6527_{di, do}_insn_bits()
H Hartley Sweeten [Tue, 1 Oct 2013 22:11:00 +0000 (15:11 -0700)]
staging: comedi: ni_6527: tidy up ni6527_{di, do}_insn_bits()

The digital input and output ports are different. Split the CamelCase
Port_Register() define into separate NI6527_DI_REG() and NI6527_DO_REG()
defines to make this clear.

Tidy up the functions 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>
11 years agostaging: comedi: ni_6527: tidy up ni6527_di_insn_config()
H Hartley Sweeten [Tue, 1 Oct 2013 22:10:41 +0000 (15:10 -0700)]
staging: comedi: ni_6527: tidy up ni6527_di_insn_config()

The core will validate the insn->n value based on the actual instruction
(data[0]) that is being handled. Remove the sanity check and change the
instruction handling into a switch. This follows the normal format for
(*insn_config) functions and make adding additional instructions easier.

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>
11 years agostaging: comedi: ni_6527: factor out the code that sets the filter enables
H Hartley Sweeten [Tue, 1 Oct 2013 22:10:22 +0000 (15:10 -0700)]
staging: comedi: ni_6527: factor out the code that sets the filter enables

To clarify the digital input subdevice (*insn_config) a bit, factor out the
code that sets the filter enables to enable deglitching the digital inputs.

Also, rename the CamelCase define used for the filter enable 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>
11 years agostaging: comedi: ni_6527: factor out the code that sets the filter interval
H Hartley Sweeten [Tue, 1 Oct 2013 22:09:42 +0000 (15:09 -0700)]
staging: comedi: ni_6527: factor out the code that sets the filter interval

To clarify the digital input subdevice (*insn_config) a bit, factor out the
code that sets the filter interval for deglitching the digital inputs.

Also, rename the CamelCase define used for the filter interval 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>
11 years agostaging: comedi: ni_6527: remove extra probe noise
H Hartley Sweeten [Tue, 1 Oct 2013 22:09:16 +0000 (15:09 -0700)]
staging: comedi: ni_6527: remove extra probe noise

The dev_info() showing the board id is just extra noise.

Remove it but make sure the probed id is correct. Rename the CamelCase
define used for the id 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>
11 years agostaging: comedi: ni_6527: remove unused DEBUG* defines
H Hartley Sweeten [Tue, 1 Oct 2013 22:08:58 +0000 (15:08 -0700)]
staging: comedi: ni_6527: remove unused DEBUG* defines

These defines are not used in the driver. 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>
11 years agostaging: comedi: ni_6527: remove unused NI6527_*_SIZE defines
H Hartley Sweeten [Tue, 1 Oct 2013 22:08:40 +0000 (15:08 -0700)]
staging: comedi: ni_6527: remove unused NI6527_*_SIZE defines

These defines are not used in the driver. 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>
11 years agostaging: comedi: ni_6527: remove DRIVER_NAME define
H Hartley Sweeten [Tue, 1 Oct 2013 22:08:10 +0000 (15:08 -0700)]
staging: comedi: ni_6527: remove DRIVER_NAME define

The request_irq() call should be using dev->board_name to better
identify the irq user.

Remove the DRIVER_NAME define and just open code the 'driver_name' in
the comedi_driver and the 'name' in the pci_driver declarations.

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>
11 years agostaging: comedi: ni_at_ao: fix board names
H Hartley Sweeten [Tue, 1 Oct 2013 00:55:33 +0000 (17:55 -0700)]
staging: comedi: ni_at_ao: fix board names

This driver works with "at-ao-6/10" boards not "ai-ao-6/10" boards.
Fix the names in 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>
11 years agostaging: comedi: ni_at_ao: change MODULE_DESCRIPTION
H Hartley Sweeten [Tue, 1 Oct 2013 00:55:14 +0000 (17:55 -0700)]
staging: comedi: ni_at_ao: change MODULE_DESCRIPTION

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>
11 years agostaging: comedi: ni_at_ao: tidy up multi-line comments
H Hartley Sweeten [Tue, 1 Oct 2013 00:54:58 +0000 (17:54 -0700)]
staging: comedi: ni_at_ao: tidy up multi-line comments

Cleanup 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>
11 years agostaging: comedi: ni_at_ao: tidy up atao_attach()
H Hartley Sweeten [Tue, 1 Oct 2013 00:54:42 +0000 (17:54 -0700)]
staging: comedi: ni_at_ao: tidy up atao_attach()

For aesthetics, add some whitespace to the subdevice init.

Remove the printk noise at the end of the attach.

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>
11 years agostaging: comedi: ni_at_ao: tidy up atao_ao_rinsn()
H Hartley Sweeten [Tue, 1 Oct 2013 00:54:25 +0000 (17:54 -0700)]
staging: comedi: ni_at_ao: tidy up atao_ao_rinsn()

For aesthetics, rename this function to help with greps.

Tidy up this function to follow the normal format for analog
output read back functions.

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>
11 years agostaging: comedi: ni_at_ao: tidy up atao_ao_winsn()
H Hartley Sweeten [Tue, 1 Oct 2013 00:54:08 +0000 (17:54 -0700)]
staging: comedi: ni_at_ao: tidy up atao_ao_winsn()

For aesthetics, rename this function to help with greps.

For channel 0, register group 1 only needs to be selected before
writing the values and restored to group 0 when the writes are
finished. Move the code out of the for () loop.

Use the comedi_ffset_munge() helper to handle the offset binary to
two's complement munging.

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>
11 years agostaging: comedi: ni_at_ao: introduce atao_select_reg_group()
H Hartley Sweeten [Tue, 1 Oct 2013 00:53:50 +0000 (17:53 -0700)]
staging: comedi: ni_at_ao: introduce atao_select_reg_group()

To clarify the code a bit, introduce a helper function to set/clear
the GRP2WR bit in the CFG1 register. This bit selects which group of
registers are used for the registers that share the same I/O addresses.

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>
11 years agostaging: comedi: ni_at_ao: move the atao_reset() function
H Hartley Sweeten [Tue, 1 Oct 2013 00:53:31 +0000 (17:53 -0700)]
staging: comedi: ni_at_ao: move the atao_reset() function

For aesthetics, move this function closer to it's only caller.

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>
11 years agostaging: comedi: ni_at_ao: move the boardinfo declaration
H Hartley Sweeten [Tue, 1 Oct 2013 00:53:11 +0000 (17:53 -0700)]
staging: comedi: ni_at_ao: move the boardinfo declaration

For aesthetics, move the boardinfo declaration closer to the struct
definition. Also, remove the cut-and-paste skel driver comment.

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>
11 years agostaging: comedi: ni_at_ao: rename the rest of the register map
H Hartley Sweeten [Tue, 1 Oct 2013 00:52:53 +0000 (17:52 -0700)]
staging: comedi: ni_at_ao: rename the rest of the register map

For aesthetics, rename the remaining register map defines so they
follow the same format as the ones already renamed.

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>
11 years agostaging: comedi: ni_at_ao: use 8253.h helpers
H Hartley Sweeten [Tue, 1 Oct 2013 00:52:32 +0000 (17:52 -0700)]
staging: comedi: ni_at_ao: use 8253.h helpers

To better document the code, use the 8254.h helpers to set the
timers instead of doing the outb() instructions.

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>
11 years agostaging: comedi: ni_at_ao: tidy up the CFG3 register defines
H Hartley Sweeten [Tue, 1 Oct 2013 00:52:13 +0000 (17:52 -0700)]
staging: comedi: ni_at_ao: tidy up the CFG3 register defines

Rename the defines for the CFG3 register so they have namespace
associated with the 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>
11 years agostaging: comedi: ni_at_ao: tidy up the calibration subdevice
H Hartley Sweeten [Tue, 1 Oct 2013 00:51:54 +0000 (17:51 -0700)]
staging: comedi: ni_at_ao: tidy up the calibration subdevice

The AT-AO-6/10 boards use DAC8800 TrimDACs to software calibrate the
analog output channels. These are exposed to the user as a calibration
subdevice.

Tidy up, and document, the calibration subdevice.

Since the TrimDACs are not readable, store the calibration values in the
private data for the user to read back as needed.

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>
11 years agostaging: comedi: ni_at_ao: remove 'cfg2' from private data
H Hartley Sweeten [Tue, 1 Oct 2013 00:51:35 +0000 (17:51 -0700)]
staging: comedi: ni_at_ao: remove 'cfg2' from private data

This member of the private data is initialized to '0' during the
board reset then never changed. Just 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>
11 years agostaging: comedi: ni_at_ao: tidy up the STATUS register defines
H Hartley Sweeten [Tue, 1 Oct 2013 00:51:16 +0000 (17:51 -0700)]
staging: comedi: ni_at_ao: tidy up the STATUS register defines

Rename the defines for the STATUS register so they have namespace
associated with the 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>
11 years agostaging: comedi: ni_at_ao: tidy up CFG1 register defines
H Hartley Sweeten [Tue, 1 Oct 2013 00:50:49 +0000 (17:50 -0700)]
staging: comedi: ni_at_ao: tidy up CFG1 register defines

Rename the defines for the CFG1 register so they have namespace
associated with the 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>
11 years agostaging: comedi: ni_at_ao: tidy up digital i/o register defines
H Hartley Sweeten [Tue, 1 Oct 2013 00:50:30 +0000 (17:50 -0700)]
staging: comedi: ni_at_ao: tidy up digital i/o register defines

The digital in and digital out registers on this board share the same
address. They also effect the same digital i/o pins. To make this clear
combine the two defines.

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>
11 years agostaging: comedi: ni_at_ao: tidy up the register map defines
H Hartley Sweeten [Tue, 1 Oct 2013 00:50:09 +0000 (17:50 -0700)]
staging: comedi: ni_at_ao: tidy up the register map defines

For aesthetics, sort the register map defines so the normal registers
are listed first and then alternate registers (when the GRP2WR bit is
set).

Convert the register bit defines into bit shifts to make them clear.

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>
11 years agostaging: comedi: ni_at_ao: remove ATAO_SIZE define
H Hartley Sweeten [Tue, 1 Oct 2013 00:49:36 +0000 (17:49 -0700)]
staging: comedi: ni_at_ao: remove ATAO_SIZE define

This define is only used during the board attach to specify the
I/O region length. Remove the define and just open code the value.

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>
11 years agostaging: vt6656: rxtx.c remove dead code s_uFillDataHead/pvTxDataHd.
Malcolm Priestley [Tue, 1 Oct 2013 15:07:25 +0000 (16:07 +0100)]
staging: vt6656: rxtx.c remove dead code s_uFillDataHead/pvTxDataHd.

uFillDataHead in is now dead so remove and pvTxDataHd.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: rxtx.c add no rts struct vnt_tx_datahead_ab
Malcolm Priestley [Tue, 1 Oct 2013 15:03:40 +0000 (16:03 +0100)]
staging: vt6656: rxtx.c add no rts struct vnt_tx_datahead_ab

Add no rts/cts vnt_tx_datahead_ab to union vnt_tx_data_head.

The need_mic now applies to all modes of packet type PK_TYPE_11B.

and return vnt_rxtx_datahead_ab in s_vGenerateTxParameter

This removes pvTxDataHd pointer assignment and calls to s_uFillDataHead.

Since pvTxDataHd is now null a small vendor hack to vDMA0_tx_80211/csMgmt_xmit
to do with Disassociation-packet is also changed correct head position.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: rxtx.c parse out vnt_rxtx_datahead_ab
Malcolm Priestley [Tue, 1 Oct 2013 15:00:20 +0000 (16:00 +0100)]
staging: vt6656: rxtx.c parse out vnt_rxtx_datahead_ab

Parse struct vnt_tx_datahead_ab from s_uFillDataHead and
move to struct vnt_rts_ab structure returning duration down
functions.

Both are returned in s_uFillDataHead at this stage as pvTxDataHd
is only null in s_bPacketToWirelessUsb.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: rxtx.c add no rts struct vnt_tx_datahead_a_fb
Malcolm Priestley [Tue, 1 Oct 2013 14:58:54 +0000 (15:58 +0100)]
staging: vt6656: rxtx.c add no rts struct vnt_tx_datahead_a_fb

Add no rts/cts vnt_tx_datahead_a_fb to union vnt_tx_data_head.

The need_mic now applies to all modes of packet type PK_TYPE_11A.

and return vnt_rxtx_datahead_a_fb in s_vGenerateTxParameter

This removes pvTxDataHd pointer assignment.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: rxtx.c parse out struct vnt_tx_datahead_a_fb
Malcolm Priestley [Tue, 1 Oct 2013 14:56:48 +0000 (15:56 +0100)]
staging: vt6656: rxtx.c parse out struct vnt_tx_datahead_a_fb

Parse struct vnt_tx_datahead_a_fb from s_uFillDataHead and
move to struct vnt_rts_a_fb structure returning duration down
functions.

This removes pvTxDataHd pointer assignment.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: rxtx.c Parse struct vnt_tx_datahead_g_fb
Malcolm Priestley [Tue, 1 Oct 2013 14:54:56 +0000 (15:54 +0100)]
staging: vt6656: rxtx.c Parse struct vnt_tx_datahead_g_fb

Parse struct vnt_tx_datahead_g_fb from s_uFillDataHead and
move to struct vnt_rts_g_fb/struct vnt_cts_fb structure returning
duration down functions.

This removes pvTxDataHd pointer assignment.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: rxtx.c Parse struct vnt_tx_datahead_g
Malcolm Priestley [Tue, 1 Oct 2013 14:52:16 +0000 (15:52 +0100)]
staging: vt6656: rxtx.c Parse struct vnt_tx_datahead_g

Parse struct vnt_tx_datahead_g from s_uFillDataHead and
move to struct vnt_rts_g/struct vnt_cts structure.

This removes pvTxDataHd pointer assignment.

The duration_id(uDuration) field is now returned in s_vGenerateTxParameter.

The return of s_uFillDataHead temporary or'ed to retain functionality of
other functions and is removed at the end of this patch series.

Since pvTxDataHd is now null a small vendor hack to vDMA0_tx_80211/csMgmt_xmit
to do with Disassociation-packet is also changed correct head position.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: rxtx.c change tx functions to return u16
Malcolm Priestley [Tue, 1 Oct 2013 14:50:24 +0000 (15:50 +0100)]
staging: vt6656: rxtx.c change tx functions to return u16

s_vGenerateTxParameter, s_vFillCTSHead, s_vFillRTSHead, vnt_rxtx_rts* functions
to return u16

Initially this is the duration_id field for ieee80211_hdr

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: MTD: Micron SPINAND Driver support
Kamlakant Patel [Tue, 1 Oct 2013 09:33:58 +0000 (15:03 +0530)]
Staging: MTD: Micron SPINAND Driver support

This patch adds support for Micron SPINAND via MTD.

Signed-off-by: Mona Anonuevo <manonuevo@micron.com>
Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: rtl8712: fix spaces before semicolons
Thomas Cort [Tue, 1 Oct 2013 15:26:55 +0000 (11:26 -0400)]
Staging: rtl8712: fix spaces before semicolons

Resolve all of the 'WARNING: space prohibited before semicolon'
checkpatch warnings for rtl8712.

Signed-off-by: Thomas Cort <linuxgeek@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: Make dwc2_hw_params.host_channels large enough
Matthijs Kooijman [Thu, 3 Oct 2013 07:46:25 +0000 (09:46 +0200)]
staging: dwc2: Make dwc2_hw_params.host_channels large enough

The hardware offers a 4-bit register containing the number of host
channels. However, the values of these register mean 1-16 host channels,
not 0-15. Since the dwc2_hw_params struct stores the actual number of
host channels supported instead of the raw register value, it should be
5 bits wide instead of 4.

Before this commit, hardware with 16 host channels would overflow the
field, making it appear as 0 channels.

This bug was introduced in commit 9badec2 (staging: dwc2: interpret all
hwcfg and related register at init time).

Reported-by: Dinh Nguyen <dinguyen@altera.com>
Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: str initialization replaced with NULL where it was initialized...
Shalin Mehta [Thu, 3 Oct 2013 08:08:42 +0000 (01:08 -0700)]
staging: speakup: str initialization replaced with NULL where it was initialized with int

Fixed warnings in all of three files where the string was initilized with an integer instead of NULL

Signed-off-by: Shalin Mehta <shalinmehta85@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: cvmx-usb.h: make comments to fit into 80 columns
Aaro Koskinen [Tue, 1 Oct 2013 20:43:20 +0000 (23:43 +0300)]
staging: octeon-usb: cvmx-usb.h: make comments to fit into 80 columns

Make comments to fit into 80 columns.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: cvmx-usb.c: make comments to fit into 80 columns
Aaro Koskinen [Tue, 1 Oct 2013 20:43:19 +0000 (23:43 +0300)]
staging: octeon-usb: cvmx-usb.c: make comments to fit into 80 columns

Make comments to fit into 80 columns.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: cvmx-usb: delete unused macros
Aaro Koskinen [Tue, 1 Oct 2013 20:43:18 +0000 (23:43 +0300)]
staging: octeon-usb: cvmx-usb: delete unused macros

Delete unused cvmx_read_csr / cvmx_write_csr macros.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: eliminate CVMX_PREFETCH_PREFX
Aaro Koskinen [Tue, 1 Oct 2013 20:43:17 +0000 (23:43 +0300)]
staging: octeon-usb: eliminate CVMX_PREFETCH_PREFX

Eliminate CVMX_PREFETCH_PREFX.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: eliminate CVMX_PREFETCH_PREF0
Aaro Koskinen [Tue, 1 Oct 2013 20:43:16 +0000 (23:43 +0300)]
staging: octeon-usb: eliminate CVMX_PREFETCH_PREF0

Eliminate CVMX_PREFETCH_PREF0.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: delete CVMX_PREFETCH128
Aaro Koskinen [Tue, 1 Oct 2013 20:43:15 +0000 (23:43 +0300)]
staging: octeon-usb: delete CVMX_PREFETCH128

Delete unused macro.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: inline CVMX_PREFETCH0
Aaro Koskinen [Tue, 1 Oct 2013 20:43:14 +0000 (23:43 +0300)]
staging: octeon-usb: inline CVMX_PREFETCH0

Inline CVMX_PREFETCH0 macro.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: replace CVMX_CLZ with __fls()
Aaro Koskinen [Tue, 1 Oct 2013 20:43:13 +0000 (23:43 +0300)]
staging: octeon-usb: replace CVMX_CLZ with __fls()

Replace CVMX_CLZ macro with __fls().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: delete redundant flags from cvmx_usb_open_pipe()
Aaro Koskinen [Tue, 1 Oct 2013 20:43:12 +0000 (23:43 +0300)]
staging: octeon-usb: delete redundant flags from cvmx_usb_open_pipe()

Delete redudant flags parameter.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: delete redundant flags from __cvmx_usb_submit_transaction()
Aaro Koskinen [Tue, 1 Oct 2013 20:43:11 +0000 (23:43 +0300)]
staging: octeon-usb: delete redundant flags from __cvmx_usb_submit_transaction()

Delete redundant flags parameter.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: delete cvmx_usb_isochronous_flags
Aaro Koskinen [Tue, 1 Oct 2013 20:43:10 +0000 (23:43 +0300)]
staging: octeon-usb: delete cvmx_usb_isochronous_flags

Delete unused flags.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: delete redundant flags from cvmx_usb_initialize()
Aaro Koskinen [Tue, 1 Oct 2013 20:43:09 +0000 (23:43 +0300)]
staging: octeon-usb: delete redundant flags from cvmx_usb_initialize()

The function will always figure out the used clock internally, so delete
a redudant parameter and the flag.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: silicom: fix space prohibited before semicolon
Tugce Sirin [Wed, 2 Oct 2013 22:39:57 +0000 (01:39 +0300)]
staging: silicom: fix space prohibited before semicolon

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: nvec: fix space after if statement in nvec.c
Tugce Sirin [Wed, 2 Oct 2013 17:04:31 +0000 (20:04 +0300)]
staging: nvec: fix space after if statement in nvec.c

This patch fixes space after if statement in nvec/nvec.c

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoHID RTC: Open sensor hub open close
Srinivas Pandruvada [Tue, 1 Oct 2013 16:22:00 +0000 (17:22 +0100)]
HID RTC: Open sensor hub open close

Open sensor hub when module is loaded and close when module is removed.
This helps saving power by opening HID transport only when there is an
user.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoStaging/iio: add TODO reminder
Juergen Beisert [Mon, 23 Sep 2013 14:36:00 +0000 (15:36 +0100)]
Staging/iio: add TODO reminder

Some things have still to be done to the LRADC driver.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Acked-by: Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: Jonathan Cameron <jic23@cam.ac.uk>
11 years agoStaging/iio/adc/touchscreen/MXS: provide devicetree adaption
Juergen Beisert [Mon, 23 Sep 2013 14:36:00 +0000 (15:36 +0100)]
Staging/iio/adc/touchscreen/MXS: provide devicetree adaption

This is an RFC for the new touchscreen properties.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: devicetree@vger.kernel.org
11 years agoStaging/iio/adc/touchscreen/MXS: remove old touchscreen detection implementation
Juergen Beisert [Mon, 23 Sep 2013 14:36:00 +0000 (15:36 +0100)]
Staging/iio/adc/touchscreen/MXS: remove old touchscreen detection implementation

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoStaging/iio/adc/touchscreen/MXS: add interrupt driven touch detection
Juergen Beisert [Mon, 23 Sep 2013 14:36:00 +0000 (15:36 +0100)]
Staging/iio/adc/touchscreen/MXS: add interrupt driven touch detection

For battery driven systems it is a very bad idea to collect the touchscreen
data within a kernel busy loop.

This change uses the features of the hardware to delay and accumulate samples in
hardware to avoid a high interrupt and CPU load.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: linux-input@vger.kernel.org
11 years agoStaging/iio/adc/touchscreen/MXS: add i.MX23 support to the LRADC touchscreen driver
Juergen Beisert [Mon, 23 Sep 2013 14:36:00 +0000 (15:36 +0100)]
Staging/iio/adc/touchscreen/MXS: add i.MX23 support to the LRADC touchscreen driver

Distinguish i.MX23 and i.MX28 at runtime and do the same for both SoC at least
for the 4 wire touchscreen.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Teseted-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoStaging/iio/adc/touchscreen/MXS: simplify register access
Juergen Beisert [Mon, 23 Sep 2013 14:36:00 +0000 (15:36 +0100)]
Staging/iio/adc/touchscreen/MXS: simplify register access

Replace the individual register access by a few shared access function to make the
code easier to read and in order to add the i.MX23 SoC in the next step.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoStaging/iio/adc/touchscreen/MXS: separate i.MX28 specific register bits
Juergen Beisert [Mon, 23 Sep 2013 14:36:00 +0000 (15:36 +0100)]
Staging/iio/adc/touchscreen/MXS: separate i.MX28 specific register bits

In order to support i.MX23 and i.MX28 within one driver we need to separate the
register definitions which differ in both SoC variants.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoStaging/iio/adc/touchscreen/MXS: distinguish i.MX23's and i.MX28's LRADC
Juergen Beisert [Mon, 23 Sep 2013 14:36:00 +0000 (15:36 +0100)]
Staging/iio/adc/touchscreen/MXS: distinguish i.MX23's and i.MX28's LRADC

The LRADC units in i.MX23 and i.MX28 differ and we need to distinguish both
SoC variants in order to make the touchscreen work on i.MX23

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: Jonathan Cameron <jic23@cam.ac.uk>
11 years agoStaging/iio/adc/touchscreen/MXS: add proper clock handling
Juergen Beisert [Mon, 23 Sep 2013 14:36:00 +0000 (15:36 +0100)]
Staging/iio/adc/touchscreen/MXS: add proper clock handling

The delay units inside the LRADC depend on the presence of a 2 kHz clock.
This change enables the clock to be able to use the delay unit for the
touchscreen part of the driver.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:hmc5843: Introduce helper functions to show/check list of int pairs
Peter Meerwald [Thu, 19 Sep 2013 19:35:00 +0000 (20:35 +0100)]
staging:iio:hmc5843: Introduce helper functions to show/check list of int pairs

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:hmc5843: Tighten comments
Peter Meerwald [Thu, 19 Sep 2013 19:35:00 +0000 (20:35 +0100)]
staging:iio:hmc5843: Tighten comments

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:hmc5843: Remove unused LSB register #defines
Peter Meerwald [Thu, 19 Sep 2013 19:35:00 +0000 (20:35 +0100)]
staging:iio:hmc5843: Remove unused LSB register #defines

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:hmc5843: Use INFO_SAMP_FREQ
Peter Meerwald [Thu, 19 Sep 2013 19:35:00 +0000 (20:35 +0100)]
staging:iio:hmc5843: Use INFO_SAMP_FREQ

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:hmc5843: Rewrite init function
Peter Meerwald [Thu, 19 Sep 2013 19:35:00 +0000 (20:35 +0100)]
staging:iio:hmc5843: Rewrite init function

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:hmc5843: Add pointer to i2c client to data struct
Peter Meerwald [Thu, 19 Sep 2013 19:35:00 +0000 (20:35 +0100)]
staging:iio:hmc5843: Add pointer to i2c client to data struct

and use it to simplify code

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Update unit of the voltage scale in the documentation
Lars-Peter Clausen [Sat, 28 Sep 2013 09:31:00 +0000 (10:31 +0100)]
iio: Update unit of the voltage scale in the documentation

The documentation says that the result of raw * scale should be in microvolts,
but in reallity all drivers actually report the scale so that the result is in
millivolts. So update the documentation to match reallity.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:spear_adc: Report scale as fractional value
Lars-Peter Clausen [Sat, 28 Sep 2013 09:31:00 +0000 (10:31 +0100)]
staging:iio:spear_adc: Report scale as fractional value

Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ad7746: Report scale as fractional value
Lars-Peter Clausen [Sat, 28 Sep 2013 09:31:00 +0000 (10:31 +0100)]
staging:iio:ad7746: Report scale as fractional value

Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>