firefly-linux-kernel-4.4.55.git
9 years agoiio: adis16260: Add ADIS16266 support
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:18 +0000 (15:38 +0200)]
iio: adis16260: Add ADIS16266 support

The ADIS16266 is mostly register compatible to the ADIS16260. The
difference is a different gyroscope scale factor as well not having the
relative angular displacement channel.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: adis16400: Add ADIS16305 support
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:17 +0000 (15:38 +0200)]
iio: adis16400: Add ADIS16305 support

The ADIS16305 is fully register map compatible to the ADIS16300.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: adis16400: adis16300 has product ID and serial number
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:16 +0000 (15:38 +0200)]
iio: adis16400: adis16300 has product ID and serial number

The ADIS16300 has the product ID and serial number registers, they are just
not documented. Set the appropriate flags so the driver makes use of them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: adis16480: Fix scale factors
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:15 +0000 (15:38 +0200)]
iio: adis16480: Fix scale factors

The different devices support by the adis16480 driver have slightly
different scales for the gyroscope and accelerometer channels.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: Add inverse unit conversion macros
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:14 +0000 (15:38 +0200)]
iio: Add inverse unit conversion macros

Add inverse unit conversion macro to convert from standard IIO units to
units that might be used by some devices.

Those are useful in combination with scale factors that are specified as
IIO_VAL_FRACTIONAL. Typically the denominator for those specifications will
contain the maximum raw value the sensor will generate and the numerator
the value it maps to in a specific unit. Sometimes datasheets specify those
in different units than the standard IIO units (e.g. degree/s instead of
rad/s) and so we need to do a unit conversion.

From a mathematical point of view it does not make a difference whether we
apply the unit conversion to the numerator or the inverse unit conversion
to the denominator since (x / y) / z = x / (y * z). But as the denominator
is typically a larger value and we are rounding both the numerator and
denominator to integer values using the later method gives us a better
precision (E.g. the relative error is smaller if we round 8000.3 to 8000
rather than rounding 8.3 to 8).

This is where in inverse unit conversion macros will be used.

Marked for stable as used by some upcoming fixes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: adis16400: Fix adis16448 gyroscope scale
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:13 +0000 (15:38 +0200)]
iio: adis16400: Fix adis16448 gyroscope scale

Use the correct scale for the adis16448 gyroscope output.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: trigger: Add missing fields in kernel docs
Cristina Opriceana [Thu, 6 Aug 2015 11:56:02 +0000 (14:56 +0300)]
iio: trigger: Add missing fields in kernel docs

Fix kernel docs warnings by adding the missing description
for each of the existing function parameters.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: Documentation: Add trigger name attribute ABI documentation
Cristina Opriceana [Thu, 6 Aug 2015 11:17:53 +0000 (14:17 +0300)]
iio: Documentation: Add trigger name attribute ABI documentation

This patch adds an entry in ABI Documentation for the name attribute
issued when a trigger is created.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoDocBook: Add initial documentation for IIO
Daniel Baluta [Tue, 4 Aug 2015 14:20:08 +0000 (17:20 +0300)]
DocBook: Add initial documentation for IIO

This is intended to help developers faster find their way
inside the Industrial I/O core and reduce time spent on IIO
drivers development.

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Acked-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: declare struct to fix warning
Pengyu Ma [Tue, 4 Aug 2015 08:32:18 +0000 (16:32 +0800)]
iio: declare struct to fix warning

When compile iio related driver the following warning shown:

include/linux/iio/trigger.h:35:34: warning: 'struct iio_trigger'
declared inside parameter list
  int (*set_trigger_state)(struct iio_trigger *trig, bool state);

include/linux/iio/trigger.h:38:18: warning: 'struct iio_dev'
declared inside parameter list
           struct iio_dev *indio_dev);

'struct iio_dev' and 'struct iio_trigger' was used before declaration,
forward declaration for these structs to fix warning.

Signed-off-by: Pengyu Ma <pengyu.ma@windriver.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:accel:stk8312: drop local buffer
Hartmut Knaack [Wed, 29 Jul 2015 21:39:40 +0000 (23:39 +0200)]
iio:accel:stk8312: drop local buffer

Drop the local buffer in stk8312_trigger_handler() and use data->buffer
instead for bulk reads.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:accel:stk8312: code style cleanup
Hartmut Knaack [Wed, 29 Jul 2015 21:39:39 +0000 (23:39 +0200)]
iio:accel:stk8312: code style cleanup

Adjust some indentation issues to make checkpatch.pl happy in strict mode.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:accel:stk8312: use appropriate variable types
Hartmut Knaack [Wed, 29 Jul 2015 21:39:38 +0000 (23:39 +0200)]
iio:accel:stk8312: use appropriate variable types

