Commit graph

1708 commits

Author SHA1 Message Date
Dan Carpenter b70e19c222 staging: iio/ad7291: fix error code in ad7291_probe()
We should be returning a negative error code instead of success here.

This would have been detected by GCC, except that the "ret" variable was
initialized with a bogus value to disable GCC's uninitialized variable
warnings.  I've cleaned that up, as well.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Stable@vger.kernel.org
2014-06-21 11:35:30 +01:00
Greg Kroah-Hartman e28642c04a First set of IIO fixes for the 3.16 cycle.
A mixed bag of fixes, many of which feel just to late for 3.15.
 
 * hid sensors - some devices need a feature report request in order to
   change power state.  This isn't part of the spec, but has been observed
   on several devices and does no harm to others.
 * mpl3115 has had two errors in the buffer description fixed. The presure is
   signed, not unsigned and the temperature has 12 bits rather than 16.
   These could lead to incorrect interpretation of the data in userspace.
 * tsl2x7x - the high byte of the proximity thresholds should be written along
   with the low byte (which was). This could lead to interesting results
   with large thresholds.
 * twl4030 - a flag to specify processed values were required was not set
   when initializing a reading.  As such values returned were in an unknown
   state. Fixed by simply initializing it appropriately.
 * IIO_SIMPLE_DUMMY_BUFFER did not select IIO_BUFFER leading to randconfig
   build errors.
 * ak8975 was applying an unwanted le16_to_cpu conversion as the i2c framework
   already performs one.  As such for big endian systems, the bytes would be
   in the wrong order in the magnetic field measurements reported.
 * mxs-lradc - the controllable voltage dividers were not enabled / disabled for
   later channels than the first one during conversion.
 * at91_adc error handling returned -ENOMEM in a u8. Return value of
   at91_adc_get_trigger_value_by_name changed to int thus allowing -ENOMEM and
   also original values to be returned.
 * mcb - mcb_request_mem returns and ERR_PTR but the caller was checking for
   NULL to detect an error.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJTnLYyAAoJEFSFNJnE9BaI6r4QAK22hjl1J3xoWwOPUJhfJ5Hh
 VTjwO1OxwQ1XtUN5WneeJM73eu6moXD/avG2NbX4orAkNjSXKL6+/3WAds/rYMj2
 0vPiJsKsGBBlhu2w2RU80xVOPT2/XXIH3bYWDiUlr/i6DLEh8mU3kKX/yZzF+cIn
 hheYnOHZzLqGH8JircScEJv+B06svZtlfoDeLYaKY03HupTvEH95mvCSZk71PxZb
 A+7Qb3nDlZrpLBFKj4L5x15MIoEgopID2pX0kHLNY2DE1sopr2Z+FgSa3u/wtSEx
 k/ViyHPRk1mjTrQ92RMmTF5lMts6JFCmMgpPCNmcSyRKt6Fe6KcCMiWIlSs9I69i
 6KAIes5XpP7Qti5Yd4gi70uiq7fL1hR18Yhzv6IdmNdS8iJhk53YiWDYiYBgXwWS
 rcOva4NsaoeLYUdNJZRtap3RLsQRKAxg7HNhL+G88rr3wCsA0P7rb6BMdFK+3MiS
 BDcYe8mHIzX9tJZa4EU8kOdr+aphQeDt1nH4aZDWT3J7fo6RWrWcPMWFAcx+1jp3
 VVDL6Jn8WIuxYIDFznSQ6T6tvsvuqPgCqOA0ygfzvruo3m/oWvTT/+i2YFotGH3Y
 7Mlw7TACAmcuZStBLg6R0R1fD39zpfp4/+GNRxFaaB8otMPyrbizb0HBcaksQCp0
 0MTbFSjuAlXZ3NhVIm2O
 =RuB2
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-3.16a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

First set of IIO fixes for the 3.16 cycle.

A mixed bag of fixes, many of which feel just to late for 3.15.

* hid sensors - some devices need a feature report request in order to
  change power state.  This isn't part of the spec, but has been observed
  on several devices and does no harm to others.
* mpl3115 has had two errors in the buffer description fixed. The presure is
  signed, not unsigned and the temperature has 12 bits rather than 16.
  These could lead to incorrect interpretation of the data in userspace.
* tsl2x7x - the high byte of the proximity thresholds should be written along
  with the low byte (which was). This could lead to interesting results
  with large thresholds.
