Commit graph

520017 commits

Author SHA1 Message Date
Jes Sorensen 0f41c727fc staging: unisys: Include missing headers
This preps for the possible build breakage in the next few
patches.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
[updated changelog to reflect new patch order; instead
of 'fixes' the patch 'prevents' - dcz]
Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:54 -07:00
David Kershner 372d872a00 staging: unisys: Remove appos_subsystems.h
Get rid of common-spar/include/diagnostics/appos_subsystems.h.

No one is using 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>
2015-05-24 13:28:54 -07:00
Jes Sorensen 5d0adb2418 staging: unisys: Remove unused livedump_info
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>
2015-05-24 13:28:53 -07:00
Jes Sorensen d3368a5877 staging: unisys: visorchipset_init(): Simplify initial 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>
2015-05-24 13:28:53 -07:00
Jes Sorensen fa2cc0af65 staging: unisys: Remove unused visorchipset_save_message()
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>
2015-05-24 13:28:53 -07:00
Jes Sorensen 0f570fc0ae staging: unisys: visorchipset_file_{init, cleanup}(): mark 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>
2015-05-24 13:28:53 -07:00
Shailendra Verma 283d93041a Staging:Android:ion - Fix for memory leak if ion device registration get failed.
Fix to avoid possible memory leak if the ion device registration
get failed.Free the allocated device creation memory before return
in case the ion device registration get failed.

Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:27:13 -07:00
Jagan Teki ad5b0d07b1 staging: android: Add more help description on Kconfig
This patch adds more help description on android Kconfig for
- lowmemory killer
- Timed gpio (same for timed output)

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:27:13 -07:00
Amaury Denoyelle 85c12b82c6 Staging: comedi: fix style for multi-line comments in cb_pcidas64.c
This patch reformat multi-line comments which are not properly written
according to the kernel coding style in cb_pcidas64.c

Signed-off-by: Amaury Denoyelle <amaury.denoyelle@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:11:44 -07:00
Amaury Denoyelle f51ff7e406 Staging: comedi: fix line longer than 80 chars in cb_pcidas64.c
This patch fixes coding style errors reported by checkpatch.pl for
cb_pcidas64.c, about too long source code lines.

Signed-off-by: Amaury Denoyelle <amaury.denoyelle@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:11:44 -07:00
Colin Cronin 163a1f19f4 Drivers: staging: comedi: comedi: Fixed comment spelling error
Fixed a spelling error in a comment.