Adapt some variable types to reduce unnecessary casting.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:accel:stk8312: rework macro definitions
Hartmut Knaack [Wed, 29 Jul 2015 21:39:37 +0000 (23:39 +0200)]
iio:accel:stk8312: rework macro definitions

Make use of BIT to describe register bits, GENMASK for consecutive
bitmasks, rename and sort existing definitions, replace magic value with
an expressive definition, drop an unused definition.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:accel:stk8312: improve error handling
Hartmut Knaack [Wed, 29 Jul 2015 21:39:36 +0000 (23:39 +0200)]
iio:accel:stk8312: improve error handling

Improve error handling in the following ways:
  - set return value on error condition to an appropriate error code
  - return error code immediately in case of an error (slightly changes
    code structure)
  - pass up real error code
  - add missing error handling
  - return 0 when error have been caught already
  - put device back in active mode after error occurs

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:accel:stk8312: check for invalid value
Hartmut Knaack [Mon, 27 Jul 2015 22:49:22 +0000 (00:49 +0200)]
iio:accel:stk8312: check for invalid value

Revision 1.2 of the datasheet recommends on page 22 to only write non-zero
values read from OTP register 0x70 into AFECTRL register.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:accel:stk8312: add triggered buffer dependency
Hartmut Knaack [Mon, 27 Jul 2015 22:49:21 +0000 (00:49 +0200)]
iio:accel:stk8312: add triggered buffer dependency

Add the still missing dependencies for triggered buffer support.

Fixes: 95c12bba51c37 ("iio: accel: Add buffer mode for Sensortek STK8312")
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:adc:berlin2-adc: use channel-array size directly
Hartmut Knaack [Mon, 27 Jul 2015 22:39:02 +0000 (00:39 +0200)]
iio:adc:berlin2-adc: use channel-array size directly

Drop the otherwise unused definition of the channel-array size and use it
directly in _probe - makes it a bit more obvious.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:adc:berlin2-adc: use short operator format
Hartmut Knaack [Mon, 27 Jul 2015 22:39:01 +0000 (00:39 +0200)]
iio:adc:berlin2-adc: use short operator format

Use augmented assignment to subtract the offset for negative temperature
values.
Specify the amount of private data to be allocated through
devm_iio_device_alloc() with sizeof(*priv), as it is shorter and common
practice in IIO.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:adc:berlin2-adc: constify iio_chan_spec
Hartmut Knaack [Mon, 27 Jul 2015 22:39:00 +0000 (00:39 +0200)]
iio:adc:berlin2-adc: constify iio_chan_spec

Mark berlin2_adc_channels array as constant.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:adc:berlin2-adc: pass up real error code
Hartmut Knaack [Mon, 27 Jul 2015 22:38:58 +0000 (00:38 +0200)]
iio:adc:berlin2-adc: pass up real error code

Pass up the real error code returned by platform_get_irq_byname().

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agotools: iio: iio_utils: Make calc_digits static
Joo Aun Saw [Tue, 28 Jul 2015 01:46:13 +0000 (11:46 +1000)]
tools: iio: iio_utils: Make calc_digits static

Signed-off-by: Joo Aun Saw <jasaw@dius.com.au>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agotools: iio: iio_utils: remove unnecessary define guard
Joo Aun Saw [Tue, 28 Jul 2015 15:12:24 +0000 (01:12 +1000)]
tools: iio: iio_utils: remove unnecessary define guard

Signed-off-by: Joo Aun Saw <jasaw@dius.com.au>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agotools: iio: print error message when buffer enable fails
Irina Tirdea [Fri, 24 Jul 2015 13:28:06 +0000 (16:28 +0300)]
tools: iio: print error message when buffer enable fails

Running generic_buffer without enabling any channel of the
sensor will fail without printing any error message.

Add an error message that indicates buffer enable failed.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agotools: iio: fix mask for 32 bit sensor data
Irina Tirdea [Fri, 24 Jul 2015 13:28:05 +0000 (16:28 +0300)]
tools: iio: fix mask for 32 bit sensor data

When the the sensor data uses 32 bits out of 32, generic_buffer prints
the value 0 for all data read.

In this case, the mask is shifted 32 bits, which is beyond the size of
an integer. This will lead to the mask always being 0. Before printing,
the mask is applied to the raw value, thus generating a final value of 0.

Fix the mask by shifting a 64 bit value instead of an integer.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoinclude: linux: iio: Add missing kernel doc field
Cristina Opriceana [Fri, 24 Jul 2015 13:26:09 +0000 (16:26 +0300)]
include: linux: iio: Add missing kernel doc field

Fix kernel doc for the iio_dev_attr structure by adding its missing field.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoinclude: linux: iio: Fix function parameter name in kernel doc
Cristina Opriceana [Fri, 24 Jul 2015 13:23:43 +0000 (16:23 +0300)]
include: linux: iio: Fix function parameter name in kernel doc

