platform/kernel/linux-starfive.git
9 years agoiio: mma8452: Add access to registers via DebugFS
Martin Fuzzey [Wed, 13 May 2015 10:26:40 +0000 (12:26 +0200)]
iio: mma8452: Add access to registers via DebugFS

Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: mma8452: Initialise before activating
Martin Fuzzey [Wed, 13 May 2015 10:26:38 +0000 (12:26 +0200)]
iio: mma8452: Initialise before activating

Many of the hardware configuration registers may only be modified while the
device is inactive.

Currently the probe code first activates the device and then modifies the
registers (eg to set the scale). This doesn't actually work but is not
noticed since the scale used is the default value.

While at it also issue a hardware reset command at probe time.

Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: gyro: bmg160: decouple buffer and triggers
Vlad Dogaru [Wed, 13 May 2015 13:30:09 +0000 (16:30 +0300)]
iio: gyro: bmg160: decouple buffer and triggers

Make it possible to use buffering with an external trigger, such as one
based on sysfs or hrtimer.

Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: gyro: bmg160: remove redundant field
Vlad Dogaru [Wed, 13 May 2015 13:30:08 +0000 (16:30 +0300)]
iio: gyro: bmg160: remove redundant field

Replace the 'timestamp' field in struct bmg160_data with the identically
named field in iio_poll_func and with calls to iio_get_time_ns().

The reported timestamps may be slightly different, but the advantage is
that we no longer assume that the buffer of bmg160 is triggered by its
own trigger.

Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: __iio_update_buffers: Perform request_update() only for new buffers
Lars-Peter Clausen [Wed, 13 May 2015 14:04:46 +0000 (16:04 +0200)]
iio: __iio_update_buffers: Perform request_update() only for new buffers

We only have to call the request_update() callback for a newly inserted
buffer. The configuration of the already previously active buffers will not
have changed.

This also allows us to move the request_update() call to the beginning of
__iio_update_buffers(), before any currently active buffers are stopped.
This makes the error handling a lot easier since no changes were made to
the buffer list and no rollback needs to be performed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: __iio_update_buffers: Slightly refactor scan mask memory management
Lars-Peter Clausen [Wed, 13 May 2015 14:04:45 +0000 (16:04 +0200)]
iio: __iio_update_buffers: Slightly refactor scan mask memory management

Add a small helper function iio_free_scan_mask() that takes a mask and
frees its memory if the scan masks for the device are dynamically
allocated, otherwise does nothing. This means we don't have to open-code
the same check over and over again in __iio_update_buffers.

Also free compound_mask as soon a we are done using it. This constrains its
usage to a specific region of the function will make further refactoring
and splitting the function into smaller sub-parts more easier.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: Replace printk in __iio_update_buffers with dev_dbg
Lars-Peter Clausen [Wed, 13 May 2015 14:04:44 +0000 (16:04 +0200)]
iio: Replace printk in __iio_update_buffers with dev_dbg

While more verbose error messages are useful for debugging we should really
not put those error messages into the kernel log for normal errors that are
already reported to the application via the error code, when running in
non-debug mode.

Otherwise application authors might expect that this is part of the ABI and
to get the error they should scan the kernel log. Which would be rather
error prone itself since there is no direct mapping between a operation and
the error message so it is impossible to find out which error message
belongs to which error.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: add m62332 DAC driver
Dmitry Eremin-Solenikov [Thu, 14 May 2015 14:21:16 +0000 (17:21 +0300)]
iio: add m62332 DAC driver

m62332 is a simple 2-channel DAC used on several Sharp Zaurus boards to
control LCD voltage, backlight and sound. The driver use regulators to
control the reference voltage and enabling/disabling the DAC.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: ltr501: Add light channel support
Kuppuswamy Sathyanarayanan [Sat, 16 May 2015 01:23:21 +0000 (18:23 -0700)]
iio: ltr501: Add light channel support

Added support to calculate lux value from visible
and IR spectrum adc count values. Also added IIO_LIGHT
channel to enable user read the lux value directly
from device using illuminance input ABI.

Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: pressure: hid-sensor-press: Fix memory leak in probe()
Fabio Estevam [Wed, 13 May 2015 18:06:14 +0000 (15:06 -0300)]
iio: pressure: hid-sensor-press: Fix memory leak in probe()

