firefly-linux-kernel-4.4.55.git
11 years agoiio:adc:max1363 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Tue, 19 Feb 2013 21:11:35 +0000 (21:11 +0000)]
iio:adc:max1363 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Add broken out info_mask fields for shared_by_type and separate
Jonathan Cameron [Tue, 19 Feb 2013 21:10:30 +0000 (21:10 +0000)]
iio: Add broken out info_mask fields for shared_by_type and separate

This simplifies the code, removes an extensive layer of 'helper' macros
and gives us twice as much room to play with in these masks before we
have any need to be clever.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio: adc: add exynos adc driver under iio framwork
Naveen Krishna Chatradhi [Fri, 15 Feb 2013 06:56:00 +0000 (06:56 +0000)]
iio: adc: add exynos adc driver under iio framwork

This patch adds New driver to support:
1. Supports ADC IF found on EXYNOS4412/EXYNOS5250
   and future SoCs from Samsung
2. Add ADC driver under iio/adc framework
3. Also adds the Documentation for device tree bindings

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:common: Use spi_sync_transfer() in STMicroelectronics common library
Denis Ciocca [Sat, 9 Feb 2013 16:08:00 +0000 (16:08 +0000)]
iio:common: Use spi_sync_transfer() in STMicroelectronics common library

Use the new spi_sync_transfer() helper function instead of open-coding it.

Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoIIO ADC support for AD7923
Christophe Leroy [Wed, 13 Feb 2013 06:47:00 +0000 (06:47 +0000)]
IIO ADC support for AD7923

This patch adds support for Analog Devices AD7923 ADC in the IIO Subsystem.

Signed-off-by: Patrick Vasseur <patrick.vasseur@c-s.fr>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Add OF support
Guenter Roeck [Thu, 7 Feb 2013 17:09:00 +0000 (17:09 +0000)]
iio: Add OF support

Provide bindings and parse OF data during initialization.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio: Remove adt7410 driver
Lars-Peter Clausen [Mon, 18 Feb 2013 13:38:00 +0000 (13:38 +0000)]
staging:iio: Remove adt7410 driver

The adt7410 hwmon driver is feature wise more or less on par with the IIO
driver. So we can finally remove the IIO driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging: comedi: ni_labpc: fix common detach
Ian Abbott [Fri, 15 Mar 2013 13:39:52 +0000 (13:39 +0000)]
staging: comedi: ni_labpc: fix common detach

`labpc_common_detach()` calls `comedi_pci_disable()` unconditionally.
That's okay for PCI devices and harmless for ISA devices (as the
`hw_dev` member will be NULL so `comedi_to_pci_dev()` will return NULL
and `comedi_pci_disable()` checks for that), but it is disastrous for
PCMCIA devices.  Those are managed by the "ni_labpc_cs" module but it
calls this `labpc_common_detach()` and the `hw_dev` member will be
pointing to the `struct device` embedded in a `struct pcmcia_device` in
that case.  That's enough to confuse `comedi_pci_disable()` into
thinking it's a valid PCI device to be disabled.