Fix buffer name from kernel doc according to the function parameter.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: event: Add missing fields in kernel docs
Cristina Opriceana [Fri, 24 Jul 2015 13:21:50 +0000 (16:21 +0300)]
iio: event: Add missing fields in kernel docs

Fix kernel docs warnings by adding the missing fields,
each with its associated description.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: buffer: Fix kernel docs warnings
Cristina Opriceana [Fri, 24 Jul 2015 13:18:09 +0000 (16:18 +0300)]
iio: buffer: Fix kernel docs warnings

Fix kernel docs for structures and functions in order to
remove some warnings when the documentation gets generated.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: core: Add function params for kernel docs
Cristina Opriceana [Fri, 24 Jul 2015 13:16:19 +0000 (16:16 +0300)]
iio: core: Add function params for kernel docs

This patch adds the missing fields in kernel docs to remove
some warnings that appear when the IIO Documentation DocBook
is generated.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: magn: bmc150_magn: do not set power state twice when setting trigger state
Irina Tirdea [Thu, 23 Jul 2015 17:15:02 +0000 (20:15 +0300)]
iio: magn: bmc150_magn: do not set power state twice when setting trigger state

When setting the trigger state, the device power state is set through
buffer preenable and postdisable hooks. There is no need
to also set it in the trigger set state call.

Remove duplicate set power state from the trigger set
state call.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: magn: bmc150_magn: add locking comment for runtime resume
Irina Tirdea [Thu, 23 Jul 2015 17:15:01 +0000 (20:15 +0300)]
iio: magn: bmc150_magn: add locking comment for runtime resume

Runtime resume function is called with the data->mutex lock held.
Add a comment to indicate this.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:magnetometer:bmc150_magn: use descriptive name for mask
Hartmut Knaack [Fri, 17 Jul 2015 08:52:31 +0000 (10:52 +0200)]
iio:magnetometer:bmc150_magn: use descriptive name for mask

Define and use a descriptive name for the repetition registers data mask,
instead of a 'magic' value.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:magnetometer:bmc150_magn: expand mutex in trigger_handler
Hartmut Knaack [Fri, 17 Jul 2015 08:52:30 +0000 (10:52 +0200)]
iio:magnetometer:bmc150_magn: expand mutex in trigger_handler

Keep the mutex locked, until the content of data->buffer has been pushed
out.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: mlx90614: Define magic numbers
Crt Mori [Mon, 20 Jul 2015 19:38:27 +0000 (21:38 +0200)]
iio: mlx90614: Define magic numbers

Translates the magic constant numbers to named macros and add some
additional comments about their meaning.

The diff is made towards togreg branch as that branch seems to have the
most recent updates of mlx90614 driver (many are yet to be merged).

Signed-off-by: Crt Mori <cmo@melexis.com>
Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: mmc35240: minor change to improve code readibility
Teodora Baluta [Fri, 31 Jul 2015 14:27:24 +0000 (17:27 +0300)]
iio: mmc35240: minor change to improve code readibility

This patch changes two variables to arrays to improve code readibility.

Signed-off-by: Teodora Baluta <teodora.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: Export OF module alias information in missing drivers
Javier Martinez Canillas [Thu, 30 Jul 2015 16:18:42 +0000 (18:18 +0200)]
iio: Export OF module alias information in missing drivers

The I2C core always reports the MODALIAS uevent as "i2c:<client name"
regardless if the driver was matched using the I2C id_table or the
of_match_table. So technically there's no need for a driver to export
the OF table since currently it's not used.

In fact, the I2C device ID table is mandatory for I2C drivers since
a i2c_device_id is passed to the driver's probe function even if the
I2C core used the OF table to match the driver.

And since the I2C core uses different tables, OF-only drivers needs to
have duplicated data that has to be kept in sync and also the dev node
compatible manufacturer prefix is stripped when reporting the MODALIAS.

To avoid the above, the I2C core behavior may be changed in the future
to not require an I2C device table for OF-only drivers and report the
OF module alias. So, it's better to also export the OF table to prevent
breaking module autoloading if that happens.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: Export I2C module alias information in missing drivers
Javier Martinez Canillas [Thu, 30 Jul 2015 16:18:28 +0000 (18:18 +0200)]
iio: Export I2C module alias information in missing drivers

The I2C core always reports the MODALIAS uevent as "i2c:<client name"
regardless if the driver was matched using the I2C id_table or the
of_match_table. So the driver needs to export the I2C table and this
be built into the module or udev won't have the necessary information
to auto load the correct module when the device is added.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agotools: iio: make scale and offset files optional
Joo Aun Saw [Thu, 23 Jul 2015 02:53:47 +0000 (12:53 +1000)]
tools: iio: make scale and offset files optional

