summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* iio: staging: sca3000: hide stufftoread logicJosselin Costanzi2014-06-292-4/+7
| | | | | | | | Change sca3000_ring implementation so that it exports a data_available function to iio. Signed-off-by: Josselin Costanzi <josselin.costanzi@mobile-devices.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: Coding style issues fix.Federico Di Pierro2014-06-291-8/+6
| | | | | | | | Fix some little style issues in drivers/staging/iio/frequency/ad9832.c . This is my latest task of the eudyptula challenge (third attempt!) Signed-off-by: Federico Di Pierro <nierro92@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: magnetometer: ak8975: Use devm_* APIsBeomho Seo2014-06-291-44/+14
| | | | | | | This patch use devm_* APIs make driver simpler. Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Documentation: iio: Extend documentation for hmc5843 bindings.Marek Belisko2014-06-291-0/+3
| | | | | Signed-off-by: Marek Belisko <marek@goldelico.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: hmc5843: Add all available models to device tree id table.Marek Belisko2014-06-291-1/+3
| | | | | Signed-off-by: Marek Belisko <marek@goldelico.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: ad9850.c: code cleanupGuillaume Morin2014-06-291-6/+0
| | | | | | | | | | | | | checkpath.pl was complaining about value_mask: ERROR: Macros with complex values should be enclosed in parenthesis I fixed this by simply removing it since it's not used (as well as another macro). Got rid of the un-necessary error_ret label as well. Signed-off-by: Guillaume Morin <guillaume@morinfr.org> Reported-by: Michael Welling <mwelling@ieee.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: add support of the max1027Philippe Reynes2014-06-284-0/+553
| | | | | | | | | | | | This driver add partial support of the maxim 1027/1029/1031. Differential mode is not supported. It was tested on armadeus apf27 board. Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: light: cm32181: Use devm_* APIsBeomho Seo2014-06-211-10/+1
| | | | | | | | This patch changes API from iio_device_register() to devm_* API. Using API make code simpler. Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: mcp4902/mcp4912/mcp4922 dac driverMichael Welling2014-06-213-0/+227
| | | | | | | | This patch provides an iio device driver for the Microchip MCP49x2 series DACs. Signed-off-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: kxcjk1013 Fix missing unlock errorsSrinivas Pandruvada2014-06-161-2/+6
| | | | | | | | | | | | | Fix unlock at two places. One when i2c error occurs and other when trigger set state when raw read is in progress. kbuild test robot errors: >> >> drivers/iio/accel/kxcjk-1013.c:531:3-9: preceding lock on line 524 >> >> drivers/iio/accel/kxcjk-1013.c:376:4-10: preceding lock on line 368 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: AK09911 : 3 axis compass supportSrinivas Pandruvada2014-06-163-0/+337
| | | | | | | | | | | | | | | | | Added IIO magnetometer driver for AK09911. In functionality is resembles AK8975 or AK8963. But there are several differences, so instead of modifying existing AK8975 driver and keep it clean, implemented as a separate driver. The key differences are: - Register map is different and have different indexes - AK09911 is a very compact interface with no DRDY pin. So no support of interrupt or GPIO poll - Even for polled mode no mention on ST2 register, which is required in ak8975 driver - mode values are different for fuse access Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: kxcjk1013 3-axis accelerometer driverSrinivas Pandruvada2014-06-144-0/+795
| | | | | | | | | This patch adds IIO driver for KXCJK 1013 triaxis accelerometer sensor. The specifications for this driver is downloaded from: http://www.kionix.com/sites/default/files/KXCJK-1013%20Specifications%20Rev%202.pdf Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Remove timestamp argument from iio_trigger_poll() and ↵Peter Meerwald2014-06-1414-21/+18
| | | | | | | | | iio_trigger_poll_chained() argument has been ignored; adjust drivers accordingly Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: fix coding style by adding blank lines in iio_simple_dummyJimmy Picard2014-06-141-0/+2
| | | | | | | | This patch fixes coding style reported by checkpatch.pl that missing a blank line after declarations. Signed-off-by: Jimmy Picard <jimmyp11f155@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio-trig-periodic-rtc: Allow to reset frequency to 0Peter Meerwald2014-06-141-3/+16
| | | | | | | | | | | | | periodic rtc trigger initially has frequency 0 it is possible to change trigger frequency on-the-fly, but it is not possible to set frequency back to 0 this patch allows to set trigger frequency to 0, thereby disabling the rtc interrupt Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio-trig-periodic-rtc: CleanupPeter Meerwald2014-06-141-4/+3
| | | | | | | | Fix extra space in module description Silence output about trigger frequency when trigger gets enabled/disabled Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio: Fix error handling in generic_buffer examplePeter Meerwald2014-06-141-3/+6
| | | | | | | | read() does not return -EAGAIN read() returns -1 and the errno value needs to be checked for -EAGAIN Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio: Fix mention of INDIO_RING_TRIGGERED to INDIO_BUFFER_TRIGGEREDPeter Meerwald2014-06-141-1/+1
| | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio: Fix iio_utils.h function prototypesPeter Meerwald2014-06-141-3/+3
| | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio: Update iio_event_monitor programPeter Meerwald2014-06-141-0/+10
| | | | | | | add types recently added Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Move documentation of iio-trig-sysfs to ABI/testingPeter Meerwald2014-06-141-0/+0
| | | | | | | iio-trig-sysfs has left staging with commit e64e7d5c Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad7298: Use BIT() and GENMASK() macrosPeter Meerwald2014-06-141-12/+9
| | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad7476: Use GENMASK() macroPeter Meerwald2014-06-141-3/+2
| | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad7887: Use BIT() and GENMASK() macrosPeter Meerwald2014-06-141-11/+10
| | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad5504: Use BIT() and GENMASK() macrosPeter Meerwald2014-06-141-6/+5
| | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad5791: Use BIT() and GENMASK() macrosPeter Meerwald2014-06-141-15/+14
| | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad799x: Fix ad799x_chip_info kerneldocPeter Meerwald2014-06-141-2/+1
| | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Add t5403 barometric pressure sensor driverPeter Meerwald2014-06-143-0/+286
| | | | | | | | | | | | | | | | | | | | | | | 16-bit pressure and temperature sensor the chip can do I2C and SPI, only the I2C interface is supported by the driver at the moment datasheet: http://www.epcos.com/inf/57/ds/T5400.pdf application note: http://www.epcos.com/blob/993154/download/1/t5403-applicationnote.pdf an out-of-tree driver targetting the input subsystem is at https://github.com/unixphere/t5400, it was rejected here: http://comments.gmane.org/gmane.linux.kernel.input/28107 v2: (thanks Hartmut Knaack) * fix MODE_HIGH, equals 2 * check INT_TIME mask in write_raw() Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: Stefan Nilsson <stefan.nilsson@unixphere.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Add ABI documentation for proximityPeter Meerwald2014-05-291-0/+13
| | | | | | | | | has been in use for a long time, but never documented proximity is unit-less, except otherwise stated, see e.g. the as3935 driver where it is meter Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* fix format string missmatch in staging/iio/Documentation/iio_utils.hToralf Förster2014-05-251-2/+2
| | | | | | | spotted by cppcheck Signed-off-by: Toralf Förster <toralf.foerster@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:max1363 incorrect resolutions for max11604, max11605, max11610 and ↵Jonathan Cameron2014-05-251-8/+8
| | | | | | | | | max11611. Cc: Stable@vger.kernel.org> Reported-by: Erik Habbinga <Erik.Habbinga@schneider-electric.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Hartmut Knaack <knaack.h@gmx.de>
* iio: hid-sensors: Set default unit of measure for report intervalArchana Patni2014-05-101-2/+15
| | | | | | | | | | | | | | | | | For PROP_REPORT_INTERVAL, the spec does not mandate the presence of the report interval unit in the feature report and expects the default unit of measure to be used as milliseconds. Currently, when the unit is not present, it gets set as zero leading to issues in sampling frequency. This patch sets the unit of measure to the default unit if it is not defined by firmware. Signed-off-by: Archana Patni <archana.patni@intel.com> Signed-off-by: Subramony Sesha <subramony.sesha@intel.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc: at91 requires the input subsystemArnd Bergmann2014-05-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | Building the at91 adc driver with CONFIG_INPUT disabled results in this build error: ERROR: "input_event" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined! To make sure we can build random configurations, this adds a Kconfig dependency on CONFIG_INPUT, as we do for other similar drivers. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: linux-iio@vger.kernel.org Cc: Josh Wu <josh.wu@atmel.com> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: always select ANON_INODESArnd Bergmann2014-05-101-0/+1
| | | | | | | | | | | | | | | Without ANON_INODES, we get this build error: drivers/built-in.o: In function `iio_event_getfd': :(.text+0x14bf18): undefined reference to `anon_inode_getfd' All other users explicitly select this symbol, so we should do the same thing here. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Jonathan Cameron <jic23@kernel.org> Cc: linux-iio@vger.kernel.org Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: hid-sensors: typo leads to potential forever loopDan Carpenter2014-05-101-1/+1
| | | | | | | | The "i < " was missing in this condition. Fixes: 5d02edfc3957 ('iio: hid-sensors: Convert units and exponent') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Merge branch 'imx-drm-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm ↵Greg Kroah-Hartman2014-05-069-59/+193
|\ | | | | | | | | | | into staging-next imx-drm fixes from Russell
| * imx-drm: ipu-dc: disable DC module when not in usePhilipp Zabel2014-04-263-4/+20
| | | | | | | | | | Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * imx-drm: ipuv3-crtc: change display enable/disable orderPhilipp Zabel2014-04-261-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Now that ipu_dc_disable_channel correctly waits for the channel to finish, we can reorder the enable/disable order to first stop the DC and DI and only then disable the IDMAC. Enabling is done the other way around: IDMAC first, then DC, then DI. This avoids an issue where sometimes the channel would not correctly start, leading to non-working LVDS displays. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * imx-drm: imx-dp: when disabling the DP foreground channel, wait until the DP ↵Philipp Zabel2014-04-261-0/+3
| | | | | | | | | | | | | | background channel is finished before disabling the IDMAC channel Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * imx-drm: ipu-dp: split disabling the DP foreground channel from disabling ↵Philipp Zabel2014-04-263-23/+51
| | | | | | | | | | | | | | | | | | | | the DP module The former has to be done before disabling the DMFC, the latter has to be done afterwards. Otherwise the DMFC FIFOs never get cleared properly. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * imx-drm: ipu-dc: wait for DC_FC_1 / DP_SF_END interruptPhilipp Zabel2014-04-261-21/+50
| | | | | | | | | | | | | | | | Wait for the DC Frame Complete or DP Sync Flow End interrupts before disabling DC channels. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * imx-drm: ipu-dmfc: wait for FIFOs to run empty before disablingPhilipp Zabel2014-04-261-2/+23
| | | | | | | | | | | | | | | | | | Disabling the DMFC module while there is still data in the FIFOs could cause the "new frame before end of frame" error state when the DMFC is enabled again. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * imx-drm: ipu-common: add helpers to check for a busy IDMAC channel and to ↵Philipp Zabel2014-04-262-0/+25
| | | | | | | | | | | | | | busywait for an interrupt Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * imx-drm: ipu-common: add ipu_map_irq to request non-IDMAC interruptsPhilipp Zabel2014-04-262-6/+14
| | | | | | | | | | | | | | This allows to request the DC related interrupts. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * imx-drm: match ipu_di_signal_cfg's clk_pol with its description.Denis Carikli2014-04-262-2/+2
| | | | | | | | | | | | | | | | | | According to the datasheet, setting the di0_polarity_disp_clk field in the GENERAL di register sets the output clock polarity to active high. Signed-off-by: Denis Carikli <denis@eukrea.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | Merge tag 'iio-for-3.16b' of ↵Greg Kroah-Hartman2014-05-0541-186/+1851
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of IIO new drivers, cleanups and functionality for the 3.16 cycle. This set contains a change to the ABI for the hid-sensors drivers to bring them in line with the long published documentation. Unfortunately, rather than reporting true scale and offset values via sysfs they were reporting some magic numbers that could only be converted to anything useful using the HID sensors specification. I missed this entirely through the introduction of a number of drivers, only picking up on it recently. Srinivas has had user feedback about this as well. The patch set is too large to go as a fix at this stage in the cycle and is not a regression fix as this was never right and so will have to wait for the next merge window. Srinivas assures me that there are relatively few pieces of hardware out there and he has had a number of people contact him to point out that the drivers did not obey the ABI. Hence hopefully the fallout of this, if any will be minor. If we don't fix it now, it will only get worse going forward. There is no sensible way of maintaining the incorrect ABI as it is simply returning the wrong values through the standard interfaces. Non IIO elements * Introduce devm_kmemdup. Does what it says on the tin. New drivers: * hid-sensors rotation devices (output as quaternion) * Freescale MPL115A2 presure and temperature sensor. * Melexis mlx90614 contactless infrared sensor. * Freescale MMA8452Q 3-axis accelerometer. New functionality: * Addition of multiple element callback to allow for sysfs interfaces to access elements such as quaternions which have no useful meaning if all 4 elements are not presented together. Other future usecases for this include rotation matrices. * Support for multiple element buffer entries for exactly the same uses as the sysfs related elements described above. * Quaternion support via the quaternion IIO modifier. * TEMP_AMBIENT and TEMP_OBJECT modifiers to distinguish cases with thermopile devices. * hid-sensors gain sysfs access to the sensor readings. Previously these drivers used the buffered interface only. This change involves some additional hid-sensors core support to read poll values back from the devices to allow the drivers to know roughly how long to wait for a result when polling the sensor. There is also an associated hid-sensors abi to allow the devices to be turned off between reads and powered up on demand. Cleanups and fixes * Hid sensors fix as described above. Result is to make the _scale and _offset attributes applicable in the same way as for all other IIO drivers. * Some additional documentation - mostly covering stuff that graduated from staging without managing to take it's ABI docs with it. * A series of little tidy ups to the exynos_adc driver that make the code nicer to read and improve handling of some corner cases. * A tidy up to mag3110 (logical fix rather than a real one ;). Also enable user offset calibration for this device. * Drop some left over IS_ERR() checks from ad799x that snuck through during the cleanup in the last IIO patch set. * Fix a naming issue from clashing patches in ak8975 - note the clash only occured in the last IIO patch set, hence the fix needs to go through this tree. * A format string missmatch fix in ad7280.c. Unlikely to have ever had an impact so not worth rushing through.
| * | iio: hid-sensors: Pressure: Raw read supportSrinivas Pandruvada2014-05-051-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Inclinometer 3D: Raw read supportSrinivas Pandruvada2014-05-051-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Compass 3D: Raw read supportSrinivas Pandruvada2014-05-051-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Proximity: Raw read supportSrinivas Pandruvada2014-05-051-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>