* twl4030 - a flag to specify processed values were required was not set
  when initializing a reading.  As such values returned were in an unknown
  state. Fixed by simply initializing it appropriately.
* IIO_SIMPLE_DUMMY_BUFFER did not select IIO_BUFFER leading to randconfig
  build errors.
* ak8975 was applying an unwanted le16_to_cpu conversion as the i2c framework
  already performs one.  As such for big endian systems, the bytes would be
  in the wrong order in the magnetic field measurements reported.
* mxs-lradc - the controllable voltage dividers were not enabled / disabled for
  later channels than the first one during conversion.
* at91_adc error handling returned -ENOMEM in a u8. Return value of
  at91_adc_get_trigger_value_by_name changed to int thus allowing -ENOMEM and
  also original values to be returned.
* mcb - mcb_request_mem returns and ERR_PTR but the caller was checking for
  NULL to detect an error.
2014-06-18 10:41:08 -07:00
Robert Hodaszi 19bc4981a2 iio: mxs-lradc: fix divider
All channels' single measurement are happening on CH 0. So enabling / disabling
the divider once is not enough, because it has impact on all channels.

Set only a flag, then check this on each measurement, and enable / disable the
divider as required.

Signed-off-by: Robert Hodaszi <robert.hodaszi@digi.com>
Cc: Stable@vger.kernel.org
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-14 15:01:20 +01:00
Arnd Bergmann 6d4eed9e8e staging/iio: IIO_SIMPLE_DUMMY_BUFFER neds IIO_BUFFER
An obviously missing 'select' statement, without this we
get a link error

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-07 11:45:21 +01:00
Mario Schuknecht c404618cd0 staging: iio: tsl2x7x_core: fix proximity treshold
Consider high byte of proximity min and max treshold in function
'tsl2x7x_chip_on'. So far, the high byte was not set.

Cc: Stable@vger.kernel.org
Signed-off-by: Mario Schuknecht <mario.schuknecht@dresearch-fe.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-02 18:49:18 +01:00
Greg Kroah-Hartman 588079342e Third round of new stuff for IIO in the 3.16 cycle.
This (rather late) set consists only of fixes to patches earlier in the
 cycle or minor fixes for other problems (such as randconfig build issues
 picked up by Arnd).  I've included the general minor fixes here as it is
 very late in the current cycle and they can all wait for the merge window.
 
 * Recent change to hid-sensors introduced a possible infinite loop due to a
   typo. In the same series, a report interval unit read was added but in the
   case where the hardware doesn't support it a value of 0 would lead to some
   nasty issues.  The patch sets it to the specified default of msecs.
 * Anon inodes were used by IIO without being explicitly selected.  This has
   been true for a long time so it clearly only effects rather unusual
   configurations (rand configs)
 * at91 requires the input subsytem but this wasn't explicity in the Kconfig.
 * A couple of parts supported by the max1363 driver were using the wrong
   iio_chan_spec arrays and hence would missreport their bit depths.  This has
   been there a long time and was never right so isn't a regression.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTgdLAAAoJEFSFNJnE9BaIDBwP/jGJ4cOV4mKekQvn+keMCQ8M
 fPyKRijwgWE9VEVP6BbhA5ya4hwH6bloQXBBp2PhB51GS1I8pNc5dWJzQEZO+oFA
 9jkQm91zufeRjxEUCRlD8kfJ+7V766SKlIkENbJgbk5XStvrAWAIQ8lHkHwJmL5j
 lNfGWCrVuBKK3Ck08HH6p2N6hHO1GDHnyrdGIW2BYJZVyUBpBlkukSZoU8T0zB6g
 F9QzZyECG9VdbL1HVBrsBy3Pw9cOwiMTJrDMJ2dkwBdKmAnkllSomrKV5cOlYWFF
 qg3z6JOPPY+6Hpl15tr2RvTaoKYTc33q9/UX1sysrLyLN07W52ygXdozxTGUINB2
 ozhmIp/oZVYyHXIHC3yg7MOhW6AExJkzr91IMNnvVT8f22BlkdXHRB0atCAHcUvT
 t4NsFHS0QrRYooqVI12Z3wOPmZahydgUlivNySRaug4lYgULxl5pts9WAl8fEgA7
 ZM4tUUtGjrni5KpaYT5wnQ2JhwNTZDu2kIYgRB5Zhh5F/uqJ/xQCjllhJxv92hKG
 r6LvacGaWiwyYXryl4TvfqH1/4lqsFk8nyS0OLUFhtCfE8jmydSZ63LhnnQJs/iH
 u0u/uDz9lqPgtClWZDm3YqIMRpp4ShNkn8irBZ9bLhaHC59GurgYMM+PgkrUPM/N
 7y76UVWNYNWxYb/L0A5n
 =u2ra
 -----END PGP SIGNATURE-----

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