Make scale and offset optional by adding -ENOENT check as not all
drivers implement them.

Signed-off-by: Joo Aun Saw <jasaw@dius.com.au>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: st-magn: add support for lsm303agr magnetometer
Giuseppe Barba [Tue, 21 Jul 2015 08:35:45 +0000 (10:35 +0200)]
iio: st-magn: add support for lsm303agr magnetometer

This adds support for the lsm303agr magnetometer.

Signed-off-by: Giuseppe Barba <giuseppe.barba@st.com>
Acked-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: st-accel: add support for lsm303agr accelerometer
Giuseppe Barba [Tue, 21 Jul 2015 08:35:44 +0000 (10:35 +0200)]
iio: st-accel: add support for lsm303agr accelerometer

This adds support for the lsm303agr accelerometer.

Signed-off-by: Giuseppe Barba <giuseppe.barba@st.com>
Acked-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: st_magn: Add irq trigger handling
Giuseppe Barba [Tue, 21 Jul 2015 08:35:43 +0000 (10:35 +0200)]
iio: st_magn: Add irq trigger handling

Add irq trigger handling for magnetometer also

Signed-off-by: Giuseppe Barba <giuseppe.barba@st.com>
Acked-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: st-sensors: add support for single full scale device
Giuseppe Barba [Tue, 21 Jul 2015 08:35:42 +0000 (10:35 +0200)]
iio: st-sensors: add support for single full scale device

Some sensors could have only one full scale value. This means that the
sensor hasn't a full scale register. This commit add a check on the
configured full scale address to support such kind of sensors.

Signed-off-by: Giuseppe Barba <giuseppe.barba@st.com>
Acked-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: st-sensors: add configuration for WhoAmI address
Giuseppe Barba [Tue, 21 Jul 2015 08:35:41 +0000 (10:35 +0200)]
iio: st-sensors: add configuration for WhoAmI address

This patch permits to configure the WhoAmI register address
because some device could have not a standard address for
this register.

Signed-off-by: Giuseppe Barba <giuseppe.barba@st.com>
Reviewed-by: Denis Ciocca <denis.ciocca@st.com>
Acked-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: fix drivers that consider 0 as a valid IRQ in client->irq
Octavian Purdila [Fri, 5 Jun 2015 13:59:42 +0000 (16:59 +0300)]
iio: fix drivers that consider 0 as a valid IRQ in client->irq

Since patch "i2c / ACPI: Use 0 to indicate that device does not have
interrupt assigned" [1], 0 is not a valid i2c client irq anymore, so
change all driver's checks accordingly.

The same issue occurs when the device is instantiated via device tree
with no IRQ, or from the i2c sysfs interface, even before the patch
above.

[1] http://lkml.kernel.org/g/<1430908148-201129-3-git-send-email-mika.westerberg@linux.intel.com>

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agotools: iio: Send error messages to stderr
Cristina Opriceana [Fri, 17 Jul 2015 15:43:42 +0000 (18:43 +0300)]
tools: iio: Send error messages to stderr

This patch indends to make some cleanup and send printf
error messages to stderr. The changes were performed with coccinelle
for failure messages and manual for other cases, such as wrong usage
messages.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agotools: iio: Add ARRAY_SIZE macro
Cristina Opriceana [Mon, 13 Jul 2015 13:20:11 +0000 (16:20 +0300)]
tools: iio: Add ARRAY_SIZE macro

Calculation of the length of an array can be done with the ARRAY_SIZE
macro to make code more abstract and remove the associated
checkpatch.pl warning.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agotools: iio: Remove unnecessary braces
Cristina Opriceana [Mon, 13 Jul 2015 13:17:47 +0000 (16:17 +0300)]
tools: iio: Remove unnecessary braces

Single statement blocks don’t need braces.
Found with checkpatch.pl.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agotools: iio: Remove explicit NULL comparison
Cristina Opriceana [Mon, 13 Jul 2015 13:15:56 +0000 (16:15 +0300)]
tools: iio: Remove explicit NULL comparison

Remove explicit NULL comparison and write it in its simpler form as
recommended by checkpatch.pl.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: light: Add support for TXC PA12 als and proximity sensor
Adriana Reus [Tue, 7 Jul 2015 11:07:13 +0000 (14:07 +0300)]
iio: light: Add support for TXC PA12 als and proximity sensor

Add support for TXC PA12203001 als and proximity sensor.
Support for raw illuminance and proximity readings.

Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: light: add support for TI's opt3001 light sensor
Andreas Dannenberg [Thu, 2 Jul 2015 22:27:58 +0000 (17:27 -0500)]
iio: light: add support for TI's opt3001 light sensor

TI's opt3001 light sensor is a simple and yet powerful
little device. The device provides 99% IR rejection,
automatic full-scale, very low power consumption and
measurements from 0.01 to 83k lux.