Signed-off-by: Colin Cronin <colinpatrickcronin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:11:44 -07:00
Greg Kroah-Hartman 61e331202f Second set of new driver, functionality and cleanups for IIO in the 4.2 cycle.
Core functionality
 * i and q modifiers from quadrature channels.
 * IIO_CHAN_INFO_OVERSAMPLING_RATIO added.
 * High pass filter attributes added to mirror the existing low pass filter
   ones.
 
 Core cleanups
 * Make IIO tools building more cross compiler friendly.
 * Substantial rework of the function __iio_update_buffers to greatly simplify
   a hideously evolved function.
 
 New drivers and support
 * ACPI0008 ambient light sensor driver. This one has been around a long time to
   will be good to finally get it into mainline.
 * Berlin SOC ADC support.
 * BMC150 magnetometer.  The accelerometer in the same package has been supported
   for quite some time, so good to have this half as well.
 * m62332 DAC driver
 * MEMSIC MMC35420 magnetometer.
 * ROHM BH1710 and similar ambient light sensors.
 * Sensortek STK3310 light sensor.
 * Sensortek STK8312 accelerometer.
 * Sensortek STK8BA50 accelerometer.
 * ti-adc128s052 gains support form the adc122s021 2 channel ADC.
 
 Driver cleanups and functionality.
 * Allow various drivers to compile with !GPIOLIB if COMPILE_TEST enabled.
 * bmc150 - decouple trigger from buffer to allow other triggers to be used.
 * bmg160 - decouple trigger from buffer to allow other triggers to be used.
   Fix a trivial unused field.
 * Constify a load of platform_device_id structures.
 * inv_mpu6050 - device tree bindings.
 * hid-sensors - fix a memory leak during probe if certain errors occur.
 * ltr501 - illuminance channel derived (in an non obvious fashion) from the
   intensity channels.
 * ltr501 - fix a boundary check on the proximity threshold.
 * mlx90614 - drop a pointless return.
 * mma8452 - Debugfs register access and fix a bug that had no effect (by
   coincidence)
 * ti_am335x_adc - add device tree bindings for sample-delay, open-delay and
   averaging.  The ideal settings for these tend to be board design specific.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVYfYpAAoJEFSFNJnE9BaI1ScQAIJ2jsFZdf8fcVnWeq0bYx9I
 VUPfz/bJ/kLQRGm/LDgpMPc5o1mOE+rupwFpp/iQf15vVUN86+CRLt0qd5I/cAEg
 I3qbaieS1H9Qyd2dLTgAcZAh6tH7ZvFJm/hB6T5xQAYFGY2IMq/n3qA4//W37tUb
 2bKTRb67LWbGivOvwbxdSpEkBLtVcUw3UNn9nfqjB8BEAHIesh88gJkVKAAuRYqk
 Tm8AzQ7EGsosz2R7mIvukSBwXBcvRyxyOxCdLBPIWSESeLwMiiat0zCfv3MxrYiD
 FVpdlywoReIjDG6z9ALOm4VMtRF2m2VrjPHclQ3kYgYSgyf0fRmoiyGowv7hkeya
 Z+p9ltOZ8qdis+yH1ci9Ch695HURa1m0seirX4exqiv0Crx8UF+iNIvs9Ai84Rv8
 NNVlscoeEyijUaqoBb1YvG/Fryh2IEiGXTkF4Eld+EhW8AKkFFNIqR+Gwvs1YegT
 02A8kHxD0GyMYJo1uEwd+TnKwCBglwsie8omkxOXqsY860DRtBr7jOxyb/RzkSVi
 jGtq1Y4nxVv7q3nkn+vQDRNgAQTbH1EJfrDilpIxIWK+9onNmKMnhKnSTVNAdld/
 Hhn9g/MHptQtmA+DwMcJ3Aqn0xMUdgoE9GIkMGoKSZku9H0DhWHLdxTa2lxdJFUo
 OiWVvP0eJuvu0E0h4eA2
 =uX2k
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-v4.2b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of new driver, functionality and cleanups for IIO in the 4.2 cycle.

Core functionality
* i and q modifiers from quadrature channels.
* IIO_CHAN_INFO_OVERSAMPLING_RATIO added.
* High pass filter attributes added to mirror the existing low pass filter
  ones.

Core cleanups
* Make IIO tools building more cross compiler friendly.
* Substantial rework of the function __iio_update_buffers to greatly simplify
  a hideously evolved function.

New drivers and support
* ACPI0008 ambient light sensor driver. This one has been around a long time to
  will be good to finally get it into mainline.
* Berlin SOC ADC support.
* BMC150 magnetometer.  The accelerometer in the same package has been supported
  for quite some time, so good to have this half as well.
* m62332 DAC driver
* MEMSIC MMC35420 magnetometer.
* ROHM BH1710 and similar ambient light sensors.
* Sensortek STK3310 light sensor.
* Sensortek STK8312 accelerometer.
* Sensortek STK8BA50 accelerometer.
* ti-adc128s052 gains support form the adc122s021 2 channel ADC.

Driver cleanups and functionality.
* Allow various drivers to compile with !GPIOLIB if COMPILE_TEST enabled.
* bmc150 - decouple trigger from buffer to allow other triggers to be used.
* bmg160 - decouple trigger from buffer to allow other triggers to be used.
  Fix a trivial unused field.
* Constify a load of platform_device_id structures.
* inv_mpu6050 - device tree bindings.
* hid-sensors - fix a memory leak during probe if certain errors occur.
* ltr501 - illuminance channel derived (in an non obvious fashion) from the
  intensity channels.
* ltr501 - fix a boundary check on the proximity threshold.
* mlx90614 - drop a pointless return.
* mma8452 - Debugfs register access and fix a bug that had no effect (by
  coincidence)
* ti_am335x_adc - add device tree bindings for sample-delay, open-delay and
  averaging.  The ideal settings for these tend to be board design specific.