Jonathan writes:

Third round of new stuff for IIO in the 3.16 cycle.

This (rather late) set consists only of fixes to patches earlier in the
cycle or minor fixes for other problems (such as randconfig build issues
picked up by Arnd).  I've included the general minor fixes here as it is
very late in the current cycle and they can all wait for the merge window.

* Recent change to hid-sensors introduced a possible infinite loop due to a
  typo. In the same series, a report interval unit read was added but in the
  case where the hardware doesn't support it a value of 0 would lead to some
  nasty issues.  The patch sets it to the specified default of msecs.
* Anon inodes were used by IIO without being explicitly selected.  This has
  been true for a long time so it clearly only effects rather unusual
  configurations (rand configs)
* at91 requires the input subsytem but this wasn't explicity in the Kconfig.
* A couple of parts supported by the max1363 driver were using the wrong
  iio_chan_spec arrays and hence would missreport their bit depths.  This has
  been there a long time and was never right so isn't a regression.
2014-05-25 10:56:30 -07:00
Toralf Förster 34683a5c6e fix format string missmatch in staging/iio/Documentation/iio_utils.h
spotted by cppcheck

Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-05-25 12:09:37 +01:00
Greg Kroah-Hartman 69c1f05379 Merge 3.15-rc6 into staging-next.
This resolves the conflicts in the files:
	drivers/iio/adc/Kconfig
	drivers/staging/rtl8723au/os_dep/usb_ops_linux.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-22 23:27:17 +09:00
Masanari Iida fd8122d128 staging: iio: Fix format string mismatch in ad7280a.c
Fix two format string mismatch in ad7280a.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-04-30 21:56:12 +01:00
Greg Kroah-Hartman 37aa48368f Merge 3.15-rc3 into staging-next 2014-04-27 21:38:34 -07:00
Greg Kroah-Hartman d5cef008e9 First round of IIO new driver, functionality and cleanups for the 3.16 cycle.
New device support
 * AS3935 Lightning Sensor
 * MCP3426/7/8 support added to the existing MCP3422 ADC driver
 * AK8963 support in the AK8975 driver
 * MPU6500 support in the MPU6050 driver (the functionality that is different
   is mostly not supported yet in either part).
 
 Staging Graduations
 * AD799x ADC
 
 New functionality
 * ACPI enumeration for the ak8975 driver
 
 Cleanup / tweaks
 * Use snprintf as a matter of good practice in a few additional places.
 * Document *_mean_raw attributes.  These have been there a while, but were
   undocumented.
 * Add an in kernel interface to get the mean values.
 * Bug in the length of the event info mask that by coincidence wasn't yet
   actually causing any problems.
 * itg3000 drop an unreachable return statement.
 * spear_adc cleanups (heading for a staging graduation but a few more
   issues showed up in the review of these patches).
 * Exynos ADC dependencies changed so it is only built when Exynos is present
   or COMPILE_TEST and OF are set.
 * tsl2583 cleanups.
 * Some cut and paste typos in the comments of various drivers still in staging.
 * Couple of minor improvements to the ST sensor drivers.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTW8asAAoJEFSFNJnE9BaITYoP/1rONn2PS1t61CI4rtWDVZh8
 SEn4EQCxRVVAdWCQQz1zY0JZeUSjuWcPi7+MJ/VNaw6efOXN0J4O+bsNfh5Asju2
 88giAUuP+hmd4xccGkxaJvdXEhruRMzGugh3/6+L2XuhkJsorAhJe/63XTq+JNOp
 Tq6NHVmqV507wuDOguXfUQ2eDKPEFiTBUiutLJqyLOOi5zEq/X3Cnv+YMCDx4coE
 BwZEQnXJWLfMSvXQtbTAl1XwqvDY8bjMNwFvjRuTLN73ua0/gMe//kJV/2tm8UMF
 90Fs3TPi/cc5QkvpKMC9DP8eeAMi11bRdSRN0/abEQgglCz1LzWuX5Gqpr5psrhM
 q1KS9JU9u4oZ8PR49c8QWjN0RtNiKiVVhCgBVcNE/2uYVwQqu0kJWylsq/m2+7jr
 99qi8R979b5GoX69TKjVyr9MyGbN2x/vKWm3+UgtujqzXgu7GGdXa6NhrcPGcYjW
 /uH3rfW4w0rBFVEJzDXkj74n/j2WDvrukjqYgABfENfBqO14swc0nlBGGyjli0uv
 tUiwwS05Fax8wmuMP/wlII7Bq9XA8e+QISXHeO318svP/9SPxRuRwsd2Oo7BxXZz
 e6gm5i142XeiSc3KjLGEUAZ+qF7xKUfEZwIajkWZ8LIgeROfDLzNEjvVsU2Byk+0
 g+XrtWm4jljKHzjV/33g
 =eqGz
 -----END PGP SIGNATURE-----

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