This patch adds support for that device using the IIO
framework.

See http://www.ti.com/product/opt3001 for more information.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: dht11: Use new function ktime_get_resolution_ns()
Harald Geyer [Tue, 7 Jul 2015 13:39:31 +0000 (13:39 +0000)]
iio: dht11: Use new function ktime_get_resolution_ns()

This cleans up the most ugly workaround in this driver. There are no
functional changes yet in the decoding algorithm, but we improve the
following things:
 * Get rid of spurious warning messages on systems with fast HRTIMER.
 * If the clock is not fast enough for decoding to work, we give
   up immediately.
 * In that case we return EAGAIN instead of EIO, so it's easier to
   discriminate causes of failure.

Returning EAGAIN is somewhat controversial: It's technically correct
as a faster clock might become available. OTOH once all clocks are
enabled this is a permanent error. There is no ECLOCKTOOSLOW error
code.

Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: dht11: avoid multiple assignments to make checkpatch.pl --strict happy
Harald Geyer [Tue, 7 Jul 2015 13:39:30 +0000 (13:39 +0000)]
iio: dht11: avoid multiple assignments to make checkpatch.pl --strict happy

We just do the assignments in two steps.

Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: dht11: add comment to make checkpatch.pl --strict happy
Harald Geyer [Tue, 7 Jul 2015 13:39:29 +0000 (13:39 +0000)]
iio: dht11: add comment to make checkpatch.pl --strict happy

Explain why the driver needs a mutex.

Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: dht11: whitespace changes to make checkpatch.pl --strict happy
Harald Geyer [Tue, 7 Jul 2015 13:39:28 +0000 (13:39 +0000)]
iio: dht11: whitespace changes to make checkpatch.pl --strict happy

* add spaces around binary operators in cases where it reduces readability
* align multiline statements around opening parenthesis

Reported-by: Hartmut Knaack <knaack.h@gmx.de>
in Message-ID: <55919E72.3010807@gmx.de>

Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: adc: vf610: Determine sampling frequencies by using minimum sample time
Sanchayan Maity [Tue, 14 Jul 2015 13:53:22 +0000 (19:23 +0530)]
iio: adc: vf610: Determine sampling frequencies by using minimum sample time

The driver currently does not take into account the minimum sample time
as per the Figure 6-8 Chapter 9.1.1 12-bit ADC electrical characteristics.
We set a static amount of cycles instead of considering the sample time
as a given value, which depends on hardware characteristics.

Determine sampling frequencies by first reading the device tree property
node and then calculating the required Long Sample Time Adder (LSTAdder)
value, based on the ADC clock frequency and sample time value obtained
from the device tree. This LSTAdder value is then used for calculating
the sampling frequencies possible.

In case the sample time property is not specified through the device
tree, a safe default value of 1000ns is assumed.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Acked-by: Stefan Agner <stefan@agner.ch>
Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: adc: mcp320x: Add support for mcp3301
Andrea Galbusera [Tue, 14 Jul 2015 13:36:21 +0000 (15:36 +0200)]
iio: adc: mcp320x: Add support for mcp3301

This adds support for Microchip's 13 bit 1 channel AD converter MCP3301

Signed-off-by: Andrea Galbusera <gizero@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:magnetometer:bmc150_magn: replace magic value
Hartmut Knaack [Fri, 17 Jul 2015 08:52:27 +0000 (10:52 +0200)]
iio:magnetometer:bmc150_magn: replace magic value

Construct the scanmask using its descriptive axis names (as used in
iio_chan_spec) instead of a 'magic' value.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: magnetometer: mmc35240: Add DT binding doc
Jandy Gou [Fri, 17 Jul 2015 08:34:36 +0000 (16:34 +0800)]
iio: magnetometer: mmc35240: Add DT binding doc

Signed-off-by: Jandy Gou <qingsong.gou@ck-telecom.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: magnetometer: mmc35240: Add DT binding
Jandy Gou [Fri, 17 Jul 2015 08:34:35 +0000 (16:34 +0800)]
iio: magnetometer: mmc35240: Add DT binding

Signed-off-by: Jandy Gou <qingsong.gou@ck-telecom.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio:light:acpi-als: add missing prefixes
Hartmut Knaack [Fri, 17 Jul 2015 22:56:57 +0000 (00:56 +0200)]
iio:light:acpi-als: add missing prefixes

Some macros and a function were missing the acpi_als_ prefix, so add it.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: mxs-lradc: add datasheet name for every usable channel
Stefan Wahren [Sat, 18 Jul 2015 12:30:46 +0000 (12:30 +0000)]
iio: mxs-lradc: add datasheet name for every usable channel

