summaryrefslogtreecommitdiff
path: root/drivers/staging/iio
AgeCommit message (Collapse)Author
2012-04-20staging: iio: light: convert multiple spaces to tabLaxman Dewangan
Using tab inplace of multiple spaces for indenting. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio: drop procesed_val element of chan_spec.Jonathan Cameron
There is no longer any need for this as we have separate info_mask elements for raw and processed value reads. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio: Make read / write attributes for channel values optional.Jonathan Cameron
Until now all channels have had read/write attributes. This patch allows for channels where we can't actually read the value (or for output devices, write it!) v2 introduces separate elements for processed and raw thus removing some special case code from the core. Thanks to Lars-Peter for an excellent suggestion! Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:isl29028 Add IIO_CHAN_INFO_RAW/PROCESSED entriesJonathan Cameron
Precursor to making value read / write attribute optional. This one stands along as it merged just before the series doing all the other drivers. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:meter Add IIO_CHAN_INFO_RAW entries to all drivers.Lars-Peter Clausen
Precursor to making value read / write attribute optional. No processed values in resolvers at the moment. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio: Add IIO_CHAN_INFO_RAW entries to the dummy driverLars-Peter Clausen
Precursor to making value read / write attribute optional. No processed values in resolvers at the moment. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:cdc Add IIO_CHAN_INFO_RAW/PROCESSED entries to all drivers.Jonathan Cameron
Precursor to making value read / write attribute optional. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:impedance Add IIO_CHAN_INFO_RAW/PROCESSED entries to all drivers.Jonathan Cameron
Precursor to making value read / write attribute optional. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:resolver Add IIO_CHAN_INFO_RAW entries to all drivers.Jonathan Cameron
Precursor to making value read / write attribute optional. No processed values in resolvers at the moment. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:magnetometer Add IIO_CHAN_INFO_RAW entries to all drivers.Jonathan Cameron
Precursor to making value read / write attribute optional. No processed values for magnetometers. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:light Add IIO_CHAN_INFO_RAW/PROCESSED entries to all drivers.Jonathan Cameron
Precursor to making value read / write attribute optional. Note that minimal change route taken here. The read_raw callbacks in both drivers could do fewer checks to identify the channel than they now do. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:imu Add IIO_CHAN_INFO_RAW entries to all drivers.Jonathan Cameron
Precursor to making value read / write attribute optional. No processed values in IMU. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:gyro Add IIO_CHAN_INFO_RAW entries to all drivers.Jonathan Cameron
Precursor to making value read / write attribute optional. No processed values in gyroscopes. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:dac Add IIO_CHAN_INFO_RAW entries to all drivers.Jonathan Cameron
Precursor to making value read / write attribute optional. No processed versions in DACs. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:adc Add IIO_CHAN_INFO_RAW entries to all drivers.Jonathan Cameron
Precursor to making value read / write attribute optional. No processed values for adc's. Updated to include the spear adc driver (hence introducing a dependency on the patch that adds that driver). Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:accel Add IIO_CHAN_INFO_RAW entries to all drivers.Jonathan Cameron
Precursor to making value read / write attribute optional. No processed values in accelerometers. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio: add a raw and processed elements to info_maskJonathan Cameron
This will allow us to have drivers where the channel value may not be read or written but other information is available. Also adds the ability to have both processed and raw access to a given channel, though in most cases this doesn't make sense. Ultimately will lead to simpler code by allowing us to drop the special case handling for the value reading cases. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging: iio: light: isl29028: fix correct mask valueLaxman Dewangan
The mask value in the read_raw/write_raw is absolute value, not the bit position value. Fixing this in the implemented function to check value, not with the bit position value. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:adc: Add SPEAr ADC driverStefan Roese
This patch implements the basic single data conversion support for the SPEAr600 SoC ADC. The register layout of SPEAr600 differs a bit from other SPEAr SoC variants (e.g. SPEAr3xx). These differences are handled via DT compatible testing. Resulting in a multi-arch binary. This driver is currently tested only on SPEAr600. Future patches may add support for other SoC variants (SPEAr3xx) and features like software buffer or DMA. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Viresh Kumar <viresh.kumar@st.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging: iio: add driver for isl29028Laxman Dewangan
Intersil's ISL29028 is concurrent Ambient Light and Proximity Sensor device. Add driver to access the light and IR intensity and proximity value via iio interface. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging: iio: add channel info for sampling frequencyLaxman Dewangan
Adding channel info IIO_CHAN_INFO_SAMP_FREQ to select different sampling frequency per channel wise. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:core drop the IIO_CHAN macro for ease of maintenance.Jonathan Cameron
I was warned long ago that this macro would cause trouble but didn't heed the advice, hence I'm unwinding it now! Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:meter:ade7758 unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:impedance-analyzer:ad5933 unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:gyro:adis16260 unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:accel:ad7780 unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:adc:ad7476 unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. V2 has the cleanup Lars-Peter suggested. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:adc:ad7298 unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:accel:sca3000 unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:accel:lis3l02dq unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:accel:adis16240 unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:accel:adis16209 unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. Note the addition of extend_name = "supply" for the supply voltage adc. This brings this driver into line with the other adis parts. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:accel:adis16204 unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. Note that previously the supply was not indexed. I have made it indexed for consistency with other similar devices and for internal consistency with the aux adc port. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:accel:adis16203 unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:accel:adis16201 unwind use of IIO_CHAN macro.Jonathan Cameron
This macro is being removed to simplify ongoing maintenance so we need to unwind and remaining users. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio: chan_spec - take extend_name constant.Jonathan Cameron
I can't envision a case where this is not constant and we don't seem to have any in tree, so lets clear up this loose end. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:iio_core.h make less dependent on other included headersJonathan Cameron
There are a lot of pointers to structures used in here that are not declared unless a particular header is included first. Deal with the IIO specific ones by putting in forward declarations and the other ones by including kernel.h and device.h. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:Documentation: Fix a cut and paste error.Jonathan Cameron
falling is repeated in some entries instead of 1x falling and 1x rising for the entry. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13staging:iio:light:tsl2563 channel spec buglet / always reading same adc.Jonathan Cameron
The IIO_LIGHT channel was not marked as being a processed_val despite clearly being in lux. The IIO_INTENSITY channel reads were dependent on channel and that isn't specified for either adc (as they now use modifiers). Hence use the modifier instead. Reported-by: Jon Brenner <jbrenner@taosinc.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging:iio: use spi->irq valid rather than querying available modesJonathan Cameron
Given these drivers only try to add the trigger if a valid irq is present it is clearer to check the same condition when deciding whether to remove it on a later trigger. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging:iio:accel:lis3l02dq add symmetry to check for presence of trigger.Jonathan Cameron
Checking indio_dev->modes is uggly and not symmetric with the conditions on whether triggers are allowed in the first place. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging:iio:max1363 enable use with inkernel interfaces.Jonathan Cameron
Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging:iio fill in some missing docsJonathan Cameron
Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging:iio:adc:max1363 fix missing update_scan_mask callback.Jonathan Cameron
When moving over to the new sw_ring_preenable I managed to add this callback to only one of the two iio_info structures. As such only some devices will currently work. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging:iio:buffer example fix typosJonathan Cameron
I have no idea how I managed to munge the previous patch related to this. Sorry all. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-24Merge tag 'module-for-3.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux Pull cleanup of fs/ and lib/ users of module.h from Paul Gortmaker: "Fix up files in fs/ and lib/ dirs to only use module.h if they really need it. These are trivial in scope vs the work done previously. We now have things where any few remaining cleanups can be farmed out to arch or subsystem maintainers, and I have done so when possible. What is remaining here represents the bits that don't clearly lie within a single arch/subsystem boundary, like the fs dir and the lib dir. Some duplicate includes arising from overlapping fixes from independent subsystem maintainer submissions are also quashed." Fix up trivial conflicts due to clashes with other include file cleanups (including some due to the previous bug.h cleanup pull). * tag 'module-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: lib: reduce the use of module.h wherever possible fs: reduce the use of module.h wherever possible includecheck: delete any duplicate instances of module.h
2012-03-21Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree from Jiri Kosina: "It's indeed trivial -- mostly documentation updates and a bunch of typo fixes from Masanari. There are also several linux/version.h include removals from Jesper." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits) kcore: fix spelling in read_kcore() comment constify struct pci_dev * in obvious cases Revert "char: Fix typo in viotape.c" init: fix wording error in mm_init comment usb: gadget: Kconfig: fix typo for 'different' Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c" writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header writeback: fix typo in the writeback_control comment Documentation: Fix multiple typo in Documentation tpm_tis: fix tis_lock with respect to RCU Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c" Doc: Update numastat.txt qla4xxx: Add missing spaces to error messages compiler.h: Fix typo security: struct security_operations kerneldoc fix Documentation: broken URL in libata.tmpl Documentation: broken URL in filesystems.tmpl mtd: simplify return logic in do_map_probe() mm: fix comment typo of truncate_inode_pages_range power: bq27x00: Fix typos in comment ...
2012-03-07staging:iio:tsl2563 rewrite probe error handlingGrant Grundler
tsl2563 probe function has two minor issues with it's error handling paths: 1) it is silent (did not report errors to dmesg) 2) did not return failure code (mixed up use of ret and err) and two major issues: 3) goto fail2 would corrupt a free memory pool ("double free") 4) device registration failure did NOT cancel/flush delayed work. (and thus dereference a freed data structure later) The "double free" is subtle and was introduced with this change: Author: Jonathan Cameron <jic23@cam.ac.uk> Date: Mon Apr 18 12:58:55 2011 +0100 staging:iio:tsl2563 take advantage of new iio_device_allocate private data. Originally, chip was allocated seperately. Now it's appended to the indio_dev by iio_allocate_device(sizeof(*chip)). So we only need one kfree call as well (in iio_free_device()). Gory details of tracking this down are here: http://crosbug.com/26819 Despite iio_device_registration failing, system can at least now boot. Will follow up with a fix to "double register : in_intensity_both_raw" error that is included in the bug report. Signed-off-by: Grant Grundler <grundler@chromium.org> Acked-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Bryan Freed <bfreed@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07staging:iio: Fix compile error without CONFIG_DEBUG_FSLars-Peter Clausen
commit e553f182d ("staging: iio: core: Introduce debugfs support, add support for direct register access") added a '#if defined(CONFIG_DEBUG_FS)' around iio_read_channel_ext_info and iio_write_channel_ext_info causing the following compile error if CONFIG_DEBUG_FS is not defined. drivers/staging/iio/industrialio-core.c:621:11: error: 'iio_read_channel_ext_info' undeclared (first use in this function) drivers/staging/iio/industrialio-core.c:623:11: error: 'iio_write_channel_ext_info' undeclared (first use in this function) This patch fixes the issue by moving the functions out of the '#if defined(CONFIG_DEBUG_FS)' section again. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-03staging: iio: Convert platform_drivers to use module_platform_driverMichael Hennerich
No functional changes. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>