Jonathan writes:

First round of IIO new driver, functionality and cleanups for the 3.16 cycle.

New device support
* AS3935 Lightning Sensor
* MCP3426/7/8 support added to the existing MCP3422 ADC driver
* AK8963 support in the AK8975 driver
* MPU6500 support in the MPU6050 driver (the functionality that is different
  is mostly not supported yet in either part).

Staging Graduations
* AD799x ADC

New functionality
* ACPI enumeration for the ak8975 driver

Cleanup / tweaks
* Use snprintf as a matter of good practice in a few additional places.
* Document *_mean_raw attributes.  These have been there a while, but were
  undocumented.
* Add an in kernel interface to get the mean values.
* Bug in the length of the event info mask that by coincidence wasn't yet
  actually causing any problems.
* itg3000 drop an unreachable return statement.
* spear_adc cleanups (heading for a staging graduation but a few more
  issues showed up in the review of these patches).
* Exynos ADC dependencies changed so it is only built when Exynos is present
  or COMPILE_TEST and OF are set.
* tsl2583 cleanups.
* Some cut and paste typos in the comments of various drivers still in staging.
* Couple of minor improvements to the ST sensor drivers.
2014-04-26 08:12:25 -07:00
Jimmy Li c60e5760b0 staging:iio:ad2s1200 fix missing parenthesis in a for statment.
Signed-off-by: Jimmy Li <coder.liss@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-04-26 10:51:14 +01:00
Masanari Iida e3c5be2bda staging: iio: Fix typo in iio
Correct spelling typo in comment within staging/iio

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-04-23 21:44:41 +01:00
Greg Kroah-Hartman 8b425aa193 First found of IIO fixes for the 3.15 cycle.
* Fix the platform data support for the at91 adc driver.
 * A couple of related follow up patches get the support working again
   for at91sam9260 and at91sam9g45 as the earlier patch results in a device
   name change.
 * A default timer value in the at91 adc driver was bonkers.  Make it sane.
 * Fix incorrect reporting of the integration time for the cm32181 light sensor
 * Fix a missing break in the ad2s1200 driver which would have give a false
   error return.
 * Make sure buffer scan mask queries from userspace return 0/1 rather than
   a fairly random value depending on their implementation of test_bit
 * Fix leak of the i2c client and a null pointer dereference in the cm36651
   driver.
 * Fix a build warning on avr32 for the mxs-lradc (not exactly a critical
   combination - but the issue was real).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTSX1HAAoJEFSFNJnE9BaIGkoQAIotGana51TXPo9KYnQJaCYH
 +xBfaaXEaR69lARoXT8SDGzyXPCQNOEbVfsXRwrVQ4Wl8x2hP8n9YdUrAHzZ/8O/
 Wf8Z0jb81Q+KNJ+SMMgcy4kK5OU71EMMk5fbocPzD+WfQ+WlDr+My1F3yZ5UIvOM
 nOUF6QCcYA0MN7dopEVIqyP8HZhrxR1YUvgzqOmp1fteYL4gFCU006WPSI30GxEv
 fMM8MiWbbn9xjOsR7SBzaLEo0Hv3YC92zwSAuJxGClH/+9cKogWAaE/PiNUO3y6A
 +2D0KQnGRopKy4j/QCjdPZsTmYDBxQ9vMlUOtRlOf1XAVjL6pZu2EJ2/ereShLW6
 B4rev23tqgk9nyNk/Li4n+5krzvPqqOcbWNW1la769DkEt7LU+YU+hiShkDm1+0M
 6hwxPd6gQxg0QUjuusi1+B5JqweAv+mEcCsQ+ga6ZK61X9bNJ6c/4YF451rkNhc6
 mlC3ZqBvDALmNSVdCas0GOGHLaeWxfoT7E9G6p62h9uBVerqZ6epvlAUC6JOHotc
 /qz/D1VL1+ptPAawXiFSNOb8RMJogdBfjPB9bOlYQSSHV3eF0RVNK6FQiqvc4mFX
 or1pPG6lDLGm6g3NcDEjxEEVThevQpEwKmpM0TCEUMiIuxSHYN/M//P2PSeDvYwk
 9k8x3fJae7dWNsGIT92y
 =HMr3
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-3.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