In order to provide a channel name to in kernel consumers add the
datasheet names for every usable AD channel. Since the channel names
differ between i.MX23 and i.MX28, we need to separate the channel
specs.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: mxs-lradc: reorder header includes
Stefan Wahren [Sat, 18 Jul 2015 12:30:45 +0000 (12:30 +0000)]
iio: mxs-lradc: reorder header includes

This patch reorder the header includes alphabetically.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: mxs-lradc: remove unnecessary header includes
Stefan Wahren [Sat, 18 Jul 2015 12:30:44 +0000 (12:30 +0000)]
iio: mxs-lradc: remove unnecessary header includes

This patch removes the unnecessary header includes.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: mxs-lradc: add missing include
Stefan Wahren [Sat, 18 Jul 2015 12:30:43 +0000 (12:30 +0000)]
iio: mxs-lradc: add missing include

This patch adds the missing include for mutex handling.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: mxs-lradc: fix some spelling errors
Stefan Wahren [Sat, 18 Jul 2015 12:30:42 +0000 (12:30 +0000)]
iio: mxs-lradc: fix some spelling errors

This patch fix some spelling errors in the comments.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: mxs-lradc: clarify supported devices
Stefan Wahren [Sat, 18 Jul 2015 12:30:41 +0000 (12:30 +0000)]
iio: mxs-lradc: clarify supported devices

At the beginning the driver supported only i.MX28 SoC, but now the
whole MXS platform. So remove any confusing comments which apply
only to i.MX28.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: Documentation: Remove bytes_per_datum attribute
Cristina Opriceana [Sat, 18 Jul 2015 22:33:55 +0000 (01:33 +0300)]
iio: Documentation: Remove bytes_per_datum attribute

Remove sysfs bytes_per_datum device attribute ABI documentation
since the attribute is not present anymore.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging: dgap: remove duplicate code
Sudip Mukherjee [Thu, 16 Jul 2015 12:58:20 +0000 (18:28 +0530)]
staging: dgap: remove duplicate code

Remove the duplicate code of dgap_remove_one() and dgap_stop().

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: new arguments to dgap_stop
Sudip Mukherjee [Thu, 16 Jul 2015 12:58:19 +0000 (18:28 +0530)]
staging: dgap: new arguments to dgap_stop

In a later patch we will remove the duplicate codes. But the code also
needs to execute dgap_remove_driver_sysfiles() if it is being called
from dgap_remove_one() but if being called fron the error path of the
dgap_init_module() then the sysfiles should not be removed.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: rearrange function
Sudip Mukherjee [Thu, 16 Jul 2015 12:58:18 +0000 (18:28 +0530)]
staging: dgap: rearrange function

Relocate the function dgap_stop() so that in a later patch we can remove
the duplicate codes between dgap_stop() and dgap_remove_one().

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: fix error path
Sudip Mukherjee [Thu, 16 Jul 2015 12:58:17 +0000 (18:28 +0530)]
staging: dgap: fix error path

The code in dgap_stop() is almost a duplicate of the code that will be
executed on pci_unregister_driver(). So the error code was stopping and
unregistering everything twice.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove unneeded ret
Sudip Mukherjee [Thu, 16 Jul 2015 11:28:12 +0000 (16:58 +0530)]
staging: rtl8188eu: remove unneeded ret

The variable ret was always 0. So remove the variable and always
return 0 from the function.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: stop using DBG_88E
Sudip Mukherjee [Thu, 16 Jul 2015 11:28:11 +0000 (16:58 +0530)]
staging: rtl8188eu: stop using DBG_88E

Stop using DBG_88E which is a custom macro for printing debugging
messages. Instead start using pr_debug and in the process define
pr_fmt.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove unneeded variable
Sudip Mukherjee [Thu, 16 Jul 2015 11:28:10 +0000 (16:58 +0530)]
staging: rtl8188eu: remove unneeded variable

The default value of status was _FAIL, it was only changed if kzalloc
succeeds and the check for status is immediately following kzalloc. We
can have the failure code in the else part as the failure code will be
executed only if kzalloc fails.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove goto label
Sudip Mukherjee [Thu, 16 Jul 2015 11:28:09 +0000 (16:58 +0530)]
staging: rtl8188eu: remove goto label

By checking for the success of kzalloc we were able to remove the goto
label thus making the code more readable.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove redundant NULL check
Sudip Mukherjee [Thu, 16 Jul 2015 11:28:08 +0000 (16:58 +0530)]
staging: rtl8188eu: remove redundant NULL check

The check for pstat and pdvobjpriv is not required here as we have
already checked for them before.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove unused function
Sudip Mukherjee [Thu, 16 Jul 2015 11:28:07 +0000 (16:58 +0530)]
staging: rtl8188eu: remove unused function

The inline function rtw_set_ips_deny() was only defined but was never
used.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm7xxfb: usr fb_read and fb_write
Sudip Mukherjee [Wed, 15 Jul 2015 08:29:46 +0000 (13:59 +0530)]
staging: sm7xxfb: usr fb_read and fb_write