'channels' is allocated via kmemdup and it is never freed in the
subsequent error paths.

Use 'indio_dev->channels' directly instead, so that we avoid such
memory leak problem.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: orientation: hid-sensor-rotation: Fix memory leak in probe()
Fabio Estevam [Wed, 13 May 2015 18:06:13 +0000 (15:06 -0300)]
iio: orientation: hid-sensor-rotation: Fix memory leak in probe()

'channels' is allocated via kmemdup and it is never freed in the
subsequent error paths.

Use 'indio_dev->channels' directly instead, so that we avoid such
memory leak problem.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: orientation: hid-sensor-incl-3d: Fix memory leak in probe()
Fabio Estevam [Wed, 13 May 2015 18:06:12 +0000 (15:06 -0300)]
iio: orientation: hid-sensor-incl-3d: Fix memory leak in probe()

'channels' is allocated via kmemdup and it is never freed in the
subsequent error paths.

Use 'indio_dev->channels' directly instead, so that we avoid such
memory leak problem.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: light: hid-sensor-als.c: Fix memory leak in probe()
Fabio Estevam [Wed, 13 May 2015 18:06:11 +0000 (15:06 -0300)]
iio: light: hid-sensor-als.c: Fix memory leak in probe()

'channels' is allocated via kmemdup and it is never freed in the
subsequent error paths.

Use 'indio_dev->channels' directly instead, so that we avoid such
memory leak problem.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: gyro: hid-sensor-gyro-3d: Fix memory leak in probe()
Fabio Estevam [Wed, 13 May 2015 18:06:10 +0000 (15:06 -0300)]
iio: gyro: hid-sensor-gyro-3d: Fix memory leak in probe()

'channels' is allocated via kmemdup and it is never freed in the
subsequent error paths.

Use 'indio_dev->channels' directly instead, so that we avoid such
memory leak problem.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: accel: hid-sensor-accel-3d: Fix memory leak in probe()
Fabio Estevam [Wed, 13 May 2015 18:06:09 +0000 (15:06 -0300)]
iio: accel: hid-sensor-accel-3d: Fix memory leak in probe()

'channels' is allocated via kmemdup and it is never freed in the
subsequent error paths.

Use 'indio_dev->channels' directly instead, so that we avoid such
memory leak problem.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: ltr501: Fix proximity threshold boundary check
Kuppuswamy Sathyanarayanan [Fri, 15 May 2015 23:42:56 +0000 (16:42 -0700)]
iio: ltr501: Fix proximity threshold boundary check