First found of IIO fixes for the 3.15 cycle.

* Fix the platform data support for the at91 adc driver.
* A couple of related follow up patches get the support working again
  for at91sam9260 and at91sam9g45 as the earlier patch results in a device
  name change.
* A default timer value in the at91 adc driver was bonkers.  Make it sane.
* Fix incorrect reporting of the integration time for the cm32181 light sensor
* Fix a missing break in the ad2s1200 driver which would have give a false
  error return.
* Make sure buffer scan mask queries from userspace return 0/1 rather than
  a fairly random value depending on their implementation of test_bit
* Fix leak of the i2c client and a null pointer dereference in the cm36651
  driver.
* Fix a build warning on avr32 for the mxs-lradc (not exactly a critical
  combination - but the issue was real).
2014-04-22 21:29:20 -07:00
Michael Welling 7fe704ce6a Staging: iio: Switch from msleep to usleep range per timers-howto.txt
Signed-off-by: Michael Welling <mwelling@ieee.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:29 -07:00
Michael Welling b47b894c60 Staging: iio: Remove quoted string split across lines warnings
Signed-off-by: Michael Welling <mwelling@ieee.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:29 -07:00
Michael Welling 8f2150dd8e Staging: iio: Removes unwanted space before semicolon
Signed-off-by: Michael Welling <mwelling@ieee.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:29 -07:00
Joel Porquet 9f9e1e0ff3 staging: iio: fix coding style
As suggested by checkpatch.pl, use dev_info() instead of
printk(KERN_INFO ...) to print message.

Signed-off-by: Joel Porquet <joel@porquet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 08:29:28 -07:00
Michael Welling e193385bf4 Staging:iio:tsl2583 Switch from msleep to usleep range per timers-howto.txt
Signed-off-by: Michael Welling <mwelling@ieee.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-04-12 18:34:35 +01:00
Michael Welling cf0d0739c0 Staging:iio:tsl2583 Remove quoted string split across lines warnings
Signed-off-by: Michael Welling <mwelling@ieee.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-04-12 18:30:53 +01:00
Michael Welling 913423409d Staging:iio:tsl2583 Removes unwanted space before semicolon
Signed-off-by: Michael Welling <mwelling@ieee.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-04-12 18:29:08 +01:00
Jonathan Cameron e20d6090e3 staging:iio:adc:spear rename spear_read_raw to spear_adc_read_raw
This brings it inline with all the other prefix usage in the driver.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
2014-04-07 19:10:16 +01:00
Jonathan Cameron e90ba52f4d staging:iio:adc:spear rename iodev -> indio_dev to fit with current convention
How we ended up with indio_dev is a mystery, but we have so in the interests
of consistency, move this driver over to that convention.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
2014-04-07 19:07:41 +01:00
Jonathan Cameron b586e5d9ee staging:iio:adc:spear rename device specific state structure to _state
Also rename instances of it to st.  This brings the driver inline with
the conventions of IIO and avoids some naming confusion with some IIO
structures which also use the _info postfix.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
2014-04-07 19:05:58 +01:00
Jonathan Cameron 932de74ba3 staging:iio:adc:spear_adc use info_mask_shared_by_all for samp freq
Using the core support makes this element available to in kernel users as
well as to userspace under exactly the same interface as before.  The
intent is to move all sampling frequency control to this approach
throughout IIO.

Drop unused clk_high and clk_low whilst we are at it.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
2014-04-07 18:55:20 +01:00
Jonathan Cameron a8375a9952 staging:iio:adc:spear_adc drop initialization of unused scan_type
As the driver does not support the buffered interfaces of IIO this is
not used.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Stefan Roese <sr@denx.de>
2014-04-07 18:54:49 +01:00
Jonathan Cameron b64aef7034 staging:iio:adc:spear adc - prefix defines to avoid namespace clashes.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
2014-04-07 18:54:15 +01:00
Alexandre Belloni e036f71e8c iio: adc: mxs-lradc: fix warning when buidling on avr32
This fixes:
drivers/staging/iio/adc/mxs-lradc.c: In function 'mxs_lradc_probe':
drivers/staging/iio/adc/mxs-lradc.c:1558: warning: comparison of distinct pointer types lacks a cast
drivers/staging/iio/adc/mxs-lradc.c:1558: warning: right shift count >= width of type
drivers/staging/iio/adc/mxs-lradc.c:1558: warning: passing argument 1 of '__div64_32' from incompatible pointer type