Now since the Big-Endian and Little-Endian based calculations are moved
into a macro we can make fb_read() and fb_write() common for both
Little-Endian and Big-Endian.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm7xxfb: define new macros
Sudip Mukherjee [Wed, 15 Jul 2015 08:29:45 +0000 (13:59 +0530)]
staging: sm7xxfb: define new macros

Define and use some new macros to work with different situations
based on little-endian and big-endian.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove unused rtw_hal_write_rfreg
Luca Ceresoli [Tue, 14 Jul 2015 22:44:55 +0000 (00:44 +0200)]
staging: rtl8188eu: remove unused rtw_hal_write_rfreg

rtw_hal_write_rfreg() is never referenced, so remove it.

It used to be the only place where the write_rfreg callback was
called, so get rid of the function pointer as well.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove unused rtw_hal_set_def_var
Luca Ceresoli [Tue, 14 Jul 2015 22:44:54 +0000 (00:44 +0200)]
staging: rtl8188eu: remove unused rtw_hal_set_def_var

rtw_hal_set_def_var() is never referenced, so remove it.

It used to be the only place where the SetHalDefVarHandler callback was
called, so get rid of the function pointer as well.

Also remove the callback itself, SetHalDefVar8188EUsb(), which was not
called anywhere else.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove unused {en,dis}able_interrupt
Luca Ceresoli [Tue, 14 Jul 2015 22:44:53 +0000 (00:44 +0200)]
staging: rtl8188eu: remove unused {en,dis}able_interrupt

rtw_hal_enable_interrupt() and rtw_hal_disable_interrupt() are never
referenced, so remove them.

They used to be the only place where the enable_interrupt() and
disable_interrupt() callbacks were called, and the function pointer
is never set, so get rid of the function pointer as well.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ft1000: ft1000-usb: remove unnecessary out of memory warning
CHANG FU CHIAO [Wed, 15 Jul 2015 07:32:21 +0000 (15:32 +0800)]
staging: ft1000: ft1000-usb: remove unnecessary out of memory warning

fixes "Possible unnecessary 'out of memory' message"

Signed-off-by: CHANG FU CHIAO <zector1030@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: make obd_device_cachep static
Pedro Marzo Perez [Thu, 16 Jul 2015 18:50:00 +0000 (20:50 +0200)]
Staging: lustre: make obd_device_cachep static

Variable obd_device_cachep is only used inside the file it is declared,
so it is better set as static

Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/ldlm: Unregister ldlm namespace from sysfs on free
Oleg Drokin [Wed, 15 Jul 2015 16:21:16 +0000 (12:21 -0400)]
staging/lustre/ldlm: Unregister ldlm namespace from sysfs on free

ldlm_namespace_sysfs_unregister needs to be called ldlm_namespace_free_post
so that we don't have this dangling object there after the namespace
has disappeared.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: obdclass: simplify class_uuid_unparse
Vasiliy Korchagin [Wed, 15 Jul 2015 00:40:40 +0000 (00:40 +0000)]
staging: lustre: obdclass: simplify class_uuid_unparse

This patch simplifies uuid unparse logic by using sprintf "%pU" extension.
And eliminates the code with a coding style error:

ERROR: Macros with complex values should be enclosed in parentheses
+#define CONSUME(val, ptr) (val) = consume(sizeof(val), (ptr))

Signed-off-by: Vasiliy Korchagin <vasiliy.korchagin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix copyright statements
Benjamin Romer [Thu, 16 Jul 2015 16:40:48 +0000 (12:40 -0400)]
staging: unisys: fix copyright statements

The copyright statements in the drivers need to be correct and
consistent; this patch fixes the year for all of them, and makes the
statement text cover just the GPL V2.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMerge tag 'iio-for-4.3a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio...
Greg Kroah-Hartman [Wed, 15 Jul 2015 19:32:09 +0000 (12:32 -0700)]
Merge tag 'iio-for-4.3a' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First round of new drivers, cleanups and functionality for IIO in the 4.3 cycle.

Core and tools new stuff
* Allow explicit flush of hardware fifo by using an non blocking read.
  This is needed to support some of the Android requirements for HW fifo
  devices - also makes sense generally and clarifies a corner of the ABI.
* Add some missing modifier names.  Mostly these exist for weird and
  wonderful event types, but should still be present in the name array.
* Update iio_event_monitor to cope with new channel types.
* generic_buffer gains support for single byte scan elements (no idea
  how this never got implemented before!)

New device support
* ROHM rpr0521 light and proximity sensor driver.
* bmc150 gains bmc156 support.
* ms5611 gains ms5607 temperature and pressure sensor support.

Driver functionality
* inv-mpu - add scale_available attributes to aid userspace in
  configuring these devices.
