summaryrefslogtreecommitdiff
path: root/drivers/staging/iio
AgeCommit message (Collapse)Author
2011-03-14Staging: IIO: DAC: AD5624R: Consistency cleanup - no functional changesMichael Hennerich
Consistently use indio_dev and access macro for devdata Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14staging: IIO: DAC: AD5446: Add support for AD5601/AD5611/AD5621Michael Hennerich
This patch adds support for the AD5601/AD5611/AD5621 single channel, 8-/10-/12-bit, buffered voltage output DACs. Changes since v1: Sort Kconfig description my number Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14staging: IIO: DAC: AD5446: Add power down supportMichael Hennerich
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14staging: IIO: DAC: AD5446: Add missing ID table entriesMichael Hennerich
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-09Staging: IIO: Documentation: iio_utils: fix channel array generation.Michael Hennerich
The previous implementation flawed, in case some channels are not enabled. The sorted array would then include channel information of disabled channels, And misses the enabled ones, when the count is reached. More troublesome, the loop would not even terminate. The fix is twofold: First we skip channels that are not enabled. Then we use a tested bubble sort algorithm to sort the array. Since we already allocated exactly the number of bytes we need. We can exercise bubble sort on the original memory. In all cases I've seen, the array is already sorted, so this sort terminates immediately. Changes since V1: Fix coding style issues. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-09Staging: IIO: DAC: AD5624R: Update to IIO ABIMichael Hennerich
This driver did not conform with the IIO ABI for such devices. Also the sysfs files that this driver adds were not complete and partially un-documented. Update and document ABI Change License notice, stick to GPL-v2. Fix indention style Add option to specify external reference voltage via the regulator framework. Add mandatory name attribute Add mandatory out_scale attribute Changes since V1: Refine outY_powerdown_mode description Remove bonus white line Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28staging:iio:gyro: adis16060 cleanup, move to abi and bug fixes.Jonathan Cameron
Moved to standard sysfs naming and got rid of direct register writing from userspace. The rx and tx buffers are never used together so just have one and avoid the need to malloc it by using putting it in the state structure and using the ____cacheline_aligned trick. A number of obvious bugs also fixed and correction of register address defines in header which has now been squashed into the driver. I don't have one of these so can't test. This is done off datasheet. Note that the driver had parts that definitely wouldn't work before this patch. Now it 'might' assuming I haven't messed up too badly. I've left fixing the fact that you can only have one of these on a given machine for another day. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28staging:iio:gyro: adis16130 cleanup, move to abi and bug fixes.Jonathan Cameron
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28staging:iio:gyro remove adis16251 driver as now supported by adis16260 driverJonathan Cameron
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28staging:iio:gyro: add adis16251 support to adis16260 driverJonathan Cameron
These parts are very similar and the adis16260 driver supports a lot of additional functionality. Precursor to removal of adis16251 driver. Note that some supported devices were missing from Kconfig help text and are also added in this patch. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28staging:iio:gyro: adis16080 cleanup, move to abi and bug fixes.Jonathan Cameron
Moved to standard sysfs naming and got rid of direct register writing from userspace. The rx and tx buffers are never used together so just have one and avoid the need to malloc it by using putting it in the state structure and using the ____cacheline_aligned trick. Couple of obvious bug fixes whilst I was here. I don't have one of these so can't test. This is done off datasheet. Note that as with the adis16060 driver there are parts that definitely wouldn't work before this patch. Now it 'might' assuming I haven't messed up too badly. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28IIO: ADC: AD799x: Update timestamp handlingMichael Hennerich
Add timestamp attributes. Revise timestamp handling accordingly. Preset timestamp generation. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28IIO: ADC: AD7606: Update timestamp handlingMichael Hennerich
Add timestamp attributes. Revise timestamp handling accordingly. Preset timestamp generation. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28IIO: ADC: AD7887: Update timestamp handlingMichael Hennerich
Add timestamp attributes. Revise timestamp handling accordingly. Preset timestamp generation. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28IIO: ADC: AD7476: Update timestamp handlingMichael Hennerich
Add timestamp attributes. Revise timestamp handling accordingly. Preset timestamp generation. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28IIO: Documentation: iio_utils: fix mask generationMichael Hennerich
Variable sizeint is used uninitialized. Remove sizeint completely and use bits_used instead. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28IIO: Documentation: iio_utils: Prevent buffer overflowMichael Hennerich
The first part of build_channel_array()identifies the number of enabled channels. Further down this count is used to allocate the ci_array. The next section parses the scan_elements directory again, and fills ci_array regardless if the channel is enabled or not. So if less than available channels are enabled ci_array memory is overflowed. This fix makes sure that we allocate enough memory. But the whole approach looks a bit cumbersome to me. Why not allocate memory for MAX_CHANNLES, less say 64 (I never seen a part with more than that channels). And skip the first part entirely. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28IIO: Documentation: iio_utils: style consistency fixMichael Hennerich
No functional changes Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28IIO: Documentation: iio_utils: Avoid double free()Michael Hennerich
filename is used and freed later Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28IIO: Documentation: generic_buffer example: Avoid NULL pointer dereferenceMichael Hennerich
In case optarg n is not given return/exit Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28IIO: ADC: New driver for the AD7298 8-channel SPI ADCMichael Hennerich
This patch adds support for the AD7298: 8-Channel, 1MSPS, 12-Bit SAR ADC with Temperature Sensor via SPI bus. This patch replaces the existing ad7298.c driver completely. It was necessary since, the old driver did not comply with the IIO ABI for such devices. Changes since V1: IIO: ADC: New driver for the AD7298 8-channel SPI ADC Add documentation for new sysfs file tempX_input. Simplify bit defines. Remove outdated comments. Fix indention style. ad7298_show_temp(): Add locking. Simplify temperature calculation. Change temperature result from degrees into milli degrees Celsius. Rename file according to new sysfs ABI documentation Add timestamp attributes. Revise timestamp handling accordingly. Preset timestamp generation. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Reviewed-by: Shubhrajyoti <Shubhrajyoti@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23staging: IIO: trigger: New Blackfin specific trigger driver iio-trig-bfin-timerMichael Hennerich
This driver allows any Blackfin system timer to be used as IIO trigger. It supports trigger rates from 0 to 100kHz in Hz resolution. Changes since V1: IIO: trigger: Apply review feedback Add comment explaining Blackfin hardware timer configurations Fix frequency_store, don't return -EINVAL for frequency set to 0 Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23staging: IIO: DAC: Add support for the AD5543/AD5553Michael Hennerich
Add support for the AD5543/AD5553 SPI 16-/14-Bit DACs Fix typo in kconfig description Changes since V1: reorder Kconfig help text Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23staging: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4Michael Hennerich
This patch adds support for the: AD7606/AD7606-6/AD7606-4 8/6/4-Channel Data Acquisition system (DAS) with 16-Bit, Bipolar, Simultaneous Sampling ADC. Changes since V1: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Apply review feedback Rename sysfs node oversampling to oversampling_ratio. Kconfig: Add GPIOLIB dependency. Use range in mV to better match HWMON. Rename ad7606_check_oversampling. Fix various comments and style. Reorder is_visible cases. Use new gpio_request_one/array and friends. Drop check for SPI max_speed_hz. Changes since V2: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Apply review feedback Documentation: specify unit Avoid raise condition in ad7606_scan_direct() Check return value of bus ops read_block() Changes since V3: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Add missing include file Add linux/sched.h Changes since V4: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Fix kconfig declaration consistently use tristate to avoid configuration mismatches Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23Revert "staging: iio: ak8975: add platform data."Greg Kroah-Hartman
This reverts commit f2f1794835f1d8900d2b15d114c54e70c849809b. It should not be putting code into the include/input/ directory, and lots of other people have complained about it. Cc: Tony SIM <chinyeow.sim.xt@renesas.com> Cc: Andrew Chew <achew@nvidia.com> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging:iio:gyro:adis16130 stub removal and cleanupJonathan Cameron
Get rid of unused stubs for trigger and buffer support. Fix line length issues. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging:iio:gyro:adis16080 unused stub removal and cleanupJonathan Cameron
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging:iio:gyro:adis16060 cleanup and dead code removalJonathan Cameron
Removed stubs related to buffering and triggering. Put them back when they are actually needed. Fixed line length issues. Made a number of functions static as no longer in header. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging:iio:meter remove stubs from ade7854.Jonathan Cameron
General cleanup and use of standard functions to simplfy some spi reads as well. Also added a device id table to the spi version. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging:iio:meter remove stubs from ade7759.Jonathan Cameron
General cleanup and use of standard functions to simplfy some spi reads as well. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging:iio:meter remove stubs from ade7754.Jonathan Cameron
General cleanup and use of standard functions to simplfy some spi reads as well. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging:iio:meter remove stubs from ade7753.Jonathan Cameron
General cleanup and use of standard functions to simplfy some spi reads as well. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging:iio: buffer example - add lots more runtime parametersJonathan Cameron
Add ability to control delay for event free buffers Add ability to control length of buffer Add ability to control how many read cycles occur Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Tested-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging:iio: update example to handle case with no ring eventsJonathan Cameron
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Tested-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging:iio:lis3l02dq allow buffer implementation selectionJonathan Cameron
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging:iio:kfifo buffer implementationJonathan Cameron
A very simple use of a kfifo as an alternative for the ring_sw Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Tested-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging:iio:buffering move the copy to user on rip down into implementationsJonathan Cameron
The current interface is not as adaptable as it should be. Moving this complexity into the implementations makes it easier to add new implementations. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Tested-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging: iio: ak8975: add platform data.Tony SIM
As some of the platform not support irq_to_gpio, we pass gpio port by platform data. Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com> Signed-off-by: Andrew Chew <achew@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09Staging: IIO: DDS: AD9832 / AD9835 driverMichael Hennerich
This is a complete rewrite of the AD9832/35 driver. Purpose was to move this driver to the recently created API for such devices. Changes since V1: IIO: DDS: AD9832 / AD9835 driver: Apply review feedback Save a few bytes, use union for data allocated for spi buffers. Remove use of device IDs. Fix comments. Make master clock mclk always type unsigned long. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09Staging: IIO: TRIGGER: New sysfs based triggerMichael Hennerich
This patch adds a new trigger that can be invoked by writing the sysfs file: trigger_now. This approach can be valuable during automated testing or in situations, where other trigger methods are not applicable. For example no RTC or spare GPIOs. Last but not least we can allow user space applications to produce triggers. IIO: TRIGGER: Apply review feedback by Greg Kroah-Hartman Changes since v1: Add sysfs documentation. Change license notice. Add module alias. Add more Kconfig help text Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02Staging: Merge branch 'staging-next' into 2.6.38-rc3Greg Kroah-Hartman
This was done to resolve conflicts in the following files due to patches in Linus's tree and in the staging-next tree: drivers/staging/brcm80211/brcmsmac/wl_mac80211.c drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31Staging: iio: ad7476_core.c: Fixed i2c -> spi documentation typoRoland Stigge
ad7476_core.c: Fixed i2c -> spi documentation typo Minor documentation fix in comment Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31Staging: iio: max517.c: Fix client obtainment by using iio_dev_get_devdata()Roland Stigge
max517.c: Fix client obtainment by using iio_dev_get_devdata() This patch uses dev_get_drvdata() and iio_dev_get_devdata() instead of to_i2c_client() (broken!) to obtain i2c_client data. Further, some minor typo fixes are included. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-22Staging: iio: Aditional fixpoint formatted output bugfixRoland Stigge
iio: Additional fixpoint formatted output bugfixes Fix some ADC/DAC drivers' _scale interface to correct fixpoint formatted output This patch adds the fixes to ad7887_core.c and ad5446.c Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21Staging: iio: add driver for MAX517/518/519Roland Stigge
IIO Driver for Maxim MAX517, MAX518 and MAX519 DAC Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20Staging: iio: Documented output / DAC interfaceRoland Stigge
Added documentation for: * /sys/bus/iio/devices/deviceX/outY_scale * /sys/bus/iio/devices/deviceX/outY_raw * /sys/bus/iio/devices/deviceX/outY&Z_raw Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20Staging: iio: --/++ confusion in build_channel_array() error cleanuproel kluin
Fix loop: it should decrement Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20iio: Fixpoint formatted output bugfixRoland Stigge
Fix some ADC drivers' _scale interface to correct fixpoint formatted output Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <Michael.Hennerich@analog.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-16Staging: IIO: DDS: AD9833 / AD9834 driverMichael Hennerich
Changes since RFC/v1: IIO: Apply list review feedback Apply list review feedback: Rename attributes to fit IIO convention used in other drivers. Fix typos. Provide ddsX_out_enable as opposed to ddsX_out_disable. Use proper __devexit marking. Use strict_strtoul() to avoid negatives. Changes since v2: IIO: ad9834.c: Apply more list review feedback Update use of dds convenience macros. Fix tabbing. Remove superfluous brackets. Keep output disabled after probe. Remove unnecessary code. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Reviewed-by: Datta Shubhrajyoti <shubhrajyoti@ti.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-16Staging: IIO: dds.h convenience macrosMichael Hennerich
Changes since RFC/v1: IIO: Apply list review feedback Apply list review feedback: Rename attributes to fit IIO convention used in other drivers. Provide ddsX_out_enable as opposed to ddsX_out_disable. Fix typos. Changes since v2: IIO: dds.h: Apply more list review feedback Fix mixture of X and [n] notation for indices. Remove duplicated descriptions. Add store methods to some dds convenience macros. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Reviewed-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>