Commit Graph

88 Commits

Author SHA1 Message Date
Sachin Kamat 00738ff666 iio: at91_adc: Add missing CONFIG_OF macro
The data structure is required only when DT is enabled.
Hence compile it conditionally.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-04 18:29:49 +01:00
Jingoo Han ddeb64f36d iio: replace strict_strtoul() with kstrtoul()
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-04 18:29:49 +01:00
Greg Kroah-Hartman 829455bb0e Merge 3.10-rc3 into staging-next
We want the changes here, and we resolve the merge conflict that was
happening in the nvec_kbd.c file.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-27 10:54:33 +09:00
Sachin Kamat c619653d77 adc: exynos_adc: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-05-22 22:18:22 +01:00
Oskar Andero f5ce4a7a92 iio: adc: add driver for MCP3204/08 12-bit ADC
This adds support for Microchip's 12 bit AD converters MCP3204 and
MCP3208. These chips communicates over SPI and supports single-ended
and pseudo-differential configurations.

Signed-off-by: Oskar Andero <oskar.andero@gmail.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-05-22 22:16:47 +01:00
Naveen Krishna Chatradhi 927b4dc3e4 iio: exynos_adc: fix wrong structure extration in suspend and resume
The exynos_adc device structure was wrongly extracted from the dev*
correcting the same.

Using the regular conversion of
struct device* -> struct platform_device* -> struct exynos_adc* seems wrong.
Instead we should be doing
struct device* -> struct iio_dev* -> struct exynos_adc*

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-05-22 22:15:20 +01:00
Jean-Christophe PLAGNIOL-VILLARD beca9e767e iio: at91_adc: fix missing Sample and Hold time
On the at91_adc a minimal Sample and Hold Time is necessary for the ADC to
guarantee the best converted final value between two channels selection.
This time has to be programmed through the bitfield SHTIM in the
Mode Register ADC_MR.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-04-02 19:22:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD e748783c55 iio: at91_adc: add sleep mode support
The sleep mode will allow to put the adc in sleep between conversion.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-04-02 19:17:39 +01:00
Ludovic Desroches 47be16b668 iio: at91_adc: add low and high res support
at91 adc offers the choice between two resolutions: low and high.
The low and high resolution values depends on adc IP version, as many IP
properties have been exposed through device tree, these settings have also
been added to the dt bindings.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-04-02 19:17:26 +01:00
Sachin Kamat 1ba0686b2b iio: exynos_adc: Remove redundant of_match_ptr macro
exynos_adc is a DT only driver and exynos_adc_match table is always
compiled in. Hence remove the macro.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-29 09:24:49 +00:00
Lars-Peter Clausen 1e9663c62b iio:trigger: Introduce iio_tigger_{set,get}_drvdata
Introduce iio_tigger_{set,get}_drvdata which allows to attach driver specific
data to a trigger. The functions wrap access to the triggers private_data field
and all current users are updated to use iio_tigger_{set,get}_drvdata instead of
directly accessing the private_data field. This is the first step towards
removing the private_data field from the iio_trigger struct.

The following coccinelle script has been used to update the drivers:
<smpl>
@@
struct iio_trigger *trigger;
expression priv;
@@
-trigger->private_data = priv
+iio_trigger_set_drv_data(trigger, priv)

@@
struct iio_trigger *trigger;
@@
-trigger->private_data
+iio_trigger_get_drv_data(trigger)
</smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-25 21:06:09 +00:00
Doug Anderson bb916ebbea iio: adc: Add dt support for turning on the phy in exynos-adc
Without this change the exynos adc controller needed to have its phy
enabled in some out-of-driver C code.  Add support for specifying the
phy enable register by listing it in the reg list.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Tested-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-17 22:46:55 +00:00
Lars-Peter Clausen f2f7a44970 iio:adc:ad7923: Add support for the ad7904/ad7914/ad7924
The ad7924 is software compatible with the ad7923. The ad7904 and ad7914 are the
8 and 10 bit version of the ad7924.