Use the private board information (`thisboard`) to make sure it is a PCI
device before calling `comedi_pci_disable()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: remove unneeded settings of `dev->iobase`
Ian Abbott [Fri, 15 Mar 2013 13:15:36 +0000 (13:15 +0000)]
staging: comedi: remove unneeded settings of `dev->iobase`

Some PCI drivers use the "spare" `iobase` member of `struct
comedi_device` as a flag to indicate that the call to
`comedi_pci_enable()` was successful.  This is no longer necessary now
that `comedi_pci_enable()` and `comedi_pci_disable()` use the
`ioenabled` member of `struct comedi_device` themselves to keep track of
what needs to be done.

Remove the unnecessary assignments to the `iobase` member in the
relevant drivers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: add 'ioenabled' flag to device
Ian Abbott [Fri, 15 Mar 2013 13:15:35 +0000 (13:15 +0000)]
staging: comedi: add 'ioenabled' flag to device

Add 1-bit bit-field member `ioenabled` of type `bool` to `struct
comedi_device`.  Use this to keep track of whether a PCI device and its
BARs have been successfully enabled by `comedi_pci_enable()`.  This
avoids overloading the meaning of the `iobase` member which is used by
several drivers to hold the base port I/O address of a board's "main"
registers.  Other drivers using MMIO use `iobase` as a flag to indicate
that the preceding call to `comedi_pci_enable()` was successful.  They
no longer need to do that.

The name `ioenabled` is intended to be PCI-agnostic so it can be used
for similar purposes by non-PCI drivers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: make 'in_request_module' a bool bit-field
Ian Abbott [Fri, 15 Mar 2013 13:15:34 +0000 (13:15 +0000)]
staging: comedi: make 'in_request_module' a bool bit-field

Change the `in_request_module` member of `struct comedi_device` to a
1-bit bit-field of type `bool` and move it into a suitable hole in the
data type to save a few bytes.  Change the assigned values to `true` and
`false`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: make 'dev->attached' a bool bit-field
Ian Abbott [Fri, 15 Mar 2013 13:15:33 +0000 (13:15 +0000)]
staging: comedi: make 'dev->attached' a bool bit-field

Change the `attached` member of `struct comedi_device` to a 1-bit
bit-field of type `bool`.  Change assigned values to `true` and `false`
and replace or remove comparison operations with simple boolean tests.

We'll put some extra bit-fields in the gap later to save space.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_660x: support NI PXI-6624
Ian Abbott [Fri, 15 Mar 2013 11:16:36 +0000 (11:16 +0000)]
staging: comedi: ni_660x: support NI PXI-6624

Florent Boudet reports success using a NI PXI-6624 board with a
trivially modified version of the "ni_660x" driver (addition to the PCI
device ID table and comedi board table).  He did this with the
out-of-tree Comedi drivers at www.comedi.org, but it applies equally to
the in-tree "staging" drivers.

He reports the PXI-6624 is basically the same as the PXI-6602, but with
isolated channels and external voltage source.

Add support for NI PXI-6224 to the "ni_660x" driver.

(Maybe the driver should be renamed to "ni_66xx"?)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Florent Boudet <flboudet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_660x: reformat driver description comment
Ian Abbott [Fri, 15 Mar 2013 11:16:35 +0000 (11:16 +0000)]
staging: comedi: ni_660x: reformat driver description comment

Convert to preferred block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adv_pci_dio: restore PCI-1753E support
Ian Abbott [Fri, 15 Mar 2013 10:32:12 +0000 (10:32 +0000)]
staging: comedi: adv_pci_dio: restore PCI-1753E support

Back in the old days (before "staging") when Comedi only supported
manual configuration of devices, the "adv_pci_dio" driver supported both
PCI-1753 ("pci1753") and PCI-1753E ("pci1753e").  In actual fact,
"pci1753e" is just a PCI-1753 connected by a ribbon cable to a PCI-1753E
expansion card, which is plugged into a PCI slot but is not a PCI device
itself.  Now that the "adv_pci_dio" driver only supports automatic
configuration of devices and the main "comedi" module no longer allows
auto-configuration to be disabled, a PCI-1753 with a PCI-1753E expansion
card is always treated as an unexpanded PCI-1753 ("pci1753") and there
is no way to override it.  (Recently, an undefined macro
`USE_PCI1753E_BOARDINFO` was used to make the driver switch to
supporting "pci1753e" instead of "pci1753", but this is less than
ideal.)

Advantech has their own Linux (non-Comedi) driver for the PCI-1753 which
detects whether the PCI-1753E expansion card is connected to the
PCI-1753 by fiddling with a register at offset 53 from the main
registers base.

Use Advantech's test in our "adv_pci_dio" driver.  If the board appears
to be a PCI-1753 ("pci1753"), check if the expansion card appears to be
present, and if so, treat the device as a PCI-1753 plus PCI-1753E
expansion card ("pci1753e").

Also, get rid of `enum dio_boardid` (`BOARD_...` enum values) which was
added recently and just use the older `TYPE_...` enum values from `enum
hw_cards_id` instead as the mapping is now 1-to-1.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_atmio: fix build error due to missing '; '
H Hartley Sweeten [Thu, 14 Mar 2013 20:33:24 +0000 (13:33 -0700)]
staging: comedi: ni_atmio: fix build error due to missing '; '

Fix a build error due to a missing ';' at the end of a line.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Geert Uytterhoeven <geert.uytterhoeven@gmail.com>
Cc: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: dwc2: remove a kfree(NULL)
Dan Carpenter [Fri, 15 Mar 2013 06:03:31 +0000 (09:03 +0300)]
Staging: dwc2: remove a kfree(NULL)

dwc2_hcd_release() calls dwc2_hcd_free() which frees ->core_params
and sets it to NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: sep: fix possible memory leak in sep_prepare_input_dma_table()
Wei Yongjun [Fri, 15 Mar 2013 09:20:08 +0000 (17:20 +0800)]
staging: sep: fix possible memory leak in sep_prepare_input_dma_table()

'lli_array_ptr' etc. are malloced in sep_prepare_input_dma_table() and should
be freed before leaving from the error handling case, otherwise it will cause
memory leak.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: add documentation for omap_bandgap_validate
Eduardo Valentin [Fri, 15 Mar 2013 13:00:38 +0000 (09:00 -0400)]
staging: omap-thermal: add documentation for omap_bandgap_validate

Document the helper to validate a struct omap_bandgap and a sensor id.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: remove TODO entry for exposed APIs
Eduardo Valentin [Fri, 15 Mar 2013 13:00:37 +0000 (09:00 -0400)]
staging: omap-thermal: remove TODO entry for exposed APIs

Not all APIs exposed today are used. However all unused APIs
will be required once the thermal layer allows IRQ based
policies.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: remove TODO entry suggesting regmap usage
Eduardo Valentin [Fri, 15 Mar 2013 13:00:36 +0000 (09:00 -0400)]
staging: omap-thermal: remove TODO entry suggesting regmap usage

It is hard to use regmap because benefit of using regmap cache
may not be applicable as there is a specific sequence to
restore the bandgap context.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: switch mutex to spinlock inside omap-bandgap
Eduardo Valentin [Fri, 15 Mar 2013 13:00:35 +0000 (09:00 -0400)]
staging: omap-thermal: switch mutex to spinlock inside omap-bandgap

Because there is a need to lock inside IRQ handler, this patch
changes the locking mechanism inside the omap-bandgap.[c,h] to
spinlocks. Now this lock is used to protect omap_bandgap struct
during APIs exposed (possibly used in sysfs handling functions)
and inside the ALERT IRQ handler.

Because there are registers shared among the sensors, this lock
is global, not per sensor.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: Add a MAINTAINERS entry for TI bandgap and thermal driver
Eduardo Valentin [Fri, 15 Mar 2013 13:00:34 +0000 (09:00 -0400)]
staging: omap-thermal: Add a MAINTAINERS entry for TI bandgap and thermal driver

Add myself as maintainer of the TI bandgap and thermal driver.

CC: Santosh Shilimkar <santosh.shilimkar@ti.com>
CC: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: change Kconfig dependency method
Eduardo Valentin [Fri, 15 Mar 2013 13:00:33 +0000 (09:00 -0400)]
staging: omap-thermal: change Kconfig dependency method

Now arch code has to specify CONFIG_ARCH_HAS_BANDGAP. So, this driver
will be selectable only if the platform reports itself as having a
bandgap device.

Any OMAP variant or any other OMAP version needs to
select ARCH_HAS_BANDGAP
so that the driver will be applicable. A part from that it is
required to device the data structures that maps the registers
and their bitfields. The DT compatible list must also be updated.

CC: Santosh Shilimkar <santosh.shilimkar@ti.com>
CC: Vaibhav Bedia <vaibhav.bedia@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: document omap_bandgap_build function
Eduardo Valentin [Fri, 15 Mar 2013 13:00:32 +0000 (09:00 -0400)]
staging: omap-thermal: document omap_bandgap_build function

Document function to build omap_bandgap structure

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: document omap_bandgap_alert_init function
Eduardo Valentin [Fri, 15 Mar 2013 13:00:31 +0000 (09:00 -0400)]
staging: omap-thermal: document omap_bandgap_alert_init function

Document function that sets talert handling up.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: document omap_bandgap_tshut_init function
Eduardo Valentin [Fri, 15 Mar 2013 13:00:30 +0000 (09:00 -0400)]
staging: omap-thermal: document omap_bandgap_tshut_init function

Add documentation for the function to setup TSHUT handling

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: document _omap_bandgap_read_threshold function
Eduardo Valentin [Fri, 15 Mar 2013 13:00:29 +0000 (09:00 -0400)]
staging: omap-thermal: document _omap_bandgap_read_threshold function

Add documentation of the function for reading alert thresholds

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: document _omap_bandgap_write_threshold function
Eduardo Valentin [Fri, 15 Mar 2013 13:00:28 +0000 (09:00 -0400)]
staging: omap-thermal: document _omap_bandgap_write_threshold function

Document function to update alert thresholds.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: document omap_bandgap_update_alert_threshold function
Eduardo Valentin [Fri, 15 Mar 2013 13:00:27 +0000 (09:00 -0400)]
staging: omap-thermal: document omap_bandgap_update_alert_threshold function

Document function to program alert thresholds

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: document omap_bandgap_force_single_read
Eduardo Valentin [Fri, 15 Mar 2013 13:00:26 +0000 (09:00 -0400)]
staging: omap-thermal: document omap_bandgap_force_single_read

Document function to initialize the conversion state machine.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: update omap_bandgap_set_continous_mode documentation
Eduardo Valentin [Fri, 15 Mar 2013 13:00:25 +0000 (09:00 -0400)]
staging: omap-thermal: update omap_bandgap_set_continous_mode documentation

Simple update on function documentation.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: rename enable_continuous_mode
Eduardo Valentin [Fri, 15 Mar 2013 13:00:24 +0000 (09:00 -0400)]
staging: omap-thermal: rename enable_continuous_mode

This patch names 'enable_continuous_mode' accordingly to the file
standard naming.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: section of device driver callbacks
Eduardo Valentin [Fri, 15 Mar 2013 13:00:23 +0000 (09:00 -0400)]
staging: omap-thermal: section of device driver callbacks

Section with platform device callbacks

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: device initialization section
Eduardo Valentin [Fri, 15 Mar 2013 13:00:22 +0000 (09:00 -0400)]
staging: omap-thermal: device initialization section

Section of helper functions to initilize the bandgap device

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: refactor APIs handling threshold values
Eduardo Valentin [Fri, 15 Mar 2013 13:00:21 +0000 (09:00 -0400)]
staging: omap-thermal: refactor APIs handling threshold values

This patch improves the code that handles threshold values
by creating single functions that are usable for tcold and
thot. This way we won't have duplicated functionality just
because it is handling different bitfields. Now
the added functions are reused in several places where
it is needed to update any threshold.

This patch also removes macros that are used only inside
the _validate helper function.

In this patch there is also an addition of an extra function
section for Exposed APIs, used outside the omap-bandgap.c,
but inside the omap-thermal driver.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: update omap_bandgap_unmask_interrupts documentation
Eduardo Valentin [Fri, 15 Mar 2013 13:00:20 +0000 (09:00 -0400)]
staging: omap-thermal: update omap_bandgap_unmask_interrupts documentation

Proper document the function to configure the IRQ event masks.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: refactor temp_sensor_unmask_interrupts
Eduardo Valentin [Fri, 15 Mar 2013 13:00:19 +0000 (09:00 -0400)]
staging: omap-thermal: refactor temp_sensor_unmask_interrupts

This change improves temp_sensor_unmask_interrupts by:
. renaming it to omap_bandgap_unmask_interrupts
. making it a void function, as there is nothing really to report an error.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: threshold manipulation section
Eduardo Valentin [Fri, 15 Mar 2013 13:00:18 +0000 (09:00 -0400)]
staging: omap-thermal: threshold manipulation section

Section of functions manipulating thresholds for Alert and Shutdown.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: document omap_bandgap_add_hyst function
Eduardo Valentin [Fri, 15 Mar 2013 13:00:17 +0000 (09:00 -0400)]
staging: omap-thermal: document omap_bandgap_add_hyst function

Document function to handle hysteresis.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: rename add_hyst to omap_bandgap_add_hyst
Eduardo Valentin [Fri, 15 Mar 2013 13:00:16 +0000 (09:00 -0400)]
staging: omap-thermal: rename add_hyst to omap_bandgap_add_hyst

This patch improves the add_hyst function by:
. Renaming it to omap_bandgap_add_hyst
. Moving it to the ADC conversion functions section
. Changing its signature to follow the driver standard

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: add documentation for omap_bandgap_mcelsius_to_adc
Eduardo Valentin [Fri, 15 Mar 2013 13:00:15 +0000 (09:00 -0400)]
staging: omap-thermal: add documentation for omap_bandgap_mcelsius_to_adc

Document the conversion function.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: move conv table limits out of sensor data
Eduardo Valentin [Fri, 15 Mar 2013 13:00:14 +0000 (09:00 -0400)]
staging: omap-thermal: move conv table limits out of sensor data

As we have one conv table per bandgap device and not per sensor,
this patch changes the data structures so that the conv table
min and max values are now part of bandgap_data and not sensor_data.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: rewrite omap_bandgap_mcelsius_to_adc on kernel coding style
Eduardo Valentin [Fri, 15 Mar 2013 13:00:13 +0000 (09:00 -0400)]
staging: omap-thermal: rewrite omap_bandgap_mcelsius_to_adc on kernel coding style

Follow Documentation/CodingStyle while doing omap_bandgap_mcelsius_to_adc

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: name temp_to_adc_conversion in a better way
Eduardo Valentin [Fri, 15 Mar 2013 13:00:12 +0000 (09:00 -0400)]
staging: omap-thermal: name temp_to_adc_conversion in a better way

Rename temp_to_adc_conversion to omap_bandgap_mcelsius_to_adc. This name,
though longer, describes better the function.

This patch also changes this function signature so the function follows
the style of this file.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: add documentation for omap_bandgap_adc_to_mcelsius
Eduardo Valentin [Fri, 15 Mar 2013 13:00:11 +0000 (09:00 -0400)]
staging: omap-thermal: add documentation for omap_bandgap_adc_to_mcelsius

Document the conversion function.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: rewrite omap_bandgap_adc_to_mcelsius on kernel coding style
Eduardo Valentin [Fri, 15 Mar 2013 13:00:10 +0000 (09:00 -0400)]
staging: omap-thermal: rewrite omap_bandgap_adc_to_mcelsius on kernel coding style

Follow Documentation/CodingStyle while doing  omap_bandgap_adc_to_mcelsius.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: name adc_to_temp_conversion in a better way
Eduardo Valentin [Fri, 15 Mar 2013 13:00:09 +0000 (09:00 -0400)]
staging: omap-thermal: name adc_to_temp_conversion in a better way

Rename adc_to_temp_conversion to omap_bandgap_adc_to_mcelsius. This name,
though longer, describes better the function.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: ADC section
Eduardo Valentin [Fri, 15 Mar 2013 13:00:08 +0000 (09:00 -0400)]
staging: omap-thermal: ADC section

Section of ADC helpers functions

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: IRQ handler section
Eduardo Valentin [Fri, 15 Mar 2013 13:00:07 +0000 (09:00 -0400)]
staging: omap-thermal: IRQ handler section

Section of IRQ handlers

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: section of basic helpers
Eduardo Valentin [Fri, 15 Mar 2013 13:00:06 +0000 (09:00 -0400)]
staging: omap-thermal: section of basic helpers

Group of simple functions aggregating basic functionality.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: add a section of register manipulation
Eduardo Valentin [Fri, 15 Mar 2013 13:00:05 +0000 (09:00 -0400)]
staging: omap-thermal: add a section of register manipulation

This is introduces a series of marks inside the code to
better organize functions per group, aggregating their
functionality.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: read status only once inside alert IRQ
Eduardo Valentin [Fri, 15 Mar 2013 13:00:04 +0000 (09:00 -0400)]
staging: omap-thermal: read status only once inside alert IRQ

There is no need to re-read status register.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: remove duplicated code
Eduardo Valentin [Fri, 15 Mar 2013 13:00:03 +0000 (09:00 -0400)]
staging: omap-thermal: remove duplicated code

There is no need to assign twice the same variable with the very same value.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: update tshut IRQ handler documentation
Eduardo Valentin [Fri, 15 Mar 2013 13:00:02 +0000 (09:00 -0400)]
staging: omap-thermal: update tshut IRQ handler documentation

Documents tshut handler better.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: update documentation for talert irq handler
Eduardo Valentin [Fri, 15 Mar 2013 13:00:01 +0000 (09:00 -0400)]
staging: omap-thermal: update documentation for talert irq handler

Document the Talert IRQ handler.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: rename talert handler
Eduardo Valentin [Fri, 15 Mar 2013 13:00:00 +0000 (09:00 -0400)]
staging: omap-thermal: rename talert handler

Simple rename to cope with file naming pattern.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: add documentation for omap_bandgap_read_temp
Eduardo Valentin [Fri, 15 Mar 2013 12:59:59 +0000 (08:59 -0400)]
staging: omap-thermal: add documentation for omap_bandgap_read_temp

Document function which reads temperature register, depending on
bandgap device version.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: add documentation for omap_bandgap_power
Eduardo Valentin [Fri, 15 Mar 2013 12:59:58 +0000 (08:59 -0400)]
staging: omap-thermal: add documentation for omap_bandgap_power

Document the helper function to turn a bandgap device on and off.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: make a omap_bandgap_power with only one exit point
Eduardo Valentin [Fri, 15 Mar 2013 12:59:57 +0000 (08:59 -0400)]
staging: omap-thermal: make a omap_bandgap_power with only one exit point

Change the way the omap_bandgap_power is written so that it has only
one exit entry (Documentation/CodingStyle).

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: add documentation for register access functions
Eduardo Valentin [Fri, 15 Mar 2013 12:59:56 +0000 (08:59 -0400)]
staging: omap-thermal: add documentation for register access functions

Document the helper functions that manipulates registers and their
bitfields. All of them work based of the io mapped area.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: introduce RMW_BITS macro
Eduardo Valentin [Fri, 15 Mar 2013 12:59:55 +0000 (08:59 -0400)]
staging: omap-thermal: introduce RMW_BITS macro

This patch introduce a macro to read, update, write bitfields.
It will be specific to bandgap data structures.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: fix error checking
Eduardo Valentin [Fri, 15 Mar 2013 12:59:54 +0000 (08:59 -0400)]
staging: omap-thermal: fix error checking

The omap_bandgap_get_sensor_data() function returns ERR_PTR(),
but it can also return NULL, in case of initilization, so we need to use
IS_ERR_OR_NULL() rather than only IS_ERR().

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: style cleanup on omap-bandgap.c
Eduardo Valentin [Fri, 15 Mar 2013 12:59:53 +0000 (08:59 -0400)]
staging: omap-thermal: style cleanup on omap-bandgap.c

simple changes on alignments and white spaces

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: update documentation of omap-bandgap.h
Eduardo Valentin [Fri, 15 Mar 2013 12:59:52 +0000 (08:59 -0400)]
staging: omap-thermal: update documentation of omap-bandgap.h

This patch updates the existing data structures for omap bandgap,
inside omap-bandgap.h.

TODO: remove unused fields.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: create header for register, bitfields and definitions
Eduardo Valentin [Fri, 15 Mar 2013 12:59:51 +0000 (08:59 -0400)]
staging: omap-thermal: create header for register, bitfields and definitions

In order to have a better code readability and organization, this patch
splits omap-bandgap.h into three headers.
. omap-bandgap.h will contain only the driver related data structures
definitions and macros
. omap4xxx-bandgap.h will contain only defines and bitfields
related to OMAP4 based devices
. omap5xxx-bandgap.h will contain only defines and bitfields
related to OMAP5 based devices

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: remove unused _SHIFT macros
Eduardo Valentin [Fri, 15 Mar 2013 12:59:50 +0000 (08:59 -0400)]
staging: omap-thermal: remove unused _SHIFT macros

As these macros are not used on any part of the code,
this patch removes all the *_SHIT defines.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: use BIT() macro
Eduardo Valentin [Fri, 15 Mar 2013 12:59:49 +0000 (08:59 -0400)]
staging: omap-thermal: use BIT() macro

For code readability, this patch changes the bit definition
under omap-bandgap.h to use the BIT() macro.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: ccg: delete it from the tree
Greg Kroah-Hartman [Thu, 14 Mar 2013 22:27:31 +0000 (15:27 -0700)]
Staging: ccg: delete it from the tree

Now that it isn't in the build, just delete the ccg driver from the tree
entirely.

Cc: John Stultz <john.stultz@linaro.org>
Cc: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: ccg: remove it from the build
Greg Kroah-Hartman [Thu, 14 Mar 2013 22:22:40 +0000 (15:22 -0700)]
Staging: ccg: remove it from the build

This driver has been nothing but trouble, and no one shipping a new
Android device uses it, so let's just drop it, making the USB Gadget
driver authors lives a whole lot easier as they do their rework.

Cc: John Stultz <john.stultz@linaro.org>
Cc: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: netlogic: remove unused variable in xlr_net_start_xmit()
Wei Yongjun [Thu, 14 Mar 2013 14:55:47 +0000 (22:55 +0800)]
Staging: netlogic: remove unused variable in xlr_net_start_xmit()

The variable 'qmap' is initialized but never used
otherwise, so remove the unused variable.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adv_pci1710: remove iorange member
Ian Abbott [Thu, 14 Mar 2013 11:40:54 +0000 (11:40 +0000)]
staging: comedi: adv_pci1710: remove iorange member

The `iorange` member of `struct boardtype` is initialized but not used.
Get rid of it and the macro constants `IORANGE_171x` and `IORANGE_1720`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_1710: only pci bar 2 is used
H Hartley Sweeten [Wed, 13 Mar 2013 19:18:12 +0000 (12:18 -0700)]
staging: comedi: addi_apci_1710: only pci bar 2 is used

This driver used to be tied to the addi-data common code which
always saved the start address of pci bars 0, 1, 2, and 3 for
use by the driver. This driver only uses pci bar 2.

Remove all the non-used pci bars and move the saving of pci bar
2 so it occurs right after the pci device is enabled.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi_pci: pass comedi_device to comedi_pci_enable()
H Hartley Sweeten [Wed, 13 Mar 2013 17:36:31 +0000 (10:36 -0700)]
staging: comedi_pci: pass comedi_device to comedi_pci_enable()

Make comedi_pci_enable() use the same parameter type as
comedi_pci_disable(). This also allows comedi_pci_enable
to automatically determine the resource name passed to
pci_request_regions().

Make sure the errno value returned is passed on instead of
assuming an errno. Also, remove any kernel noise that is
generated when the call fails.

The National Instruments drivers that use the mite module
currently enable the PCI device in the mite module. For
those drivers move the call to comedi_pci_enable into the
driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi_pci: make comedi_pci_disable() safe to call
H Hartley Sweeten [Wed, 13 Mar 2013 17:35:51 +0000 (10:35 -0700)]
staging: comedi_pci: make comedi_pci_disable() safe to call

Currently all the comedi PCI drivers need to do some checking in
their (*detach) before calling comedi_pci_disable() in order to
make sure the PCI device has actually be enabled.

Change the parameter passed to comedi_pci_disable() from a struct
pci_dev pointer to a comedi_device pointer and have comedi_pci_disable()
handle all the checking.

For most comedi PCI drivers this also allows removing the local
variable holding the pointer to the pci_dev. For some of the drivers
comedi_pci_disable can now be used directly as the (*detach) function.

The National Instruments drivers that use the mite module currently
enable/disable the PCI device in the mite module. For those drivers
move the call to comedi_pci_disable into the driver and make sure
dev->iobase is set to a non-zero value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgrp: cleanup sparse warnings
Nathan Zimmer [Wed, 13 Mar 2013 18:05:59 +0000 (13:05 -0500)]
staging: dgrp: cleanup sparse warnings

A cleanup patch to remove sparse warnings caused by my other patch
"procfs: Improve Scaling in proc" since now proc_fops is protected by the rcu.

Signed-off-by: Nathan Zimmer <nzimmer@sgi.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: android: remove dependency on TINY_SHMEM
Paul Bolle [Thu, 14 Mar 2013 09:41:39 +0000 (10:41 +0100)]
staging: android: remove dependency on TINY_SHMEM

The Kconfig entry for the "Anonymous Shared Memory Subsystem" got added
in v3.3. It has an optional dependency on TINY_SHMEM. But TINY_SHMEM had
already been removed in v2.6.29. So this optional dependency can safely
be removed too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: fix compilation warning in unifi_siwscan
Devendra Naga [Thu, 14 Mar 2013 06:40:28 +0000 (02:40 -0400)]
staging: csr: fix compilation warning in unifi_siwscan

got the warnings

drivers/staging/csr/sme_wext.c: In function ‘unifi_siwscan’:
drivers/staging/csr/sme_wext.c:1276:9: warning: variable ‘scantype’ set but not used [-Wunused-but-set-variable]

fixed by removing the variable

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: comedi: Fixed camel case style issue in usbdux.c
Jacob Garber [Wed, 13 Mar 2013 16:19:20 +0000 (12:19 -0400)]
Staging: comedi: Fixed camel case style issue in usbdux.c

This is a patch to usbdux.c that fixes the camel case warnings found
by the checkpatch.pl tool

Signed-off-by: Jacob Garber <ajtgarber@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: the DWC2 driver uses bus_to_virt
Stephen Rothwell [Wed, 13 Mar 2013 05:39:35 +0000 (16:39 +1100)]
staging: the DWC2 driver uses bus_to_virt

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: fix compiler warnings
Paul Zimmerman [Thu, 14 Mar 2013 20:12:00 +0000 (13:12 -0700)]
staging: dwc2: fix compiler warnings

Fix some compiler warnings when building for i386 arch. Reported by
Fengguang's build-bot.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_atmio: fix build errors
H Hartley Sweeten [Tue, 12 Mar 2013 17:53:11 +0000 (10:53 -0700)]
staging: comedi: ni_atmio: fix build errors

The following commits introduced a couple build errors in this driver
due to the removal of some macros in ni_stc.h.

commit: f5a1d92b "staging: comedi: ni_stc.h: remove n_ni_boards macro"
commit: 6293e357 "staging: comedi: ni_stc.h: remove boardtype macro"

The n_ni_boards macro is an open coded version of ARRAY_SIZE.

The boardtype macro is removed in favor of using the comedi_board()
helper and accessing the boardinfo with a pointer.

Fix both issues.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodriver: staging: csr: remove cast for kmalloc return value
Zhang Yanfei [Tue, 12 Mar 2013 05:03:35 +0000 (13:03 +0800)]
driver: staging: csr: remove cast for kmalloc return value

remove cast for kmalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: fix invalid fail after the call to eeprom_wait_ready
Devendra Naga [Tue, 12 Mar 2013 05:34:45 +0000 (01:34 -0400)]
staging: et131x: fix invalid fail after the call to eeprom_wait_ready

should be err < 0 instead of if (err) which actually the read register
value can be a positive number

Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adv_pci1724: new driver
Frank Mori Hess [Tue, 12 Mar 2013 11:42:32 +0000 (11:42 +0000)]
staging: comedi: adv_pci1724: new driver

New comedi driver for Advantech PCI-1724U with modifications by Ian
Abbott <abbotti@mev.co.uk>.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmh6jj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adv_pci1710: restore PCI-1710HG support
Ian Abbott [Tue, 12 Mar 2013 14:14:37 +0000 (14:14 +0000)]
staging: comedi: adv_pci1710: restore PCI-1710HG support

The Advantech PCI-1710HG is similar to the PCI-1710 but has a different
set of ranges for analog input (HG = high gain).  Because they share the
same PCI vendor and device ID, the adv_pci1710 driver does not currently
distinguish them.  This is more of a problem since auto-configuration
code was added to the driver (and manual configuration support removed),
as the PCI-1710HG would be automatically configured as a PCI-1710.  More
recently, the unused code for PCI-1710HG support was #ifdef'ed out.

In fact, the PCI-1710 and PCI-1710HG can be distinguished by considering
the PCI subvendor and subdevice IDs according to the following table:

vendor device subven subdev model        treat as
====== ====== ====== ====== ============ ==========
0x13fe 0x1710 0x10b5 0x9050 PCI-1710S    PCI-1710
0x13fe 0x1710 0x13fe 0x0000 PCI-1710     PCI-1710
0x13fe 0x1710 0x13fe 0xb100 PCI-1710B    PCI-1710
0x13fe 0x1710 0x13fe 0xb200 PCI-1710B2   PCI-1710
0x13fe 0x1710 0x13fe 0xc100 PCI-1710C    PCI-1710
0x13fe 0x1710 0x13fe 0xc200 PCI-1710C2   PCI-1710
0x13fe 0x1710 0x1000 0xd100 PCI-1710U    PCI-1710
0x13fe 0x1710 0x13fe 0x0002 PCI-1710HG   PCI-1710HG
0x13fe 0x1710 0x13fe 0xb102 PCI-1710HGB  PCI-1710HG
0x13fe 0x1710 0x13fe 0xb202 PCI-1710HGB2 PCI-1710HG
0x13fe 0x1710 0x13fe 0xc102 PCI-1710HGC  PCI-1710HG
0x13fe 0x1710 0x13fe 0xc202 PCI-1710HGC2 PCI-1710HG
0x13fe 0x1710 0x1000 0xd102 PCI-1710HGU  PCI-1710HG

The above information is extracted from Advantech's own GPL'ed Linux
(non-Comedi) driver source from "advdaq-1.10.0001-1.tar.bz2" on their
website.

(0x13fe = PCI_VENDOR_ID_ADVANTECH, 0x10b5 = PCI_VENDOR_ID_PLX, 0x9050 =
PCI_DEVICE_ID_PLX_9050, 0x1000 = PCI_VENDOR_ID_NCR or
PCI_VENDOR_ID_LSI_LOGIC but I assume this subvendor ID was chosen
"randomly".)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: Hook the DWC2 driver into the build system
Paul Zimmerman [Tue, 12 Mar 2013 00:48:02 +0000 (17:48 -0700)]
staging: Hook the DWC2 driver into the build system

Add the DWC2 Kconfig and Makefile, and modify the staging Kconfig and
Makefile to include them

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: Add a MAINTAINERS entry for the DWC2 driver
Paul Zimmerman [Tue, 12 Mar 2013 00:48:03 +0000 (17:48 -0700)]
staging: Add a MAINTAINERS entry for the DWC2 driver

Add myself as maintainer of the DWC2 driver

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: PCI bus interface for the DWC2 driver
Paul Zimmerman [Tue, 12 Mar 2013 00:48:01 +0000 (17:48 -0700)]
staging: PCI bus interface for the DWC2 driver

This file contains the PCI bus interface "glue" for the DWC2 driver

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: HCD descriptor DMA support for the DWC2 driver
Paul Zimmerman [Tue, 12 Mar 2013 00:48:00 +0000 (17:48 -0700)]
staging: HCD descriptor DMA support for the DWC2 driver

This file contains code to support the HCD descriptor DMA mode of
the controller

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: HCD files for the DWC2 driver
Paul Zimmerman [Tue, 12 Mar 2013 00:47:59 +0000 (17:47 -0700)]
staging: HCD files for the DWC2 driver

These files contain the HCD code, and implement the Linux
hc_driver API. Support for both slave mode and buffer DMA mode
of the controller is included.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: Core files for the DWC2 driver
Paul Zimmerman [Tue, 12 Mar 2013 00:47:58 +0000 (17:47 -0700)]
staging: Core files for the DWC2 driver

The core code provides basic services for accessing and managing
the DWC_otg hardware. These services are used by both the Host
Controller Driver and (in future) the Peripheral Controller Driver.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: Netlogic XLR/XLS GMAC driver
Ganesan Ramalingam [Wed, 6 Mar 2013 14:12:22 +0000 (19:42 +0530)]
Staging: Netlogic XLR/XLS GMAC driver

Add support for the Network Accelerator Engine on Netlogic XLR/XLS
MIPS SoCs. The XLR/XLS NAE blocks can be configured as one 10G
interface or four 1G interfaces. This driver supports blocks
with 1G ports.

Signed-off-by: Ganesan Ramalingam <ganesanr@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: sync: fix return value check in sync_fence_alloc()
Wei Yongjun [Mon, 11 Mar 2013 13:45:34 +0000 (21:45 +0800)]
staging: sync: fix return value check in sync_fence_alloc()

In case of error, the function anon_inode_getfile() returns
ERR_PTR() and never returns NULL. The NULL test in the return
value check should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: remove duplicated include from ni_pcimio.c
Wei Yongjun [Mon, 11 Mar 2013 14:22:42 +0000 (22:22 +0800)]
staging: comedi: remove duplicated include from ni_pcimio.c

Remove duplicated include.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: Fix typo in comedi
Masanari Iida [Thu, 7 Mar 2013 14:48:40 +0000 (23:48 +0900)]
staging: comedi: Fix typo in comedi

Correct spelling typos in staging/comedi

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci8164: cleanup multi-line comments
H Hartley Sweeten [Wed, 6 Mar 2013 23:00:38 +0000 (16:00 -0700)]
staging: comedi: adl_pci8164: cleanup multi-line comments

Format the multi-line comments in the kernel CodingStyle.

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>
11 years agostaging: comedi: adl_pci8164: remove unnecessary includes
H Hartley Sweeten [Wed, 6 Mar 2013 23:00:14 +0000 (16:00 -0700)]
staging: comedi: adl_pci8164: remove unnecessary includes

Remove all the unnecessary includes.

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>
11 years agostaging: comedi: adl_pci8164: remove PCI_DEVICE_ID_* define
H Hartley Sweeten [Wed, 6 Mar 2013 22:59:20 +0000 (15:59 -0700)]
staging: comedi: adl_pci8164: remove PCI_DEVICE_ID_* define

The PCI device id is only used in the device table. Remove the
define and just open code the device id.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci8164: simplify (*insn_{read,write})
H Hartley Sweeten [Wed, 6 Mar 2013 22:58:28 +0000 (15:58 -0700)]
staging: comedi: adl_pci8164: simplify (*insn_{read,write})

The (*insn_read) and (*insn_write) functions for all the subdevices
in this driver are the same except for the 'offset' that is added
to the iobase and channel to read/write a register on the board.

Pass the 'offset' in s->private so we can use the same (*insn_read)
and (*insn->write) functions for all the subdevices.

Also, fix the (*insn_read) and (*insn_write) functions so they work
correctly. The comedi core expects them to read/write insn->n data
values and then return the number of values used.

For aesthetic reasons, add some whitespace to the subdevice init.

Remove the dev_info() noise at the end of the attach.

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