aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio
AgeCommit message (Collapse)Author
2013-03-17iio:amplifiers:ad8366 move to info_mask_(shared_by_type/separate)Jonathan Cameron
The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Michael Hennerich <michael.hennerich@analog.com>
2013-03-17iio:adc:viperboard_adc move to info_mask_(shared_by_type/separate)Jonathan Cameron
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-17iio:adc:ti_am335x_adc move to info_mask_(shared_by_type/separate)Jonathan Cameron
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-17iio:adc:ti-adc081 move to info_mask_(shared_by_type/separate)Jonathan Cameron
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-17iio:adc:lp8778_adc move to info_mask_(shared_by_type/separate)Jonathan Cameron
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-17iio:adc:at91_adc move to info_mask_(shared_by_type/separate)Jonathan Cameron
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-17iio:adc:ad7887 move to info_mask_(shared_by_type/separate)Jonathan Cameron
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-17iio:adc:ad7476 move to info_mask_(shared_by_type/separate)Jonathan Cameron
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-17iio:adc:ad7298 move to info_mask_(shared_by_type/separate)Jonathan Cameron
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-17iio:adc:ad7266 move to info_mask_(shared_by_type/separate)Jonathan Cameron
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-17iio:accel:kxsd9 move to info_mask_(shared_by_type/separate)Jonathan Cameron
The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-17iio:hid_sensors move to info_mask_(shared_by_type/separate)Jonathan Cameron
The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-17iio:adc:max1363 move to info_mask_(shared_by_type/separate)Jonathan Cameron
The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-17iio: Add broken out info_mask fields for shared_by_type and separateJonathan Cameron
This simplifies the code, removes an extensive layer of 'helper' macros and gives us twice as much room to play with in these masks before we have any need to be clever. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-03-16iio: adc: add exynos adc driver under iio framworkNaveen Krishna Chatradhi
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-16iio:common: Use spi_sync_transfer() in STMicroelectronics common libraryDenis Ciocca
Use the new spi_sync_transfer() helper function instead of open-coding it. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-16IIO ADC support for AD7923Christophe Leroy
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-16iio: Add OF supportGuenter Roeck
Provide bindings and parse OF data during initialization. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-06Merge tag 'iio-fixes-for-3.9a' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: "First round of iio fixes post the 3.9 merge window. 1) Some little fixes for the ad5064 dac driver. 2) A build warning 'fix' for a false positive in st_sensors 3) A couple of missing dependencies on IIO_BUFFER. So nothing major and these mostly showed the advantages of the randconfig builds various people have performed."
2013-03-05iio:common:st_sensors fixed all warning messages about uninitialized variablesDenis CIOCCA
Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-02iio/imu: inv_mpu6050 depends on IIO_BUFFERGuenter Roeck
Fix: drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c: In function ‘inv_mpu6050_read_fifo’: drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c:176:3: error: implicit declaration of function ‘iio_push_to_buffers’ [-Werror=implicit-function-declaration] Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-02iio:ad5064: Initialize register cache correctlyLars-Peter Clausen
Initialize the register cache to the proper mid-scale value based on the resolution of the device. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-02iio:ad5064: Fix off by one in DAC value range checkLars-Peter Clausen
The DAC value range check allows values one larger than the maximum value, which effectively results in setting the DAC value to 0. This patch fixes the issue. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-02iio:ad5064: Fix address of the second channel for ad5065/ad5045/ad5025Lars-Peter Clausen
The ad5065, ad5045, ad5025 use address '3' for the second channel, so they need their own channel spec. Note that ad5064_sync_powerdown_mode() also needs to be slightly updated since it was relying on the fact that chan->address always equaled chan->channel. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-21Merge tag 'staging-3.9-rc1' of ↵Linus Torvalds
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-10Invensense MPU6050 Device Driver.Ge Gao
This the basic functional Invensense MPU6050 Device driver. Signed-off-by: Ge Gao <ggao@invensense.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-09iio:st_sensors fix build when !CONFIG_IIO_TRIGGERJonathan Cameron
Partly a case of removing unused headers and partly a case of ifdefing out the iio_trigger_ops structures. This has come about because of an 'unusual' separation of code in this driver. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reported-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Denis Ciocca <denis.ciocca@st.com>
2013-02-09iio: Use spi_sync_transfer()Lars-Peter Clausen
Use the new spi_sync_transfer() helper function instead of open-coding it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-06iio: Update iio_channel_get API to use consumer device pointer as argumentGuenter Roeck
For iio_channel_get to work with OF based configurations, it needs the consumer device pointer instead of the consumer device name as argument. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Anton Vorontsov <anton@enomsg.org> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-06iio: tweak language in industrialio-trigger commentsPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-06iio/adc: (max1363) Add support for external reference voltageGuenter Roeck
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-06iio: max1363: Use devm_ functions whereever possible to allocate resourcesGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-05Merge tag 'iio-for-3.9c' of ↵Greg Kroah-Hartman
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-02iio:max1363 remove some functions left after mergeJonathan Cameron
merge commit 17cb3be61b45d716f6b21a9380925493413ce0ed seems to have resulted in two functions that were removed in 4389fbec5b8fd0577c1e854ff5d7139329558c20 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-02iio: Simplify iio_map_array_unregister APIGuenter Roeck
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-02iio: Update iio_channel_get_all and iio_channel_get_all_cb APIGuenter Roeck
Pass device pointer instead of device name as parameter to iio_channel_get_all and iio_channel_get_all_cb. This will enable us to use OF information to retrieve consumer channel information. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-02iio/adc: (max1363) Fix data conversion problemsGuenter Roeck
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-02iio/adc: (max1363) Remove duplicate codeGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-02iio/adc: (max1363) Provide OF node information to iio deviceGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-02iio/adc: (lp8788) Provide OF node information to iio deviceGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-02iio:common: removed unused functions outside st_sensors libraryDenis CIOCCA
This patch remove st_sensors_get_sampling_frequency_avl and st_sensors_get_scale_avl functions used only in st_sensors_sysfs_sampling_frequency_avail and st_sensors_sysfs_scale_avail sysfs functions. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-02iio: gyro: Add itg3200Manuel Stahl
This patch adds support for the InvenSense itg3200. The itg3200 is a three-axis gyro with 16-bit ADC and I2C interface. Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-02-02staging:iio: Move adxrs450 driver out of stagingLars-Peter Clausen
The adxrs450 is in a reasonable shape now. It follows the IIO ABI and non of the standard code checker tools report any issue, so move it out of staging. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-31staging:iio: Remove noop call to __iio_update_bufferLars-Peter Clausen
__iio_update_buffer updates the buffer's bytes_per_datum and length fields. But the only user of this function just passes in these exact fields, so the call basically looks like this: buffer->bytes_per_datum = buffer->bytes_per_datum; buffer->length = buffer->length; Which means it is a noop and can be removed. Also remove the function itself, since it is now unused. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-31iio:magnetometer: Add STMicroelectronics magnetometers driverDenis Ciocca
This patch adds a generic magnetometer driver for STMicroelectronics magnetometers, currently it supports: LSM303DLHC, LSM303DLM, LIS3MDL. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-31iio:gyro: Add STMicroelectronics gyroscopes driverDenis Ciocca
This patch adds a generic gyroscope driver for STMicroelectronics gyroscopes, currently it supports: L3G4200D, LSM330DL, L3GD20, L3GD20H, LSM330DLC, L3G4IS, LSM330. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-31iio:accel: Add STMicroelectronics accelerometers driverDenis Ciocca
This patch adds a generic accelerometer driver for STMicroelectronics accelerometers, currently it supports: LSM303DLH, LSM303DLHC, LIS3DH, LSM330D, LSM330DL, LSM330DLC, LIS331DLH, LSM303DL, LSM303DLM, LSM330. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-31iio:common: Add STMicroelectronics common libraryDenis Ciocca
This patch add a generic library for STMicroelectronics 3-axis sensors. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-27iio:light:tsl2563 move out of stagingJonathan Cameron
This driver is simple, uses the latest interfaces and contains few if any controversial elements. All of its interfaces have been in place for a long time now. Hence let's move it out of staging. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-01-26staging:iio:adis16080: Move out of stagingLars-Peter Clausen
The driver is rather simple and in a good shape. It follows the IIO ABI and the standard codechecker tools do not report any issues, so move it out of staging. While moving it also remove one outdated 'fixme' comment. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>