summaryrefslogtreecommitdiffstats
path: root/drivers/iio
Commit message (Collapse)AuthorAgeFilesLines
* iio: dac: max517: Use devm_iio_device_allocSachin Kamat2013-08-191-13/+4
| | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Roland Stigge <stigge@antcom.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad7303: Use devm_* APIsSachin Kamat2013-08-191-23/+8
| | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5791: Use devm_* APIsSachin Kamat2013-08-191-26/+9
| | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5764: Use devm_* APIsSachin Kamat2013-08-191-15/+5
| | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5755: Use devm_iio_device_allocSachin Kamat2013-08-191-10/+4
| | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5686: Use devm_* APIsSachin Kamat2013-08-191-13/+4
| | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5624r_spi: Use devm_* APIsSachin Kamat2013-08-191-16/+6
| | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5504: Use devm_* APIsSachin Kamat2013-08-191-23/+8
| | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5449: Use devm_* APIsSachin Kamat2013-08-191-11/+4
| | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5446: Use devm_* APIsSachin Kamat2013-08-191-14/+5
| | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5421: Use devm_* APIsSachin Kamat2013-08-191-15/+4
| | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5380: Use devm_* APIsSachin Kamat2013-08-191-14/+4
| | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5360: Use devm_* APIsSachin Kamat2013-08-191-11/+4
| | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5064: Use devm_* APIsSachin Kamat2013-08-191-15/+6
| | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: adc: twl6030-gpadc: Use devm_* API familyOleksandr Kozaruk2013-08-191-26/+10
| | | | | | | | Using devm_iio_device_alloc and devm_request_threaded_irq makes code simpler. Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: adjd_s311: Cleanup unused #definesPeter Meerwald2013-08-191-18/+10
| | | | | | | using word reads, no need for HI/LO register #defines Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Remove unnecessary _write_raw_get_fmt() in several hid-sensor driversPeter Meerwald2013-08-194-32/+0
| | | | | | | | IIO_VAL_INT_PLUS_MICRO is the default, no need to return it explicitly Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: srinivas pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: trigger: implement devm_iio_trigger_alloc/devm_iio_triger_freeJacek Anaszewski2013-08-171-4/+68
| | | | | | | | | | Add a resource managed devm_iio_trigger_alloc()/devm_iio_triger_free() to automatically clean up triggers allocated by IIO drivers, thus leading to simplified IIO drivers code. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyunmin Park <kyungmin.park@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driverOleksandr Kozaruk2013-08-173-0/+1044
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GPADC is general purpose ADC found on TWL6030, and TWL6032 PMIC, known also as Phoenix and PhoenixLite. The TWL6030 and TWL6032 have GPADC with 17 and 19 channels respectively. Some channels have current source and are used for measuring voltage drop on resistive load for detecting battery ID resistance, or measuring voltage drop on NTC resistors for external temperature measurements. Some channels measure voltage, (i.e. battery voltage), and have voltage dividers, thus, capable to scale voltage. Some channels are dedicated for measuring die temperature. Some channels are calibrated in 2 points, having offsets from ideal values kept in trim registers. This is used to correct measurements. The differences between GPADC in TWL6030 and TWL6032: - 10 bit vs 12 bit ADC; - 17 vs 19 channels; - channels have different purpose(i.e. battery voltage channel 8 vs channel 18); - trim values are interpreted differently. Based on the driver patched from Balaji TK, Graeme Gregory, Ambresh K, Girish S Ghongdemath. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: gyro: st_gyro: Use devm_iio_device_allocSachin Kamat2013-08-173-23/+8
| | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: gyro: itg3200_core: Use devm_iio_device_allocSachin Kamat2013-08-171-11/+4
| | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Christian Strobel <christian.strobel@iis.fraunhofer.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: gyro: adxrs450: Use devm_iio_device_allocSachin Kamat2013-08-171-11/+4
| | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: hid-sensor-gyro-3d: Use devm_iio_device_allocSachin Kamat2013-08-171-12/+5
| | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: gyro: adis16260: Use devm_iio_device_allocSachin Kamat2013-08-171-11/+5
| | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: gyro: adis16136: Use devm_iio_device_allocSachin Kamat2013-08-171-7/+3
| | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: gyro: adis16130: Use devm_iio_device_allocSachin Kamat2013-08-171-19/+4
| | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: gyro: adis16080: Use devm_iio_device_allocSachin Kamat2013-08-171-17/+4
| | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Restore alphabetic order in MakefilePeter Meerwald2013-08-171-1/+1
| | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Add tmp006 IR temperature sensorPeter Meerwald2013-08-175-0/+314
| | | | | | | | | | | | | | | | | | | | | | | | | the TI TMP006 is a non-contact temperature sensor with I2C interface; it measures the surface temperature of a distance object using a thermopile to absorb IR energy emitted from the object the sensor has two channels: IR sensor voltage (16-bit) and reference temperature of the chip (14-bit); datasheet is here: http://www.ti.com/lit/ds/symlink/tmp006.pdf v2 (thanks to Grygorii Strashko, Lars-Peter Clausen, Jonathan Cameron for review comments): * power down device on driver remove * use sign_extend32() * style cleanup * add comments what channel raw LSBs mean * spelling of thermopile Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Jonathan Cameron <jic23@kernel.org> Cc: LM Sensors <lm-sensors@lm-sensors.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Merge 3.11-rc5 into staging-nextGreg Kroah-Hartman2013-08-122-20/+44
|\ | | | | | | | | | | We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * iio: ti_am335x_adc: Fix wrong samples received on 1st readPatil, Rachna2013-07-211-8/+22
| | | | | | | | | | | | | | | | | | | | Previously we tried to read data form ADC even before ADC sequencer finished sampling. This led to wrong samples. We now wait on ADC status register idle bit to be set. Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:trigger: Fix use_count race conditionLars-Peter Clausen2013-07-201-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using more than one trigger consumer it can happen that multiple threads perform a read-modify-update cycle on 'use_count' concurrently. This can cause updates to be lost and use_count can get stuck at non-zero value, in which case the IIO core assumes that at least one thread is still running and will wait for it to finish before running any trigger handlers again. This effectively renders the trigger disabled and a reboot is necessary before it can be used again. To fix this make use_count an atomic variable. Also set it to the number of consumers before starting the first consumer, otherwise it might happen that use_count drops to 0 even though not all consumers have been run yet. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | Revert "iio: add configuration option for debug support"Greg Kroah-Hartman2013-08-052-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 98a5e9e99d05e9b6a14778b85631b55e8e349990. IIO, like the rest of the kernel, should rely on dynamic debugging, not have a special config option for it. That way, no user has to rebuild their kernel to have debug messages, which is a good thing, let's not revert back to the bad old days of the 2000's. Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | iio:mcp4725: Use devm_iio_device_allocPeter Meerwald2013-08-031-19/+7
| | | | | | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio:vcnl4000: Use devm_iio_device_allocPeter Meerwald2013-08-031-12/+4
| | | | | | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio:adjd_s311: Use devm_iio_device_allocPeter Meerwald2013-08-031-10/+5
| | | | | | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: pressure: st_pressure: Use devm_iio_device_allocSachin Kamat2013-08-033-23/+8
| | | | | | | | | | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: frequency: ad9523: Use devm_* APIsSachin Kamat2013-08-031-13/+4
| | | | | | | | | | | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Michael Hennerich <hennerich@blackfin.uclinux.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: amplifiers: ad8366: Use devm_* APIsSachin Kamat2013-08-031-10/+3
| | | | | | | | | | | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Michael Hennerich <hennerich@blackfin.uclinux.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: lps331ap: Modify in_temp_scale calculation wayJacek Anaszewski2013-08-031-1/+4
| | | | | | | | | | | | | | | | | | | | This patch modifies the way how the in_temp_scale output value is calculated. With this implementation it is more clear how the value is obtained. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: light: tsl2563: Use devm_* APIsSachin Kamat2013-08-031-17/+8
| | | | | | | | | | | | | | | | devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: light: lm3533-als: Use devm_iio_device_allocSachin Kamat2013-08-031-5/+2
| | | | | | | | | | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Johan Hovold <jhovold@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: light: hid-sensor-als: Use devm_iio_device_allocSachin Kamat2013-08-031-12/+5
| | | | | | | | | | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: imu: inv_mpu6050: Use devm_iio_device_allocSachin Kamat2013-08-031-17/+10
| | | | | | | | | | | | | | | | Using devm_iio_device_alloc makes code simpler. While at it include missing iio.h header file and do some cleanup. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: imu: adis16480: Use devm_iio_device_allocSachin Kamat2013-08-031-7/+3
| | | | | | | | | | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: imu: adis16400: Use devm_iio_device_allocSachin Kamat2013-08-031-7/+3
| | | | | | | | | | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: magnetometer: st_magn: Use devm_iio_device_allocSachin Kamat2013-08-033-23/+8
| | | | | | | | | | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: magnetometer: hid-sensor-magn-3d: Use devm_iio_device_allocSachin Kamat2013-08-031-12/+7
| | | | | | | | | | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | staging:iio:adis16260: Move out of stagingLars-Peter Clausen2013-08-033-0/+441
| | | | | | | | | | | | | | | | The drivers is in more or less good shape, conforms to the IIO ABI and none of the default static code checker report any problems, so move it out of staging. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: core: Avoid double minus in sysfs outputOleksandr Kravchenko2013-08-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | This patch fixes the issue with double minus in output when reading channels from sysfs for IIO_VAL_INT_PLUS_MICRO and IIO_VAL_INT_PLUS_NANO cases. Until this patch if val and val2 both are negatives output string contains "--" before digits. It is result of "-%d..." in sprintf() format. Signed-off-by: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
OpenPOWER on IntegriCloud