While we are at it also drop the "with temperature sensor" from the Kconfig
entry, since the chips do not have a temperature sensor.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Patrick Vasseur <patrick.vasseur@c-s.fr>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-17 20:16:41 +00:00
Lars-Peter Clausen ecf6ca2539 iio:ad7923: Implement scale reporting
The driver already claims to support scale reporting in its channel spec, but
doesn't actually implement this yet. This patch uses the regulator API to get
the reference voltage and calculates the scale based on that. The patch also
moves the global configuration bits into a field in the ad7923_state struct,
since depending on the RANGE bit, the range goes either from 0 to VREF or from 0
to 2 * VREF. So we need to know the setting of the RANGE bit when calculating
the scale.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Patrick Vasseur <patrick.vasseur@c-s.fr>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-17 20:16:40 +00:00
Lars-Peter Clausen 135f06465d iio:ad7923: Return error if we didn't get the expected result
Instead of leaving 'val' uninitialized return an error if the result's address
did not match that of the channel we were trying to read.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Patrick Vasseur <patrick.vasseur@c-s.fr>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-17 20:16:40 +00:00
Naveen Krishna Chatradhi 039a9dce0d iio: adc: Kconfig: exynos_adc depends on CONFIG_OF
As the exynos_adc driver only supports device tree registration.
Making driver depend on CONFIG_OF solves possible errors during probe.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-17 20:11:15 +00:00
Jonathan Cameron 7657719f93 iio:adc:ad7923 move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
cc: Patrick Vasseur <patrick.vasseur@c-s.fr>
cc: Christophe Leroy <christophe.leroy@c-s.fr>
2013-03-17 19:49:43 +00:00
Jonathan Cameron 0d23d328c0 iio:adc:exynos move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
2013-03-17 19:49:43 +00:00
Jonathan Cameron 9123972218 iio:adc:viperboard_adc move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars Poeschel <poeschel@lemonage.de>
2013-03-17 19:49:30 +00:00
Jonathan Cameron 6c57252203 iio:adc:ti_am335x_adc move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Patil, Rachna <rachna@ti.com>
2013-03-17 19:49:30 +00:00
Jonathan Cameron c8fe38a7dd iio:adc:ti-adc081 move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
2013-03-17 19:49:29 +00:00
Jonathan Cameron fb45a1b344 iio:adc:lp8778_adc move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Milo(Woogyom) Kim <milo.kim@ti.com>
2013-03-17 19:49:29 +00:00
Jonathan Cameron 01bdab667e iio:adc:at91_adc move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2013-03-17 19:49:29 +00:00
Jonathan Cameron 16d186b1f9 iio:adc:ad7887 move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-03-17 19:49:29 +00:00
Jonathan Cameron 8c1033f733 iio:adc:ad7476 move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-03-17 19:49:29 +00:00
Jonathan Cameron 40dd676d8f iio:adc:ad7298 move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-03-17 19:49:28 +00:00
Jonathan Cameron 3234ac7e6a iio:adc:ad7266 move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-03-17 19:49:28 +00:00
Jonathan Cameron f6e52e59c8 iio:adc:max1363 move to info_mask_(shared_by_type/separate)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-17 19:49:13 +00:00
Naveen Krishna Chatradhi 10f5b14811 iio: adc: add exynos adc driver under iio framwork
This patch adds New driver to support:
1. Supports ADC IF found on EXYNOS4412/EXYNOS5250
   and future SoCs from Samsung
2. Add ADC driver under iio/adc framework
3. Also adds the Documentation for device tree bindings

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-16 10:18:15 +00:00
Christophe Leroy 0eac259db2 IIO ADC support for AD7923
This patch adds support for Analog Devices AD7923 ADC in the IIO Subsystem.

Signed-off-by: Patrick Vasseur <patrick.vasseur@c-s.fr>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-16 10:18:05 +00:00
Linus Torvalds b5c78e04dd Staging tree update for 3.9-rc1
Here's the big staging tree merge for 3.9-rc1
 
 Lots of cleanups and updates for drivers all through the staging tree.
 We are pretty much "code neutral" here, adding just about as many lines
 as we removed.
 
 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.0.19 (GNU/Linux)
 
 iEUEABECAAYFAlEmW7QACgkQMUfUDdst+ymlIACXT5mv8Y5A/KJa+QLTNNsofI8u
 aACgq9hNZxJzX6VQMLXUV8+2SILOqYo=
 =5wIj
 -----END PGP SIGNATURE-----

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