2015-05-24 11:45:21 -07:00
Tiberiu Breana 884ca45613 iio: accel: Add support for Sensortek STK8BA50
Minimal implementation of an IIO driver for the Sensortek
STK8BA50 3-axis accelerometer. Datasheet:
http://szgsensor.com/uploads/soft/141229/STK8BA50%D2%E5%BC%CE.pdf

Includes:
- ACPI support;
- read_raw for x,y,z axes;
- reading and setting the scale (range) parameter.
- power management

Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-23 12:57:11 +01:00
Lars-Peter Clausen 1250186a93 iio: __iio_update_buffers: Leave device in sane state on error
Currently when something goes wrong at some step when disabling the buffers
we immediately abort. This has the effect that the enable/disable calls are
no longer balanced. So make sure that even if one step in the disable
sequence fails the other steps are still executed.

The other issue is that when either enable or disable fails buffers that
were active at that time stay active while the device itself is disabled.
This leaves things in a inconsistent state and can cause unbalanced
enable/disable calls. Furthermore when enable fails we restore the old scan
mask, but still keeps things disabled.

Given that verification of the configuration was performed earlier and it
is valid at the point where we try to enable/disable the most likely reason
of failure is a communication failure with the device or maybe a
out-of-memory situation. There is not really a good recovery strategy in
such a case, so it makes sense to leave the device disabled, but we should
still leave it in a consistent state.

What the patch does if disable/enable fails is to deactivate all buffers
and make sure that the device will be in the same state as if all buffers
had been manually disabled.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-23 12:44:38 +01:00
Lars-Peter Clausen 623d74e37f iio: __iio_update_buffers: Split enable and disable path into helper functions
__iio_update_buffers is already a rather large function with many different
error paths and it is going to get even larger. This patch factors out the
device enable and device disable paths into separate helper functions.

The patch also re-implements iio_disable_all_buffers() using the new
iio_disable_buffers() function removing a fair bit of redundant code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-23 12:44:34 +01:00
Lars-Peter Clausen 6e509c4d91 iio: __iio_update_buffers: Verify configuration before starting to apply it
Currently __iio_update_buffers() verifies whether the new configuration
will work in the middle of the update sequence. This means if the new
configuration is invalid we need to rollback the changes already made. This
patch moves the validation of the new configuration at the beginning of
__iio_update_buffers() and will not start to make any changes if the new
configuration is invalid.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-23 12:44:30 +01:00
Urs Fässler 2a67dfba7f iio:adc128s052: add support for adc122s021
Signed-off-by: Urs Fässler <urs.fassler@bytesatwork.ch>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-23 12:42:43 +01:00
Lars-Peter Clausen 1ce87f21ed iio: Add I/Q modifiers
I/Q modifiers can be used to denote signals which are represented by a
in-phase and a quadrature component.

The ABI documentation describes the I and Q modifiers for current and
voltage channels for now as those will be the most likely users.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-23 10:49:55 +01:00
Antoine Tenart 2f4adaeebf Documentation: bindings: document the Berlin ADC driver
Following the addition of a Berlin ADC driver, this patch adds the
corresponding bindings documentation.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-23 10:47:42 +01:00
Antoine Tenart 70f1937911 iio: adc: add support for Berlin
This patch adds the support of the Berlin ADC, available on Berlin SoCs.
This ADC has 8 channels available, with one connected to a temperature
sensor.

The particularity here, is that the temperature sensor connected to the
ADC has its own registers, and both the ADC and the temperature sensor
must be configured when using it.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-23 10:47:40 +01:00
Greg Kroah-Hartman 936a0cd52a Merge 4.1-rc4 into staging-next
We want the fixes in here for testing and merge issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-18 13:52:44 -07:00
Linus Torvalds e26081808e Linux 4.1-rc4 2015-05-18 10:13:47 -07:00
Peter Zijlstra ab992dc38f watchdog: Fix merge 'conflict'
Two watchdog changes that came through different trees had a non
conflicting conflict, that is, one changed the semantics of a variable
but no actual code conflict happened. So the merge appeared fine, but
the resulting code did not behave as expected.