When building on avr32.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-03-22 12:25:02 +00:00
Jimmy Li 6b9da2e772 staging:iio:ad2s1200 fix a missing break
Signed-off-by: Jimmy Li <coder.liss@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-03-22 11:50:25 +00:00
Aybuke Ozdemir 168934c9d4 staging: adc: mxs-lradc.c Fix line over 80 characters.
Fix checkpatch.pl issues with
line over 80 characters in mxs-lradc.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 13:41:27 -07:00
Aybuke Ozdemir 6db685c35e staging: addac: adt7316.c: Fix line over 80 characters
Fix checkpatch.pl issues with line over 80 characters in adt7316.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 12:19:32 -07:00
Aybuke Ozdemir 1a32c5ad20 staging: iio: light: Checkpatch fixes tsl2x7x_core.c
This patch fixes these errors and warning messages found by
checkpatch.pl:
ERROR: return is not a function, parentheses are not required.
WARNING: space prohibited before semicolon.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 09:58:07 -07:00
Aybuke Ozdemir 4b31467d54 staging: iio: addac: adt7316.h Fix Unnecessary space after function pointer name
The patch fixes the following checkpatch.pl warnings:
WARNING: Unnecessary space after function pointer name.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 09:58:07 -07:00
Monam Agarwal 67fc0120e5 Staging: iio/light: Fix return values in tsl2583.c
This patch fixes following smatch warnings:
/drivers/staging/iio/light/tsl2583.c:436 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)?
/drivers/staging/iio/light/tsl2583.c:448 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)?
/drivers/staging/iio/light/tsl2583.c:461 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)?

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 09:58:07 -07:00
Lars-Peter Clausen bd75afaa31 staging:iio: Move ad799x driver out of staging
The driver is now at a reasonable quality level. Move it out of staging.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-03-16 18:00:34 +00:00
Lars-Peter Clausen 396590b3bc staging:iio:ad799x: Move ring functions to the main file
The ad799x_ring.c file is pretty much only one function these days. No need to
keep it in a separate file. Since there is then only one user of the header left
also move everything from the header to the main file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-03-16 18:00:33 +00:00
Monam Agarwal 941060b4a1 Staging: iio/accel: Fix Prefer netdev_warn(netdev, ...then dev_warn(dev, ... then pr_warn(... to printk(KERN_INFO ... in sca3000_ring.c
This patch fixes the following checkpatch.pl warning in sca3000_ring.c
WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 14:48:47 -08:00
Monam Agarwal 21d9fbcc4f Staging: iio/resolver: Fix prefer pr_warn over pr_warning in ad2s1210.c
This patch fixes following checkpatch.pl warning
WARNING: Prefer pr_warn(... to pr_warning(...

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 14:48:47 -08:00
Greg Kroah-Hartman 17b02809cf Merge 3.14-rc5 into staging-next
We want those fixes in here
2014-03-02 20:12:54 -08:00
Juergen Beisert 760dbe1dcb staging:iio:adc:MXS:LRADC: fix touchscreen statemachine
Releasing the touchscreen lets the internal statemachine left in a wrong state.
Due to this the release coordinate will be reported again by accident when the next
touchscreen event happens. This change sets up the correct state when waiting
for the next touchscreen event.

This has led to reported issues with calibrating the touchscreen.
Bug was introduced somewhere in the series that began with
18da755de5
Staging/iio/adc/touchscreen/MXS: add proper clock handling
in which the way this driver worked was substantially changed
to be interrupt driven rather than relying on a busy loop.
This was a regression in the 3.13 kernel.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-24 21:55:50 +00:00
Hartmut Knaack 2deaf23b22 staging:iio:ad799x use regulator for vref
Switch the ad799x driver to use the regulator framework and add binding for reference voltage.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-18 08:43:33 +00:00
Hartmut Knaack 630097f748 staging:iio:ad799x fix typo in copyright message
Fix a typo in the copyright message.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-18 08:37:28 +00:00
Fabio Estevam 9610e08e97 iio: mxs-lradc: Propagate the real error code on platform_get_irq() failure
No need to return a 'fake' return value on platform_get_irq() failure.

Just return the error code itself instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-15 12:32:35 +00:00
Manuel Stahl 49d916ec2a staging: iio: Add tool to list IIO devices and triggers
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-15 11:14:21 +00:00
Hartmut Knaack cc7c0f7e07 staging:iio:ad799x Move to devm_request_threaded_irq to make device-removal simpler.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-15 09:51:43 +00:00
Greg Kroah-Hartman e5b9c05772 First set of new drivers and cleanups for IIO in the 3.15 cycle.
New drivers:
 * si7005 relative humidity and temperature sensor
 * Lite-on ltr501 ambient light and proximity sensor
 
 Cleanups
 * Clean up some dead comments in max1363
 * Drop some obsolete variables in adjd_s311 and tcs3472 left over from
   the introduction of iio_push_to_buffers_with_timestamp.
 * Drop some unneeded linux/init.h includes
 * Squish a sparse warning in mpl3115 by correctly specifying a be32 variable.
 * A number of cleanups and fixes for sca3000
 * Drop an unneed checks in mxs-lradc, ad7303 and adis16400.
 * Drop a platform_set_drvdata in viperboard after the only use of it was
   removed during a devm conversion.
 * Add a missing device name for ak8975 to comply with the ABI.
 * Put mpu6050 into the IMU menu as it slipped out into the main menu.
 * Fix a typo and some comment formatting in mpu6050.
 * Document at91 ADC clock properties.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJS+R3TAAoJEFSFNJnE9BaILtoP/RiZaeAQe5hKVtS7DBNmtbvH
 NVrk4SDl8F5WH6O6MKvRn54aBWyPj3axyMb0WLv9oGQycxlflT/420Q1UaayG4oX
 W1IOS/X2JNrWpt/xlNPi8crqpcRZbLVjKoRGhw0BMR9OTD+x6U+NTNGpr9WJUNAB
 CjmYpa6MhouQMd59+HMroSf1PIvBfvG2fkAMg2AoRSQ6TU19q5Yi0zzqwS17iZf3
 VTazh63dVKYyt3MJimjnGcA4A2kv5YOrfK59qYfHPIVR4AfKNVKlwVQlu8TlBaXE
 eYr2G1Jbd/GRkUe5FRGL9Nlnl8exnUU8JGCTpeXSJSmDWAe2xVkjTNbDDyrT5Gem
 6c02ms0xYeIxqzYpZVZs8OueuZhs2DztcT0e+p7ByvjBZ+XvMEp9t00DnsV3rSEa
 Y9X1vpeZei5bRW+woKCniEhV/89seUe1ASyj/g8yiPYc5b1mKhcUQKFs1vCToWjV
 v0MEp15569jeqX+6igOAloArxykrdmS4hAeMfyKoijApd97n5hkK2jwjFxRv9rZs
 2Q+2qTDA/3E9+wRjLrx4v+Bu6EKH44K5Z5H5rPmnsgRe8/0UQx4xvhI6Bv2Krx0v
 CKdwNAo6Z5iePAtmaMU46l9h1AygOAzub9V2L36Irxd4BFLLYUj1zSW2hN1zgfCX
 4YTgPtTGZ/lBfNsvBy9b
 =nSiE
 -----END PGP SIGNATURE-----

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

Jonathan writes:

First set of new drivers and cleanups for IIO in the 3.15 cycle.

New drivers:
* si7005 relative humidity and temperature sensor
* Lite-on ltr501 ambient light and proximity sensor

Cleanups
* Clean up some dead comments in max1363
* Drop some obsolete variables in adjd_s311 and tcs3472 left over from
  the introduction of iio_push_to_buffers_with_timestamp.
* Drop some unneeded linux/init.h includes
* Squish a sparse warning in mpl3115 by correctly specifying a be32 variable.
* A number of cleanups and fixes for sca3000
* Drop an unneed checks in mxs-lradc, ad7303 and adis16400.
* Drop a platform_set_drvdata in viperboard after the only use of it was
  removed during a devm conversion.
* Add a missing device name for ak8975 to comply with the ABI.
* Put mpu6050 into the IMU menu as it slipped out into the main menu.
* Fix a typo and some comment formatting in mpu6050.
* Document at91 ADC clock properties.
2014-02-11 14:12:12 -08:00
Hartmut Knaack d180371d41 staging:iio:ad799x fix typo in ad799x_events[]
This patch fixes a typo in ad799x_events[], which caused the error "Failed to register event set".

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08 10:12:28 +00:00
Alexandre Belloni 5af473c17a iio: mxs-lradc: remove useless scale_available files
in_voltage8_scale_available and in_voltage9_scale_available are exposed to
userspace but useless as in_voltage8_raw and in_voltage9_raw are not available.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08 10:06:33 +00:00
Alexandre Belloni d4bf105bb6 iio: mxs-lradc: fix buffer overflow
Fixes:
drivers/staging/iio/adc/mxs-lradc.c:1556 mxs_lradc_probe() error: buffer
overflow 'iio->channels' 15 <= 15

The reported available scales for in_voltage15 were also wrong.

The realbits lookup is not necessary as all the channels of the LRADC have the
same resolution, use LRADC_RESOLUTION instead.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08 10:06:30 +00:00
Greg Kroah-Hartman 81e990bbde First set of IIO fixes for the 3.14 cycle.
Included is the patch previously set as the fourth round for 3.13 which was
 to late to be appropriate.
 
 * Another endian fix (ad799x adc) due to missuse of the IIO_ST macro (which
   is going away very shortly)
 * A reversed error check in ad5933 which will make the probe fail.
 * A buffer overflow in the example code in the documentation.
 * ad799x was freeing an irq that might or might not have been requested.
 * tsl2563 was checking the wrong element of chan_spec for modifiers. Thus some
   sysfs reads would give the wrong values.
 * A missing dependency on HAS_IOMEM in spear_adc and lpc32xx was causing some
   test build failures (on s390 and perhaps elsewhere).
 
 I also have a few fixes queued up for things that went in during the 3.14
 merge window which will follow as a separate pull request (to avoid rebasing
 my tree).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJS7+bmAAoJEFSFNJnE9BaIBEIP/Ry6x7SbKwjP71dO0gSrCmbf
 WLO7yE+jy3MRkua/vhRn2nRx76Mk4N0NfZ7aSxja3gE/UMIgDUG0QC5tJgVm+Sol
 rUr+TOn9vrBhvJWoaOuZerkfdEiP1AUE034sQ4BXPm8M+zpf/1t2nRXslFPGx0hw
 bq+XBhBpB2pBlmn8Z6q9DK279elh1cmhuJyFK4BEEa98/fLCfkLoKPWD3L/uDS6/
 ne33LqvcKPgCkEToX5FoSeCibnQI673LgR2zuxfljxVYnkO7y8IqdzwJDExpsNzW
 mGYIrnuGM6ocXe8vIqkqknD9x8xST+mCGrpIUC0MD9eq5AIRzttxZoYKclq3kTTQ
 bukrbuqkiGyC2Hwe50A4+bWM06I8yu/NDUuGxCvKfy26wqwAtXlKGTzwJUg6jHBU
 rssMhYbBLSKmyl0sFlH1xwaHGDZKDNHWz60GpdO2OS516U37JkGvRvRg2bkgomps
 w4OoqXgspE5F1CCnRgy2NYIbN+UlJWY4SGO/boCor5JonYkWnmTq+0sQ4XxehAqc
 sTPW7vXITTkGJmrAgRWmBReI0iE03sC2CDZIOLlGOczJ4tDj7iRh1EN1tAB7gGV8
 n3rIZaE5AfAGKNgLcgF5WaVbnxm/Pd9dr+JdjcFv+I8imKiLCCnj/U23WaD27kUt
 RnMueM0Uu7I1hD3BSbDx
 =otUr
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-3.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

First set of IIO fixes for the 3.14 cycle.

Included is the patch previously set as the fourth round for 3.13 which was
to late to be appropriate.

* Another endian fix (ad799x adc) due to missuse of the IIO_ST macro (which
  is going away very shortly)
* A reversed error check in ad5933 which will make the probe fail.
* A buffer overflow in the example code in the documentation.
* ad799x was freeing an irq that might or might not have been requested.
* tsl2563 was checking the wrong element of chan_spec for modifiers. Thus some
  sysfs reads would give the wrong values.
* A missing dependency on HAS_IOMEM in spear_adc and lpc32xx was causing some
  test build failures (on s390 and perhaps elsewhere).

I also have a few fixes queued up for things that went in during the 3.14
merge window which will follow as a separate pull request (to avoid rebasing
my tree).
2014-02-07 08:57:00 -08:00