Pull staging tree update from Greg Kroah-Hartman:
 "Here's the big staging tree merge for 3.9-rc1

  Lots of cleanups and updates for drivers all through the staging tree.
  We are pretty much "code neutral" here, adding just about as many
  lines as we removed.

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

* tag 'staging-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (804 commits)
  staging: comedi: vmk80xx: wait for URBs to complete
  staging: comedi: drivers: addi-data: hwdrv_apci3200.c: Add a missing semicolon
  staging: et131x: Update TODO list
  staging: et131x: Remove assignment of skb->dev
  staging: wlan-ng: hfa384x.h: fix for error reported by smatch
  staging/zache checkpatch ERROR: spaces prohibited around that
  staging/ozwpan: Mark read only parameters and structs as const
  staging/ozwpan: Remove empty and unused function oz_cdev_heartbeat
  staging/ozwpan: Mark local functions as static (fix sparse warnings)
  staging/ozwpan: Add missing header includes
  staging/usbip: Mark local functions as static (fix sparse warnings)
  staging/xgifb: Remove duplicated code in loops.
  staging/xgifb: Consolidate return paths
  staging/xgifb: Remove code without effect
  staging/xgifb: Remove unnecessary casts
  staging/xgifb: Consolidate if/else if with identical code branches
  staging: vt6656: replaced custom TRUE definition with true
  staging: vt6656: replaced custom FALSE definition with false
  staging: vt6656: replace custom BOOL definition with bool
  staging/rtl8187se: Mark functions as static to silence sparse
  ...
2013-02-21 12:11:44 -08:00
Guenter Roeck a405b00e44 iio/adc: (max1363) Add support for external reference voltage
Implement external reference voltage as regulator named "vref".

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-06 18:38:40 +00:00
Guenter Roeck 7c3e8675f3 iio: max1363: Use devm_ functions whereever possible to allocate resources
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-06 18:38:40 +00:00
Greg Kroah-Hartman 4e98fcfb95 Third set of IIO new drivers, cleanups and fixes for the 3.9 cycle
New drivers
 1) A driver for ST microelectronics sensors.  This driver already covers
    a large set of new parts (20 gyros, accelerometer and magnetometers)
    not currently covered by the existing drivers.  The intent moving forward
    is to merge this with the other drivers for similar parts already in tree.
    The lis3l02dq driver currently in staging/iio will be trivial, the lis3
    driver in misc more complex as it has a number of additional interfaces.
    Any merging in of the lis3 driver will rely on the not currently
    merged iio_input bridge driver and handling of freefall notifications
    etc.
 
 2) A driver for the itg3200 gyroscope.
 
 Graduations from staging
 1) Cleanup and move out of staging of the adxrs450 gyroscope driver.  The
    cleanup required was all minor but there were a couple of fixes hidden in
    there.
 
 Core and driver additions
 1) Initial work from Guenter Roeck on device tree support for IIO's provider/
    consumer code. Focuses on the iio_hwmon driver and the max1363 adc driver.
    The full device tree syntax is currently under discussion but should
    follow shortly.
 
 Cleanups and fixes
 1) Remove a noop function __iio_update_buffer
 2) Couple of small fixes and cleanups for the max1363
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJRDQDyAAoJEFSFNJnE9BaIqZMP/i2fNpArDu3jXchJZJ1WuB0L
 eY3JdMWOCO/ujPnjf6qWCjqZ+GWzFSSE8q+ZfUFYRv42Hcu2WV06eAeczilRJwzu
 ZZAiWvWMTRV5tIAyg6guMoQvoxA5IHr5nG8JJ6OxY3ZtnnZr76kGm2/XIZCiy23d
 1gFZOm9rew/lozbLdO16kcUm2WNBpX78PHStyQRUFjCGyDaM+BTFQjvZ+xRxKM9o
 G3/snb/ExIIwlrIhwSZecmBhZoXvQhSIl49sKyT2EWGoNdDnC9YqTeYp3UYtBUuO
 3uQ6ne1xGZRBu97CjnKEVpLFAd+xVjB8I2i5CeZWDBUQIkb0DEXV3blOaOLEks0J
 bePhrlyDArdri18CQFFx2h5NwP87SjZ+U4zQkA63JWAXGC/w+vXp+MhxZpdvWXEy
 jI0SKlxaeD5a1N0helc8zvibMZDsYMQSMz+BoI9Js3YpOypz6YNgaaSG8lI1rZ8W
 YOsJiBWl6/jzg36QetD2Uhf8vVsA5KtDLSlLQbUBBjnvrN4XcPr/hWa2tv2GHnGh
 /YMqWA1wOxNSAMaqn1bdJKDNm02+j7B8DfY+3E5m6fVTxwgHQmfPsECrY8k2i6ma
 aMNDNuGnDCbpn8dKiIyQuvt+/1lktClcBcdHWUe/FGZtHdV7Kan5pDZQFLqoddCJ
 mUE2y65xc4Hc2pmjWyim
 =E5mK
 -----END PGP SIGNATURE-----

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