Commit 195daf665a ("watchdog: enable the new user interface of the
watchdog mechanism") changes the semantics of watchdog_user_enabled,
which thereafter is only used by the functions introduced by
b3738d2932 ("watchdog: Add watchdog enable/disable all functions").

There further appears to be a distinct lack of serialization between
setting and using watchdog_enabled, so perhaps we should wrap the
{en,dis}able_all() things in watchdog_proc_mutex.

This patch fixes a s2r failure reported by Michal; which I cannot
readily explain. But this does make the code internally consistent
again.

Reported-and-tested-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-05-18 10:08:29 -07:00
Linus Torvalds 7cf7d424c3 Two MTD fixes for 4.1:
* readtest: the signal-handling code was clobbering the error codes we should
    be handling/reporting in this test, rendering it useless. Noticed by Coverity.
 
  * the common SPI NOR flash DT binding (merged for 4.1-rc1) is being revised,
    so let's change that before 4.1 is minted.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVWDh6AAoJEFySrpd9RFgtsXoP/3tonpZtksRzwjJno3dewswV
 sAcB+5BNPGQaRta6ZRmi2UmpX0GP9hqcnYuLHfyxHsVEMJgDvhJP6XHg6Jc6I1qd
 9q8c8Aq0Yhfat5oJI0E4LfgwoEqIn4diy8TKr8SuCAVUamam/I7w6chpQRru8YQq
 cdMaNSkDWBSnKDE2JJrtgHUQadWvoSDUomQ0WTJiq7JxDjcqhAukLngJAyGJj8U1
 lOpxdyUvj+lSn1fzmkjaFEzSnQN5EqZZ+LBot7Y3HyVavzvcuue8cyIQk8EoKAJD
 WLuajbCy5NYDYzuUvWw4PSHK+6kKj9SRytmlQ3fW6iwY/RHE78gQJIPFQUCbZNJ8
 1D4ypxbT4dS8iJVEp8srfVrKTXYzP+CmUfOH1AFiUrv1qbjZKclGNa+kgsnAkqys
 CCgUdp5bM2pwpGSacpCikpm57AuXj5KxF1HOMes6Vhrq4y58KO5D91htwnVHWWJH
 KwxLeCQHXMnCFfGa/507bjHxOLQEoMV7S4V31FI8MJVIbR0vvTZ07Ns1oQVlxpR0
 DWyHhwYHwyvP/xhNZx3wVKa8R31ltMqofR0NPmdwyFCcfBd3iAbobZfmhZzgVWY3
 WxI+j6X4TCDgFqUCEDl/J+qhZxl5ye9JdNijJyrzzNYbwqqffSVqiUZiCbc/lgQJ
 FWR9zZV0BPOkZL4DG4VE
 =13mb
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-20150516' of git://git.infradead.org/linux-mtd

Pull MTD fixes from Brian Norris:
 "Two MTD fixes for 4.1:

   - readtest: the signal-handling code was clobbering the error codes
     we should be handling/reporting in this test, rendering it useless.
     Noticed by Coverity.

   - the common SPI NOR flash DT binding (merged for 4.1-rc1) is being
     revised, so let's change that before 4.1 is minted"

* tag 'for-linus-20150516' of git://git.infradead.org/linux-mtd:
  Documentation: dt: mtd: replace "nor-jedec" binding with "jedec, spi-nor"
  mtd: readtest: don't clobber error reports
2015-05-18 10:01:54 -07:00
Tiberiu Breana 90bad33acb iio: accel: Add support for Sensortek STK8312
Minimal implementation of an IIO driver for the Sensortek
STK8312 3-axis accelerometer. Datasheet:
http://www.syi-group.com/uploadpic/data/201361817562681623.pdf

Includes:
- ACPI support;
- read_raw for x,y,z axes;
- reading and setting the scale (range) parameter.
- power management

Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-17 11:03:31 +01:00
Vlad Dogaru c16bff4844 iio: accel: bmc150: decouple buffer and triggers
If the interrupt pins are not available, we should still be able to use
the buffer with an external trigger.  However, we won't be able to use
the hardware fifo since we have no means of signalling when the
watermark is reached.

I also added a comment to indicate that the timestamps in
bmc150_accel_data are only used for hardware fifo, since initially I was
confused about duplication with pf->timestamp.

Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Reviewed-by: Octavian Purdila <octavian.purdila@intel.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-17 10:57:27 +01:00
Martin Fuzzey 3f7f642b9b iio: core: add high pass filter attributes
Add a high pass filter attribute for measurements
(like the existing low pass)

Also add both high and low pass attributes for events.

Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-17 10:32:35 +01:00
Martin Fuzzey 2a17698c0e iio: mma8452: Add access to registers via DebugFS
Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-17 10:31:09 +01:00
Martin Fuzzey ecabae7131 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>
2015-05-17 10:29:07 +01:00
Vlad Dogaru 00e0c8e8e8 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>
2015-05-17 10:26:54 +01:00
Vlad Dogaru eb2191017e 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>
2015-05-17 10:24:36 +01:00
Lars-Peter Clausen fcc1b2f57d 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>
2015-05-17 10:01:45 +01:00
Lars-Peter Clausen 248be5aafc 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>
2015-05-17 09:45:22 +01:00
Lars-Peter Clausen 63223c5f5c 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>
2015-05-17 09:41:43 +01:00
Dmitry Eremin-Solenikov b87b0c0f81 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>
2015-05-17 09:37:45 +01:00
Kuppuswamy Sathyanarayanan c06cee8d08 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>
2015-05-17 09:14:10 +01:00
Fabio Estevam c24e7daf82 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>
2015-05-17 09:10:33 +01:00
Fabio Estevam 2bd0462843 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>
2015-05-17 09:10:25 +01:00
Fabio Estevam 32ee56e306 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>
2015-05-17 09:10:14 +01:00
Fabio Estevam 9ecdbed790 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>
2015-05-17 09:10:05 +01:00
Fabio Estevam d8c9d23e29 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>
2015-05-17 09:09:49 +01:00
Fabio Estevam b136faff9b 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>
2015-05-17 09:09:05 +01:00
Linus Torvalds c0655fe9b0 USB fixes for 4.1-rc4
Here are some USB fixes and new device ids for 4.1-rc4.  All are pretty
 minor, and have been in linux-next successfully.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlVX4DEACgkQMUfUDdst+ynfngCfcs8LxLL4au1ig7X7b5zN9qzw
 SYwAnj5IoQEDMVfpvoq1Pb2+g3KMCodl
 =GMQH
 -----END PGP SIGNATURE-----

Merge tag 'usb-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some USB fixes and new device ids for 4.1-rc4.

  All are pretty minor, and have been in linux-next successfully"

* tag 'usb-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb-storage: Add NO_WP_DETECT quirk for Lacie 059f:0651 devices
  Added another USB product ID for ELAN touchscreen quirks.
  xhci: gracefully handle xhci_irq dead device
  xhci: Solve full event ring by increasing TRBS_PER_SEGMENT to 256
  xhci: fix isoc endpoint dequeue from advancing too far on transaction error
  usb: chipidea: debug: avoid out of bound read
  USB: visor: Match I330 phone more precisely
  USB: pl2303: Remove support for Samsung I330
  USB: cp210x: add ID for KCF Technologies PRN device
  usb: gadget: remove incorrect __init/__exit annotations
  usb: phy: isp1301: work around tps65010 dependency
  usb: gadget: serial: fix re-ordering of tx data
  usb: gadget: hid: Fix static variable usage
  usb: gadget: configfs: Fix interfaces array NULL-termination
  usb: gadget: xilinx: fix devm_ioremap_resource() check
  usb: dwc3: dwc3-omap: correct the register macros
2015-05-16 21:15:59 -07:00
Linus Torvalds dd8edd7e97 TTY/Serial fixes for 4.1-rc4
Here's some TTY and serial driver fixes for reported issues.  All of
 these have been in linux-next successfully.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlVX4JMACgkQMUfUDdst+ymy/QCfSx/npI/WfRNlKBMHI20xwOaE
 szQAoJKRxeF0d+2GCJ56OVbmqqjnG4IN
 =FUtJ
 -----END PGP SIGNATURE-----

Merge tag 'tty-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here's some TTY and serial driver fixes for reported issues.

  All of these have been in linux-next successfully"

* tag 'tty-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  pty: Fix input race when closing
  tty/n_gsm.c: fix a memory leak when gsmtty is removed
  Revert "serial/amba-pl011: Leave the TX IRQ alone when the UART is not open"
  serial: omap: Fix error handling in probe
  earlycon: Revert log warnings
2015-05-16 21:10:05 -07:00
Linus Torvalds 3f4741b1d8 Staging / IIO driver fixes for 4.1-rc4
Here's some staging and iio driver fixes to resolve a number of reported
 issues.  All of these have been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlVX4PsACgkQMUfUDdst+ynGagCg0TP6R6jchyJqe5Cw45PovkQ1
 r+gAnRMF+wc7Q2vGJYV7tSLQxpcxBRVk
 =NPXR
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging / IIO driver fixes from Greg KH:
 "Here's some staging and iio driver fixes to resolve a number of
  reported issues.

  All of these have been in linux-next for a while"

* tag 'staging-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (31 commits)
  iio: light: hid-sensor-prox: Fix memory leak in probe()
  iio: adc: cc10001: Add delay before setting START bit
  iio: adc: cc10001: Fix regulator_get_voltage() return value check
  iio: adc: cc10001: Fix incorrect use of power-up/power-down register
  staging: gdm724x: Correction of variable usage after applying ALIGN()
  iio: adc: cc10001: Fix the channel number mapping
  staging: vt6655: lock MACvWriteBSSIDAddress.
  staging: vt6655: CARDbUpdateTSF bss timestamp correct tsf counter value.
  staging: vt6655: vnt_tx_packet Correct TX order of OWNED_BY_NIC
  staging: vt6655: Fix 80211 control and management status reporting.
  staging: vt6655: implement IEEE80211_TX_STAT_NOACK_TRANSMITTED
  staging: vt6655: device_free_tx_buf use only ieee80211_tx_status_irqsafe
  staging: vt6656: use ieee80211_tx_info to select packet type.
  staging: rtl8712: freeing an ERR_PTR
  staging: sm750: remove incorrect __exit annotation
  iio: kfifo: Set update_needed to false only if a buffer was allocated
  iio: mcp320x: Fix occasional incorrect readings
  iio: accel: mma9553: check input value for activity period
  iio: accel: mma9553: add enable channel for activity
  iio: accel: mma9551_core: prevent buffer overrun
  ...
2015-05-16 21:04:56 -07:00
Linus Torvalds 148c46f3e1 Char/misc fix for 4.1-rc4
Here is one fix, in the extcon subsystem, that resolves a reported
 issue.  It's been in linux-next for a number of weeks now, sorry for not
 getting it to you sooner.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlVX4VEACgkQMUfUDdst+yk3sQCgtlRpHuuO0p7VAKHakWixhK7i
 7D0An16DODuDxlf00fIZDkGr8lcZ+pXb
 =GiRC
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc fix from Greg KH:
 "Here is one fix, in the extcon subsystem, that resolves a reported
  issue.

  It's been in linux-next for a number of weeks now, sorry for not
  getting it to you sooner"

* tag 'char-misc-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  extcon: usb-gpio: register extcon device before IRQ registration
2015-05-16 20:48:42 -07:00
Linus Torvalds 92752b5cdd Merge branch 'for-linus-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Pull UML hostfs fix from Richard Weinberger:
 "This contains a single fix for a regression introduced in 4.1-rc1"

* 'for-linus-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  hostfs: Use correct mask for file mode
2015-05-16 16:33:59 -07:00
Linus Torvalds 1630ee5e01 This pull request contains a single bug fix for the UBI block driver.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJVVHOYAAoJEEtJtSqsAOnWf0AQAIo4PEYor0UUpQu0ZmPnUbxZ
 c0qi9XfTc9cUuR1SlLIrLe1FZwAg4vKyT8Bqn8CeaGWWLi8dv4C7vmEEelAPOVFd
 diLNmQE2oRm7wv+Q+ZEiirw5mAmVHjKIY/+DiHP5zJA0ItHJr1BuWvBvLF3q5eM1
 hhrvOxMDYFnLXD2w/AbKUdSLjdcb1U2PnU9qLzEY0dsl849lrPhLCKlnz9gP5dek
 nFYSpQRIvwx0yacZj/lHCPbWa6STb1HsrOUIz5eMtkOEDXzBQNcIcW2OOlepcDul
 8VOC5xftMbeTLzARG+ThduQxqkXuucYBfgV7qLV4NY7REghXaHBV/0JXet/B4H03
 uj0br0AvOdUU9w82XweHVZh5wFshSXkn4KDZDOIsdRLGIgyBbFs4s4u50W4pXCXu
 Lp5auGjeXKm2UADyR4wzZaBpoT3l7zOAcZwWUT1cmar/QTvpWJ0vRz8Azw4HZpJt
 iiGuZ4wzOT7molJTFB6RVZ+eOoVU1O6m5Vjdk1HXwF5bFDHX0zA1fQZDiDkCXR64
 tGXpbmTqWSaebZIwEqWONF61mRq7MDqZpIcC8MZRf9igqrXK2He+y/WgUgem4KFg
 H38X2PrXQlQzxeILUvihWZA58XhprZfRA7i0DNpkPmYoOodmpoOHGiiHxnOmh+Qc
 5Ai0GWLmZAiy1defH41w
 =zGn5
 -----END PGP SIGNATURE-----

Merge tag 'upstream-4.1-rc4' of git://git.infradead.org/linux-ubifs

Pull UBI bufix from Richard Weinberger:
 "This contains a single bug fix for the UBI block driver"

* tag 'upstream-4.1-rc4' of git://git.infradead.org/linux-ubifs:
  UBI: block: Add missing cache flushes
2015-05-16 16:28:01 -07:00
Linus Torvalds 6a8098a447 Fix a number of ext4 bugs; the most serious of which is a bug in the
lazytime mount optimization code where we could end up updating the
 timestamps to the wrong inode.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQEcBAABCAAGBQJVV1l1AAoJEPL5WVaVDYGjdPwH/RzNut4bfgq7yK2yUVNqPpPN
 QzjR848fT1lj7C1eN7eEh+NRG+KNM2QnmMJBU8jVnwq2l3r8AGFV/bDRC+Zx4U8L
 cz9mZJMU7ZDP5TH/WVyimySGAXpaFKruXA+3L8CyC3LQEI6TUOxKt5CqNi0/9nND
 B8HoF+Ei7jIILrcW7KKj55/fSfh4iiy+iUb0kjrSnZj0y5sROfFG2QhQwIhJRk7I
 /8aeg2HYbhWXCKQHnQ5F4lLNCf44kdJ/EoCpz6aOHtVwrnBcQ44yeqm5MtHSh6Qw
 lj8iPCIlcHYGZE4im+pWAavDMeHBm/VnOnH9545t6nNFq6W7WNdkD99ZJ/AQyWQ=
 =JJxO
 -----END PGP SIGNATURE-----

Merge tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 fixes from Ted Ts'o:
 "Fix a number of ext4 bugs; the most serious of which is a bug in the
  lazytime mount optimization code where we could end up updating the
  timestamps to the wrong inode"

* tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: fix an ext3 collapse range regression in xfstests
  jbd2: fix r_count overflows leading to buffer overflow in journal recovery
  ext4: check for zero length extent explicitly
  ext4: fix NULL pointer dereference when journal restart fails
  ext4: remove unused function prototype from ext4.h
  ext4: don't save the error information if the block device is read-only
  ext4: fix lazytime optimization
2015-05-16 15:55:31 -07:00
Linus Torvalds c7309e88a6 Merge branch 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
 "The first commit is a fix from Filipe for a very old extent buffer
  reuse race that triggered a BUG_ON.  It hasn't come up often, I looked
  through old logs at FB and we hit it a handful of times over the last
  year.

  The rest are other corners he hit during testing"

* 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: fix race when reusing stale extent buffers that leads to BUG_ON
  Btrfs: fix race between block group creation and their cache writeout
  Btrfs: fix panic when starting bg cache writeout after IO error
  Btrfs: fix crash after inode cache writeback failure
2015-05-16 15:50:58 -07:00