Currently, proximity sensor boundary check is done
inside the switch block but outside the case
statement.Since this code will never get executed,
moved the check outside the switch case statement.

   867          case IIO_PROXIMITY:
   868                  switch (dir) {
   // Following line has been moved outside the switch block.
   869                  if (val > LTR501_PS_THRESH_MASK)
   870                          return -EINVAL;
   871                  case IIO_EV_DIR_RISING:

Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:temp:mlx90614 trivial drop of unnecessary ret return from write_raw.
Jonathan Cameron [Sat, 2 May 2015 10:35:02 +0000 (11:35 +0100)]
iio:temp:mlx90614 trivial drop of unnecessary ret return from write_raw.

This is mostly part of an effort to clean out our current warnings
and make the autobuilder build reports more useful.

Still a worthwhile if trivial cleanup!

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com>
Cc: Peter Meerwald <pmeerw@pmeerw.net>
9 years agoiio: adc: ti_am335x_adc: make sample delay, open delay, averaging DT parameters
Vignesh R [Tue, 31 Mar 2015 11:12:37 +0000 (16:42 +0530)]
iio: adc: ti_am335x_adc: make sample delay, open delay, averaging DT parameters

Add optional DT properties to set open delay, sample delay and number
of averages per sample for each adc step. Open delay, sample delay
and averaging are some of the parameters that affect the sampling rate
and accuracy of the sample. Making these parameters configurable via
DT will help in balancing speed vs accuracy.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: acpi: Add support for ACPI0008 Ambient Light Sensor
Gabriele Mazzotta [Sat, 2 May 2015 12:30:57 +0000 (14:30 +0200)]
iio: acpi: Add support for ACPI0008 Ambient Light Sensor

This driver adds the initial support for the ACPI Ambient Light Sensor
as defined in Section 9.2 of the ACPI specification (Revision 5.0) [1].

Sensors complying with the standard are exposed as ACPI devices with
ACPI0008 as hardware ID and provide standard methods by which the OS
can query properties of the ambient light environment the system is
currently operating in.

This driver currently allows only to get the current ambient light
illuminance reading through the _ALI method, but is ready to be
extended extended to handle _ALC, _ALT and _ALP as well.

[1] http://www.acpi.info/DOWNLOADS/ACPIspec50.pdf

Signed-off-by: Martin Liska <marxin.liska@gmail.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoimu: inv_mpu6050: adds device tree bindings
Varka Bhadram [Fri, 24 Apr 2015 09:23:07 +0000 (14:53 +0530)]
imu: inv_mpu6050: adds device tree bindings

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: hid-sensor-press: Constify platform_device_id
Krzysztof Kozlowski [Fri, 1 May 2015 15:53:38 +0000 (00:53 +0900)]
iio: hid-sensor-press: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: hid-sensor-rotation: Constify platform_device_id
Krzysztof Kozlowski [Fri, 1 May 2015 15:53:37 +0000 (00:53 +0900)]
iio: hid-sensor-rotation: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: hid-sensor-incl-3d: Constify platform_device_id
Krzysztof Kozlowski [Fri, 1 May 2015 15:53:36 +0000 (00:53 +0900)]
iio: hid-sensor-incl-3d: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: hid-sensor-magn-3d: Constify platform_device_id
Krzysztof Kozlowski [Fri, 1 May 2015 15:53:35 +0000 (00:53 +0900)]
iio: hid-sensor-magn-3d: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: light: hid-sensor-prox: Constify platform_device_id
Krzysztof Kozlowski [Fri, 1 May 2015 15:53:34 +0000 (00:53 +0900)]
iio: light: hid-sensor-prox: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: light: hid-sensor-als: Constify platform_device_id
Krzysztof Kozlowski [Fri, 1 May 2015 15:53:33 +0000 (00:53 +0900)]
iio: light: hid-sensor-als: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: hid-sensor-gyro-3d: Constify platform_device_id
Krzysztof Kozlowski [Fri, 1 May 2015 15:53:32 +0000 (00:53 +0900)]
iio: hid-sensor-gyro-3d: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: adc: axp288: Constify platform_device_id
Krzysztof Kozlowski [Fri, 1 May 2015 15:53:31 +0000 (00:53 +0900)]
iio: adc: axp288: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: hid-sensor-accel-3d: Constify platform_device_id
Krzysztof Kozlowski [Fri, 1 May 2015 15:53:30 +0000 (00:53 +0900)]
iio: hid-sensor-accel-3d: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: light: add support for ROHM BH1710/BH1715/BH1721/BH1750/BH1751 ambient light...
Tomasz Duszynski [Sun, 3 May 2015 18:37:21 +0000 (20:37 +0200)]
iio: light: add support for ROHM BH1710/BH1715/BH1721/BH1750/BH1751 ambient light sensors

Add support for ROHM BH1710/BH1715/BH1721/BH1750/BH1751 ambient light
sensors.

Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: make tools more cross-compilation friendly
Linus Walleij [Tue, 5 May 2015 08:42:12 +0000 (10:42 +0200)]
iio: make tools more cross-compilation friendly

When cross-compiling the IIO tools we need to opportunity to
specify a cross compiler prefix and some extra CFLAGS. This
patch enables this in the same way as for other stuff in
tools.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: magnetometer: Add ACPI support for MMC35240
Daniel Baluta [Fri, 24 Apr 2015 15:58:32 +0000 (18:58 +0300)]
iio: magnetometer: Add ACPI support for MMC35240

We assume that ACPI device tables use MMC35240 to
identify MEMSIC's 3 axis magnetic sensor.

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: magnetometer: mmc35240: Add PM sleep support
Daniel Baluta [Fri, 24 Apr 2015 15:58:31 +0000 (18:58 +0300)]
iio: magnetometer: mmc35240: Add PM sleep support

We rely on regmap to save the state of the registers at suspend,
and then we do an explicit sync at resume.

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: magnetometer: Add support for MEMSIC MMC35240 sensor
Daniel Baluta [Fri, 24 Apr 2015 15:58:30 +0000 (18:58 +0300)]
iio: magnetometer: Add support for MEMSIC MMC35240 sensor

Minimal implementation for MMC35240 3-axis magnetometer
sensor. It provides processed readings and possiblity to change
the sampling frequency.

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: magn: bmc150_magn: add oversampling ratio
Irina Tirdea [Wed, 29 Apr 2015 18:16:40 +0000 (21:16 +0300)]
iio: magn: bmc150_magn: add oversampling ratio

Export the oversampling ratio so that the user can change the
number of repetions for x/y/z axis.

The sampling frequency is limited by the oversampling ratio.
The available sampling frequencies might change depending
on the values of oversampling_ratio.

The specification can be downloaded from:
http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: core: Introduce IIO_CHAN_INFO_OVERSAMPLING_RATIO
Irina Tirdea [Wed, 29 Apr 2015 18:16:39 +0000 (21:16 +0300)]
iio: core: Introduce IIO_CHAN_INFO_OVERSAMPLING_RATIO

Some magnetometers can perform a number of repetitions in HW
for each measurement to increase accuracy. One example is
Bosch BMC150:
http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf.

Introduce an interface to set the oversampling ratio
for these devices.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: magn: bmc150_magn: Add devicetree binding documentation
Irina Tirdea [Wed, 29 Apr 2015 18:16:38 +0000 (21:16 +0300)]
iio: magn: bmc150_magn: Add devicetree binding documentation

Add binding documentation for Bosch BMC150 magnetometer.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: magn: Add support for BMC150 magnetometer
Irina Tirdea [Wed, 29 Apr 2015 18:16:37 +0000 (21:16 +0300)]
iio: magn: Add support for BMC150 magnetometer

Add support for the Bosh BMC150 Magnetometer.
The specification can be downloaded from:
http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf.
The chip contains both an accelerometer and a magnetometer.
This patch adds support only for the magnetometer part.

The temperature compensation formulas are based on bmm050_api.c
authored by contact@bosch.sensortec.com.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoStaging: iio: Allow compile test of GPIO consumers if !GPIOLIB
Geert Uytterhoeven [Tue, 5 May 2015 16:32:36 +0000 (18:32 +0200)]
Staging: iio: Allow compile test of GPIO consumers if !GPIOLIB

The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
appropriate.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: Allow compile test of GPIO consumers if !GPIOLIB
Geert Uytterhoeven [Tue, 5 May 2015 16:32:23 +0000 (18:32 +0200)]
iio: Allow compile test of GPIO consumers if !GPIOLIB

The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
appropriate.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: light: Add threshold interrupt support for STK3310
Tiberiu Breana [Mon, 27 Apr 2015 15:34:01 +0000 (18:34 +0300)]
iio: light: Add threshold interrupt support for STK3310

Added interrupt support for proximity threshold events
to the stk3310 driver.

Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: light: Add support for Sensortek STK3310
Tiberiu Breana [Mon, 27 Apr 2015 15:34:00 +0000 (18:34 +0300)]
iio: light: Add support for Sensortek STK3310

Minimal implementation of an IIO driver for the Sensortek
STK3310 ambient light and proximity sensor. The STK3311
model is also supported.

Includes:
- ACPI support;
- read_raw and write_raw;
- reading and setting configuration parameters for gain/scale
  and integration time for both ALS and PS.
- power management

Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoMerge tag 'iio-for-v4.2a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Sat, 9 May 2015 16:15:50 +0000 (18:15 +0200)]
Merge tag 'iio-for-v4.2a' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First round of new drivers, functionality and cleanups for the 4.2 cycle

New drivers / device support
* st sensors driver, lsm303dlh magnetometer support.
* ltr501 - support ltr301 and ltr559 chips.

New functionality
* IIO_CHAN_INFO_CALIBEMISSIVITY for thermopile sensors.
* kxcjk1013 - make driver operational with external trigger.
* Add iio targets to the tools Makefile.

Cleanups
* st sensors - more helpful error message if device id wrong or irq request
  fails, explicitly make the Block Data Update optional rather
  than relying on writes to address 0 not doing anything, make interrupt
  support optional (Not always wired, and not all devices actually have
  an interrupt line.)
* kxcjk-1013 white space additions for readability, add the KXCJ9000 ACPI
  id as seen in the wild.
* sx9500 - GPIO reset support, refactor the GPIO interrupt code, add power
  management, optimize power usage by powering down when possible, rename
  the gpio interrupt pin to be more useful, trivial return path simplification,
  trivial formatting fixes.
* isl29018 -  move towards ABI compliance with a view to moving this driver
  out of staging, add some brackets to ensure code works as expected.  Note
  there is no actual bug as the condition being tested is always true
  (with current devices).
* ltr501 - add regmap support to get caching etc for later patches,
  fix a parameter sanity check that always fails (bug introduced
  earlier in this series), ACPI enumeration support,
  interrupt rate control support, interrupt support in general and
  integration time control support, code alignment cleanups.
* mma9553 - a number of little cleanups following a review from Hartmut
  after I'd already applied the original driver patch.
* tmp006 - prefix some defines with TMP006 for consistency.
* tsl4531 - cleanup some wrong prefixes, presumably from copy and paste.
* mlx90614 - check for errors in read values, add power management,
  add emissivity setting, add device tree binding documentation,
  fix a duplicate const warning.
* ti_am335x_adc - refactor the DT parsing into a separate function.

9 years agostaging: unisys: uislib.h: Remove unused cache allocation prototypes
Jes Sorensen [Tue, 5 May 2015 22:37:16 +0000 (18:37 -0400)]
staging: unisys: uislib.h: Remove unused cache allocation prototypes

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchipset: Remove unused cache allocator
Jes Sorensen [Tue, 5 May 2015 22:37:15 +0000 (18:37 -0400)]
staging: unisys: visorchipset: Remove unused cache allocator

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove wrapper around parser_init_guts()
Jes Sorensen [Tue, 5 May 2015 22:37:14 +0000 (18:37 -0400)]
staging: unisys: Remove wrapper around parser_init_guts()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: parser_init_guts(): standard_payload_header is always false
Jes Sorensen [Tue, 5 May 2015 22:37:13 +0000 (18:37 -0400)]
staging: unisys: parser_init_guts(): standard_payload_header is always false

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: parser: Remove unused functions and mark others static
Jes Sorensen [Tue, 5 May 2015 22:37:12 +0000 (18:37 -0400)]
staging: unisys: parser: Remove unused functions and mark others static

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchipset: Declare parser_init_byte_stream() static
Jes Sorensen [Tue, 5 May 2015 22:37:11 +0000 (18:37 -0400)]
staging: unisys: visorchipset: Declare parser_init_byte_stream() static

In addition remove unused parser_init()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel: Make visorchannel_create take a gfp_t
Jes Sorensen [Tue, 5 May 2015 22:37:10 +0000 (18:37 -0400)]
staging: unisys: visorchannel: Make visorchannel_create take a gfp_t

This allows the caller to specify an appropriate GFP flag instead of
hardcoding the lowest common denominator.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove visorutil from top level Makefile
Benjamin Romer [Tue, 5 May 2015 22:37:09 +0000 (18:37 -0400)]
staging: unisys: remove visorutil from top level Makefile

The visorutil directory is still mentioned in the top level makefile for
the Unisys drivers, so remove it.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix visorbus Kconfig
Benjamin Romer [Tue, 5 May 2015 22:37:08 +0000 (18:37 -0400)]
staging: unisys: fix visorbus Kconfig

Removing visorutil made it impossible to build visorbus. Remove the config
setting from the Kconfig so the module can be enabled in the build.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: move periodic_work.c into the visorbus directory
Erik Arfvidson [Tue, 5 May 2015 22:37:07 +0000 (18:37 -0400)]
staging: unisys: move periodic_work.c into the visorbus directory

This patch removes visorutil directory, move periodic_work.c into
the visorbus directory.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove timskmod.h and procobjecttree.h
Erik Arfvidson [Tue, 5 May 2015 22:37:06 +0000 (18:37 -0400)]
staging: unisys: remove timskmod.h and procobjecttree.h

This patch move the needed linux include files from timskmod.h
to the files that calls those include. Also procobjecttree.h is
removed since it is dead code.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove charqueue.c
Erik Arfvidson [Tue, 5 May 2015 22:37:05 +0000 (18:37 -0400)]
staging: unisys: remove charqueue.c

This patch removes charqueue.[ch] since it no longer called

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: move timskmod.h functionality
Erik Arfvidson [Tue, 5 May 2015 22:37:04 +0000 (18:37 -0400)]
staging: unisys: move timskmod.h functionality

This patch removes all timksmod.h pound defines. It also removes
visorkmodutils.c since it no longer has any use by itself. Since
visorkmodutils.c is no longer needed the module_init for
visorchipset.c is modified to call visorutil_spar_detect directly
instead of the extern variable in timksmod.h.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: add ACPI and PCI requirement to Kconfig
Benjamin Romer [Tue, 5 May 2015 22:37:03 +0000 (18:37 -0400)]
staging: unisys: add ACPI and PCI requirement to Kconfig

Later patches will require PCI and ACPI support in the kernel, so add these
features to the Kconfig.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: add acpi pnp driver
Prarit Bhargava [Tue, 5 May 2015 22:37:02 +0000 (18:37 -0400)]
staging: unisys: add acpi pnp driver

According to Unisys, another OS detects the PNP0A07 as the auto load
device.  We can also do this in the linux kernel by simply converting the
driver over to the ACPI driver model.

Notes: This changes the usage of __init and it had to be removed from some
functions to avoid a !__init function calling an __init function.
Additionally I also cleaned up the headers in visorchipset.c since I was
adding a header file.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove BOOL,TRUE,FALSE definitions
Prarit Bhargava [Tue, 5 May 2015 22:37:01 +0000 (18:37 -0400)]
staging: unisys: remove BOOL,TRUE,FALSE definitions

These shouldn't be defined in the code and can be replaced with the
standard bool, true, and false usage that the kernel uses.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Finally remove the last remnants of memregion
Jes Sorensen [Tue, 5 May 2015 22:37:00 +0000 (18:37 -0400)]
staging: unisys: Finally remove the last remnants of memregion

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Eliminate visor_memregion_write()
Jes Sorensen [Tue, 5 May 2015 22:36:59 +0000 (18:36 -0400)]
staging: unisys: Eliminate visor_memregion_write()

visorchannel's signal code should call visorchannel_write() directly.
This is more consistent and cleaner, and allows us to remove the last
memregion call.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Eliminate visor_memregion_read()
Jes Sorensen [Tue, 5 May 2015 22:36:58 +0000 (18:36 -0400)]
staging: unisys: Eliminate visor_memregion_read()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel_create_guts(): Use visorchannel_read()
Jes Sorensen [Tue, 5 May 2015 22:36:57 +0000 (18:36 -0400)]
staging: unisys: visorchannel_create_guts(): Use visorchannel_read()

There is no benefit to calling visor_memregion_read() at this point.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel_write(): Handle partial channel_header writes
Jes Sorensen [Tue, 5 May 2015 22:36:56 +0000 (18:36 -0400)]
staging: unisys: visorchannel_write(): Handle partial channel_header writes

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel_read(): Use memcpy_fromio() directly
Jes Sorensen [Tue, 5 May 2015 22:36:55 +0000 (18:36 -0400)]
staging: unisys: visorchannel_read(): Use memcpy_fromio() directly

Note, this changes the behavior of visorchannel_read(). The old code
would return the channel header, if the offset argument was 0, and the
caller tried to read beyond the size of the visorchannel. Note this
only worked for offset == 0, but not for
(offset > 0) && (offset < header_size), which was inconsistent.

The new implementation returns an error if someone tries to read
beyond the visorchannel size.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel_write(): Use memcpy_toio() directly
Jes Sorensen [Tue, 5 May 2015 22:36:54 +0000 (18:36 -0400)]
staging: unisys: visorchannel_write(): Use memcpy_toio() directly

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: memregion: {un, }mapit() are no longer used
Jes Sorensen [Tue, 5 May 2015 22:36:53 +0000 (18:36 -0400)]
staging: unisys: memregion: {un, }mapit() are no longer used

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: memregion: Eliminate visor_memregion_get_*() functions
Jes Sorensen [Tue, 5 May 2015 22:36:52 +0000 (18:36 -0400)]
staging: unisys: memregion: Eliminate visor_memregion_get_*() functions

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: memregion: Eliminate visor_memregion_resize()
Jes Sorensen [Tue, 5 May 2015 22:36:51 +0000 (18:36 -0400)]
staging: unisys: memregion: Eliminate visor_memregion_resize()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: memregion: Eliminate visor_memregion_destroy()
Jes Sorensen [Tue, 5 May 2015 22:36:50 +0000 (18:36 -0400)]
staging: unisys: memregion: Eliminate visor_memregion_destroy()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Eliminate visor_memregion_create()
Jes Sorensen [Tue, 5 May 2015 22:36:49 +0000 (18:36 -0400)]
staging: unisys: Eliminate visor_memregion_create()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: get rid of serialloopbacktest
David Kershner [Tue, 5 May 2015 22:36:48 +0000 (18:36 -0400)]
staging: unisys: get rid of serialloopbacktest

serialloopbacktest is no longer supported. Get rid of it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: cleanup and align iochannel.h comments
Erik Arfvidson [Tue, 5 May 2015 22:36:47 +0000 (18:36 -0400)]
staging: unisys: cleanup and align iochannel.h comments

This patch reorganizes, aligns, and corrects grammar mistakes on
comments.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove unused #define in iochannel.h
Erik Arfvidson [Tue, 5 May 2015 22:36:46 +0000 (18:36 -0400)]
staging: unisys: remove unused #define in iochannel.h

This patch simply remove all unused #define's in iochannel.h

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove unused chipset feature PCIVBUS
Erik Arfvidson [Tue, 5 May 2015 22:36:45 +0000 (18:36 -0400)]
staging: unisys: remove unused chipset feature PCIVBUS

This patch removes unused chipset feature
ULTRA_CHIPSET_FEATURE_PCIVBUS

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove unused CONTROLVM_CHIPSET_SHUTDOWN
Erik Arfvidson [Tue, 5 May 2015 22:36:44 +0000 (18:36 -0400)]
staging: unisys: remove unused CONTROLVM_CHIPSET_SHUTDOWN

this patch removes unused chipset command on the guest
CONTROLVM_CHIPSET_SHUTDOWN

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove unused device_map and guest_devices struct
Erik Arfvidson [Tue, 5 May 2015 22:36:43 +0000 (18:36 -0400)]
staging: unisys: remove unused device_map and guest_devices struct

This patch removes unused struct in the controlvm_channel message
and replaces it with a char reserved inorder to mantain same
message size.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: controlvmchannel.h comment aligment and cleanup
Erik Arfvidson [Tue, 5 May 2015 22:36:42 +0000 (18:36 -0400)]
staging: unisys: controlvmchannel.h comment aligment and cleanup

This patch is a comment aligment and cleanup for
controlvmchannel.h.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: rename variable to reserverd since it is unused
Erik Arfvidson [Tue, 5 May 2015 22:36:41 +0000 (18:36 -0400)]
staging: unisys: rename variable to reserverd since it is unused

This patch renames send_irq_handle to reserved1 since this variable
is unused in the guest side.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove unused CONTROL_VM messages from enum
Erik Arfvidson [Tue, 5 May 2015 22:36:40 +0000 (18:36 -0400)]
staging: unisys: remove unused CONTROL_VM messages from enum

This patch removes CONTROL_VM  disk messages from enum since they
are completely unused.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove server crust from visorchipset.
David Kershner [Tue, 5 May 2015 22:36:39 +0000 (18:36 -0400)]
staging: unisys: remove server crust from visorchipset.

The visorchipset driver originally serviced both servers and
clients. This implementation is client only so remove some
more server side implementation.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove unused #define MAX_SERIAL_NUM
Erik Arfvidson [Tue, 5 May 2015 22:36:38 +0000 (18:36 -0400)]
staging: unisys: remove unused #define MAX_SERIAL_NUM

This patch simply removes #define MAX_SERIAL_NUM from iochannel.h

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove unused #define in controlvmchannel
Erik Arfvidson [Tue, 5 May 2015 22:36:37 +0000 (18:36 -0400)]
staging: unisys: remove unused #define in controlvmchannel

This patch remove unused controlvmchannel.h #defines

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove unused enum from controlvmchannel.h
Erik Arfvidson [Tue, 5 May 2015 22:36:36 +0000 (18:36 -0400)]
staging: unisys: remove unused enum from controlvmchannel.h

This patch removes this enum since it is unused

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove typedef GUEST_PHYSICAL_ADDRESS to u64
Erik Arfvidson [Tue, 5 May 2015 22:36:35 +0000 (18:36 -0400)]
staging: unisys: remove typedef GUEST_PHYSICAL_ADDRESS to u64

This patch removes typedef GUEST_PHYSICAL_ADDRESS to u64

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Eliminate unused visorchannel_dump_section()
Jes Sorensen [Tue, 5 May 2015 22:36:34 +0000 (18:36 -0400)]
staging: unisys: Eliminate unused visorchannel_dump_section()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel_get_memregion() isn't used
Jes Sorensen [Tue, 5 May 2015 22:36:33 +0000 (18:36 -0400)]
staging: unisys: visorchannel_get_memregion() isn't used

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: memregion: Embed memregion in struct channel
Jes Sorensen [Tue, 5 May 2015 22:36:32 +0000 (18:36 -0400)]
staging: unisys: memregion: Embed memregion in struct channel

This changes the API for visor_memregion_create() to require a
pre-allocated struct memregion. Embedding this in struct channel
avoids a layer of additional kmalloc()'s and error checks.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: memregion: move struct memregion to memregion.h
Jes Sorensen [Tue, 5 May 2015 22:36:31 +0000 (18:36 -0400)]
staging: unisys: memregion: move struct memregion to memregion.h

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: decouple visor_memregion_{read, write}()
Jes Sorensen [Tue, 5 May 2015 22:36:30 +0000 (18:36 -0400)]
staging: unisys: decouple visor_memregion_{read, write}()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel_clear(): No need to use vmalloc here
Jes Sorensen [Tue, 5 May 2015 22:36:29 +0000 (18:36 -0400)]
staging: unisys: visorchannel_clear(): No need to use vmalloc here

Using a page is sufficient, and avoids the cost of vmalloc/vfree

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel_clear(): Avoid 64KB memory leak
Jes Sorensen [Tue, 5 May 2015 22:36:28 +0000 (18:36 -0400)]
staging: unisys: visorchannel_clear(): Avoid 64KB memory leak

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchipset.c: No need to include memregion.h anymore
Jes Sorensen [Tue, 5 May 2015 22:36:27 +0000 (18:36 -0400)]
staging: unisys: visorchipset.c: No need to include memregion.h anymore

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchipset: Use ioremap direction rather than heavy visor_memregion
Jes Sorensen [Tue, 5 May 2015 22:36:26 +0000 (18:36 -0400)]
staging: unisys: visorchipset: Use ioremap direction rather than heavy visor_memregion

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchipset: parser_init_guts(): Localize memregion usage
Jes Sorensen [Tue, 5 May 2015 22:36:25 +0000 (18:36 -0400)]
staging: unisys: visorchipset: parser_init_guts(): Localize memregion usage

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: memregion: Eliminate unnecessary 'requested' flag
Jes Sorensen [Tue, 5 May 2015 22:36:24 +0000 (18:36 -0400)]
staging: unisys: memregion: Eliminate unnecessary 'requested' flag

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: memregion: Use proper errno for mapit()
Jes Sorensen [Tue, 5 May 2015 22:36:23 +0000 (18:36 -0400)]
staging: unisys: memregion: Use proper errno for mapit()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: memregion: Nothing uses overlap allocations, so nuke it
Jes Sorensen [Tue, 5 May 2015 22:36:22 +0000 (18:36 -0400)]
staging: unisys: memregion: Nothing uses overlap allocations, so nuke it

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorbus: visorchannel_create_guts() always has parent == NULL
Jes Sorensen [Tue, 5 May 2015 22:36:21 +0000 (18:36 -0400)]
staging: unisys: visorbus: visorchannel_create_guts() always has parent == NULL

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel: visorchannel_create_overlap() is never used
Jes Sorensen [Tue, 5 May 2015 22:36:20 +0000 (18:36 -0400)]
staging: unisys: visorchannel: visorchannel_create_overlap() is never used

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>