Jonathan writes:

"Third set of IIO new drivers, cleanups and fixes for the 3.9 cycle

New drivers
1) A driver for ST microelectronics sensors.  This driver already covers
   a large set of new parts (20 gyros, accelerometer and magnetometers)
   not currently covered by the existing drivers.  The intent moving forward
   is to merge this with the other drivers for similar parts already in tree.
   The lis3l02dq driver currently in staging/iio will be trivial, the lis3
   driver in misc more complex as it has a number of additional interfaces.
   Any merging in of the lis3 driver will rely on the not currently
   merged iio_input bridge driver and handling of freefall notifications
   etc.

2) A driver for the itg3200 gyroscope.

Graduations from staging
1) Cleanup and move out of staging of the adxrs450 gyroscope driver.  The
   cleanup required was all minor but there were a couple of fixes hidden in
   there.

Core and driver additions
1) Initial work from Guenter Roeck on device tree support for IIO's provider/
   consumer code. Focuses on the iio_hwmon driver and the max1363 adc driver.
   The full device tree syntax is currently under discussion but should
   follow shortly.

Cleanups and fixes
1) Remove a noop function __iio_update_buffer
2) Couple of small fixes and cleanups for the max1363
"
2013-02-05 11:25:37 -08:00
Jonathan Cameron e2d979ccb7 iio:max1363 remove some functions left after merge
merge commit 17cb3be61b
seems to have resulted in two functions that were removed in
4389fbec5b reappearing.

Spotted due to a build kicking out

drivers/iio/adc/max1363.c:1486:12: warning: 'max1363_register_buffered_funcs_and_init' defined but not used
drivers/iio/adc/max1363.c:1521:13: warning: 'max1363_buffer_cleanup' defined but not used

This patch just removes them again.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-02 16:03:32 +01:00
Guenter Roeck 6cb2afd7c0 iio: Simplify iio_map_array_unregister API
Instead of requiring the map to unregister, simply unregister all map entries
associated with the given iio device. This simplifies map removal and also works
for maps generated through devicetree.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-02 12:02:20 +00:00
Guenter Roeck 482bb4e6c6 iio/adc: (max1363) Fix data conversion problems
For chips with more than 8 bit ADC resolution, received data was always
masked against 0xfff, ie with a 12 bit mask. This can result in bad data
for chips with 10 bit resolution if those chips have higher bits set
(seen with MAX1139).

The receive buffer was defined as char array. This could result in
unintentional sign extensions if the upper bit in a received byte
was set. Since the chip is configured for unipolar mode, we never
have to handle negative values, and sign extensions are never needed.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-02 10:08:23 +00:00
Guenter Roeck dcb9ca0a25 iio/adc: (max1363) Remove duplicate code
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-02 10:07:27 +00:00
Guenter Roeck 315ce4b882 iio/adc: (max1363) Provide OF node information to iio device
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-02 09:55:21 +00:00
Guenter Roeck c3a69e6c11 iio/adc: (lp8788) Provide OF node information to iio device
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-02 09:55:21 +00:00
Peter Meerwald 8a9f645fc1 iio: fix Kconfig for max1363
ERROR: "iio_triggered_buffer_setup" [drivers/iio/adc/max1363.ko] undefined!
ERROR: "iio_triggered_buffer_cleanup" [drivers/iio/adc/max1363.ko] undefined!

add select IIO_TRIGGERED_BUFFER