* isl29125 - add scale_available attributes.
* stk8ba50 - sampling frequency control, triggered buffer support.
* stk8312 - sampling frequency control, triggered buffer support.
cc10001 - ensure ADC powered up at probe time if shared by non linux
  running CPUs.
* bmc150-magn - decouple the buffer and trigger allowing other triggers
  to be used to drive this device's sampling.
Documentation
* Add some previously missed *scale_available attributes to the ABI docs.

Cleanups
* Clarify some crazy naming in iio_triggered_buffer_setup that seems to
  have somehow ended up backwards (dates back a long way).  Avoid the top
  half and bottom half naming entirely given we are how dealing with a
  handler and a thread in all cases.
* Tools cleanup including coding style, variable naming improvements, also
  a new sanity check on a full event having been read.
* stk8ba50 - replace the scale table with a struct for clarity. Also suspend
  the sensor if an error occurs in init.
* hid-sensor-prox - drop uneeded line break.
* mma9551 - use size in words for word read / write avoiding accidental
  sending of an odd number of bytes.
* mma9553 - fix code alignment and document the use of a mutex.
* light/Kconfig - typo fix in commment.
* cm3323 - don't eat an error value, replace an unneeded local variable with
  a generic local variable with the same use, add some blank lines for clarity.
* pressure/Kconfig - typo in Measurement Specialties name.
* bmc150-accel - actually use a mask definition rather than repeating the
  value inline, code style cleanup.
* adc/Kconfig - general help description cleanup.
* ssp_sensors - drop redundant spi driver bus initialization (done in the
  spi core)
* tmp006 - use genmask rather than hand generated masks.
* ms5611 - drop IIO_CHAN_INFO_SCALE as this driver provides a processed
  output and as such the read only scale adds nothing useful.
* kxcjk-1013, adf4350, dummy - drop unwanted blank lines.
* Drop all owner assignments from i2c_drivers and this is done in the
  i2c core.

9 years agostaging: sm750fb: add missing blank line after declarations
Juston Li [Wed, 15 Jul 2015 04:14:48 +0000 (21:14 -0700)]
staging: sm750fb: add missing blank line after declarations

Fixes checkpatch.pl
WARNING: Missing a blank line after declarations

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove unnecessary braces
Juston Li [Wed, 15 Jul 2015 04:14:47 +0000 (21:14 -0700)]
staging: sm750fb: remove unnecessary braces

Fixes checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: move while to follow do close brace
Juston Li [Wed, 15 Jul 2015 04:14:46 +0000 (21:14 -0700)]
staging: sm750fb: move while to follow do close brace

Fixes checkpatch.pl error:
ERROR: while should follow close brace '}'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: fix brace placement
Juston Li [Wed, 15 Jul 2015 04:14:45 +0000 (21:14 -0700)]
staging: sm750fb: fix brace placement

Fix brace placement errors caught by checkpatch.pl
ERROR: that open brace { should be on the previous line

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove unnecessary whitespace
Juston Li [Wed, 15 Jul 2015 04:14:44 +0000 (21:14 -0700)]
staging: sm750fb: remove unnecessary whitespace

Fixes checkpatch.pl warning:
WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove trailing whitespace
Juston Li [Wed, 15 Jul 2015 04:14:43 +0000 (21:14 -0700)]
staging: sm750fb: remove trailing whitespace

Fixes checkpatch.pl error:
ERROR: trailing whitespace

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: add space after semicolon
Juston Li [Wed, 15 Jul 2015 04:14:42 +0000 (21:14 -0700)]
staging: sm750fb: add space after semicolon

Fixes checkpatch.pl error:
ERROR: space required after that ';'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: add spaces around operators
Juston Li [Wed, 15 Jul 2015 04:14:41 +0000 (21:14 -0700)]
staging: sm750fb: add spaces around operators

Fixes checkpath.pl error:
ERROR: spaces required around that operator

Note running checkpatch.pl with '--strict' catches more
of these errors along with cases where spacing is optional
but preferred. Take care of these in a future patch.

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: consistent spacing around operators
Juston Li [Wed, 15 Jul 2015 04:14:40 +0000 (21:14 -0700)]
staging: sm750fb: consistent spacing around operators

Fixes checkpatch.pl error:
ERROR: need consistent spacing around operator

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: add space after return type
Juston Li [Wed, 15 Jul 2015 04:14:39 +0000 (21:14 -0700)]
staging: sm750fb: add space after return type

Fixes checkpatch.pl warning:
WARNING: missing space after return type

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: add space after struct definition
Juston Li [Wed, 15 Jul 2015 04:14:38 +0000 (21:14 -0700)]
staging: sm750fb: add space after struct definition

Fixes checkpatch.pl warning:
WARNING: missing space after struct definition

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>