IIO_TRIGGERED_BUFFER in turn selects IIO_TRIGGER and IIO_KFIFO_BUF, so drop those
MAX1363_RING_BUFFER is not used anymore

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-26 10:07:45 +00:00
Greg Kroah-Hartman 8f5f90a872 Merge 3.8-rc5 into staging-next
This resolves a merge issue with a iio driver, and the zram code.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 21:25:02 -08:00
Thierry Reding 5fd984662c iio: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 11:41:56 -08:00
Linus Torvalds b87fc3e6e2 Staging fixes for 3.8-rc3
Here are a number of small fixes to staging drivers for your 3.8-rc3
 tree.
 
 Well, the omapdrm fixes aren't really "small" but they were waiting on a
 number of other drm patches to go in through the drm tree, and got
 delayed by my vacation over the holidays.  They are totally
 self-contained, everyone involved have acked them, and they fix issues
 that people have been having with the driver.
 
 Other than that one, it's a bunch of tiny bugfixes for a number of
 reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlDzjqQACgkQMUfUDdst+ym/FgCfTOKtRk2YP9FJ+GlJnO7Ij2Ez
 r/AAoJhhlxUwn59zhyCA6iIOLLix0tfU
 =llcV
 -----END PGP SIGNATURE-----

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

Pull staging fixes from Greg Kroah-Hartman:
 "Here are a number of small fixes to staging drivers for your 3.8-rc3
  tree.

  Well, the omapdrm fixes aren't really "small" but they were waiting on
  a number of other drm patches to go in through the drm tree, and got
  delayed by my vacation over the holidays.  They are totally
  self-contained, everyone involved have acked them, and they fix issues
  that people have been having with the driver.

  Other than that one, it's a bunch of tiny bugfixes for a number of
  reported issues.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'staging-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (36 commits)
  staging: zram: fix invalid memory references during disk write
  staging: tidspbridge: use prepare/unprepare on dsp clocks
  staging: tidspbridge: Fix build breakage due to splitting CM functions.
  staging: comedi: comedi_test: fix race when cancelling command
  staging: comedi: Kconfig: COMEDI_NI_AT_A2150 should select COMEDI_FC
  staging: comedi: prevent auto-unconfig of manually configured devices
  staging: comedi: fix minimum AO period for NI 625x and NI 628x
  staging: vme_pio2: fix oops on module unloading
  staging: speakup: avoid out-of-range access in synth_add()
  staging: speakup: avoid out-of-range access in synth_init()
  staging: rtl8192e: Fix failure to check pci_map_single()
  staging: rtl8187se: Fix failure to check pci_map_single()
  staging: drm/imx: fix double free bug in error path
  staging: drm/imx: several bug fixes
  staging: drm/imx: check return value of ipu_reset()
  staging: drm/omap: fix flags in dma buf exporting
  staging: drm/omap: use omapdss low level API
  staging/fwserial: Update TODO file per reviewer comments
  staging/fwserial: Limit tx/rx to 1394-2008 spec maximum
  staging/fwserial: Refine Kconfig help text
  ...
2013-01-14 09:08:38 -08:00
Greg Kroah-Hartman 17cb3be61b Merge branch 'staging-linus' into staging-next
This is to get the comedi fixes, and resolve the issue in comdi_test.c
and comedi_fops.c that were caused by changes in both branches.

It also allows the fwserial driver changes to be applied, as they
required the fixes that are in staging-linus.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 15:17:52 -08:00
Kim, Milo 5306f416ad iio: lp8788_adc: fix parent device in kernel message
Use 'dev' of iio device in a kernel message rather than i2c client device node.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-06 11:35:31 +00:00
Kim, Milo dc11699908 iio: lp8788_adc: fix a parent device in _probe()
The lp8788-adc is a platform driver of lp8788-mfd.
 The platform device is allocated when mfd_add_devices() is called
 in lp8788-mfd.
 On the other hand, 'lp->dev' is the i2c client device.

 Therefore, this 'platform_device' is a proper parent device of
 iio device and device kernel message.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-06 11:35:30 +00:00
Greg Kroah-Hartman fc52692c49 Drivers: iio: remove __dev* attributes.
CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, and __devexit
from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-03 15:57:03 -08:00
Peter Meerwald 71d2c120fd iio: max1363 comment and whitespace fixes
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-01 17:38:31 +00:00
Peter Meerwald 4389fbec5b iio: cleanup buffer setup code in max1363 driver
use iio_triggered_buffer_setup(), iio_triggered_buffer_cleanup()

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-01 17:38:30 +00:00