summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-01-05staging:iio:ad5933: Remove platform data from state structiio-for-3.20aLars-Peter Clausen
The platform data is only used in the probe function. No need to keep it around. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05staging:iio:ad5933: Report temperature as raw valueLars-Peter Clausen
We shouldn't be doing the unit conversion in kernel space. Just report the raw value for the property and the scale. Userspace can do the conversion if necessary. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: buffer: fix custom buffer attributes copyOctavian Purdila
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: ensure scan index is unique at device registerVlad Dogaru
Having two or more channels with the same positive scan_index field makes no sense if the device supports buffering. Prevent this situation by failing to register such a device. Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: mxs-lradc: check ranges of ts propertiesStefan Wahren
The devicetree binding for mxs-lradc defines ranges for the touchscreen properties. In order to avoid unexpected behavior like division by zero, we better check these ranges during probe and abort in error case. Additionally this patch adds an important note from the reference manual about the range of sample delay. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05DT: mxs-lradc: fix ranges of ts propertiesStefan Wahren
This patch fixes off-by-one issues in the devicetree binding of mxs-lradc. According to the i.MX23 and i.MX28 reference manuals [1][2] the range of NUM_SAMPLES is 0..31, but property ave-ctrl is substracted by 1 before used. Considering all limitations the range of DELAY is 1..2047, but also property ave-delay is substracted by 1 before used. The patch has been suggested by Hartmut Knaack and Kristina Martsenko. [1] - http://cache.freescale.com/files/dsp/doc/ref_manual/IMX23RM.pdf [2] - http://cache.freescale.com/files/dsp/doc/ref_manual/MCIMX28RM.pdf Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: imu: kmx61: Use correct base when reading dataDaniel Baluta
We have two IIO devices and we need to adjust the base when reading data. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: imu: kmx61: Remove unnecessary REG_INS1 readDaniel Baluta
Useful in the debugging phase, not needed now. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: imu: kmx61: Fix device initialization when setting trigger stateDaniel Baluta
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: imu: kmx61: Use false instead of 0 for ev_enable_stateDaniel Baluta
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: imu: kmx61: Drop unused device parameterDaniel Baluta
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: imu: kmx61: Fixup parameters alignmentDaniel Baluta
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: imu: kmx61: Enhance error handlingDaniel Baluta
This fixes parts of kmx61 error handling to make code easier to read and to be more consistent with IIO coding conventions: * prefer as single point for error handling instead of duplicating code for each function * directly return a value from a case branch instead of breaking * fix error message for writing REG_CTRL1 Also, add separate error paths for kmx61_trigger_setup/iio_triggered_buffer_setup calls. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: imu: kmx61: Don't ignore kmx61_set_power_state errorsDaniel Baluta
..except while in an error handler, where there is nothing to be done anyway. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: imu: kmx61: Save odr_bits for later useDaniel Baluta
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: inkern: add out of range error messageStefan Wahren
If the DT contains an invalid channel specifier then the probe of iio_hwmon fails with the following message: iio_hwmon: probe of iio_hwmon failed with error -22 So it's better to print out the relevant channel specifier in error case to locate the problem. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-05iio: driver for Semtech SX9500 proximity solutionVlad Dogaru
Supports buffering, IIO events and changing sampling frequency. Datasheet available at: http://www.semtech.com/images/datasheet/sx9500_ag.pdf Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-01staging: iio: dummy: fix compile error when not using bufferingVlad Dogaru
Commit 4ae03019923f ("staging:iio:dummy: Register same channels for device and buffer") has changed the number of parameters for iio_simple_dummy_configure_buffer() only for the IIO_SIMPLE_DUMMY_BUFFER case. Fix this by also changing the placeholder function declared in the header when buffering is not enabled. Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-01iio: frequency: ad9523: Increase sleep time in ad9523_store_eepromRoberta Dobrescu
This patch increases sleep time in ad9523_store_eeprom to 20ms since it isn't timing critical. It fixes the following checkpatch.pl warning: WARNING: msleep < 20ms can sleep for up to 20ms Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-01iio: amplifiers: ad8366: Use right order for type specificationRoberta Dobrescu
This patch fixes the following checkpatch.pl warning: WARNING: type 'char unsigned' should be specified in [[un]signed] [short|int|long|long long] order Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-01iio: amplifiers: ad8366: Remove space before ','Roberta Dobrescu
This patch fixes the following checkpatch.pl error: ERROR: space prohibited before that ',' (ctx:WxW) Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-01iio: light: lm3533-als: Remove space before ','Roberta Dobrescu
This patch fixes the following checkpatch.pl error: ERROR: space prohibited before that ',' (ctx:WxE) Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-01iio: light: Annotate Kconfig entry with module name informationRoberta Dobrescu
This patch fixes the following checkpatch.pl warning: WARNING: please write a paragraph that describes the config symbol fully Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-01iio: accel: Annotate Kconfig entries with module name informationRoberta Dobrescu
This patch fixes the following checkpatch.pl warning: WARNING: please write a paragraph that describes the config symbol fully Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-01iio: accel: mma8452: Remove trailing whitespaceRoberta Dobrescu
This patch fixes the following checkpatch.pl error: ERROR: trailing whitespace Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-01iio: accel: kxcjk-1013: Add a blank line after declarationsRoberta Dobrescu
This patch fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-26staging: iio: accel: sca3000_core.c: Remove unused functionRickard Strandqvist
Remove the function sca3000_check_status() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-26iio: imu: inv_mpu6050: ACPI enumerationSrinivas Pandruvada
Added changes so that the module can be enumerated via ACPI. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-26iio: trigger: Add a blank line after declarationsRoberta Dobrescu
This patch fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-26iio: mma9551: fix sparse warningVlad Dogaru
sparse warnings: (new ones prefixed by >>) >> drivers/iio/accel/mma9551.c:554:57: sparse: mixing different enum types drivers/iio/accel/mma9551.c:554:57: int enum mma9551_tilt_axis versus drivers/iio/accel/mma9551.c:554:57: int enum mma9551_gpio_pin >> drivers/iio/accel/mma9551.c:576:57: sparse: mixing different enum types drivers/iio/accel/mma9551.c:576:57: int enum mma9551_tilt_axis versus drivers/iio/accel/mma9551.c:576:57: int enum mma9551_gpio_pin Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Reviewed-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-26iio: core: Get rid of misleading commentKarol Wrona
This comment did not fit here. It explains why devm_kmalloc uses dr_alloc. Generally is not needed at all. Signed-off-by: Karol Wrona <k.wrona@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-26iio: kfifo: Add resource management devm_iio_kfifo_allocate/freeKarol Wrona
iio kfifo allocate/free gained their devm_ wrappers. Signed-off-by: Karol Wrona <k.wrona@samsung.com> Suggested-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-26iio: kfifo: Remove unused argument in iio_kfifo_allocateKarol Wrona
indio_dev was unused in function body plus some small style fix - add new lines after "if(sth) return sth" and before the last return statement. The argument was removed also in its client. Signed-off-by: Karol Wrona <k.wrona@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-26iio: ABI: add clarification for proximityVlad Dogaru
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-26iio:pressure:bmp280: cleanupHartmut Knaack
The calculations for temperature and pressure compensation were already slightly optimized in comparison to the datasheet. So, it makes sense to optimize even a bit more, making proper use of C operators: - variable t in bmp280_compensate_temp() can be eliminated by directly returning the result of the relevant equation. - make use of the += operator and eliminate an unnecessary parenthesis level in bmp280_compensate_press(). When the initialization of the ctrl_meas register fails, the error message will now mention the right register name. During probe, i2c_set_clientdata() is called, although it is not necessary. Drop it. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Vlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-26iio: frequency: Remove unnecessary braces around single statement blockRoberta Dobrescu
This patch fixes the following checkpatch.pl warning: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-26iio: frequency: Remove 'out of memory' messageRoberta Dobrescu
This patch fixes the following checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-12iio: imu: kmx61: kmx61_set_wake_up_odr() can be statickbuild test robot
drivers/iio/imu/kmx61.c:422:5: sparse: symbol 'kmx61_set_wake_up_odr' was not declared. Should it be static? Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-12iio: imu: kmx61: Add support for any motion triggerDaniel Baluta
We use WUFE (Wake Up from Sleep Engine) and BTSE (Back to Sleep Engine) to detect general motion input. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-12iio: imu: kmx61: Add support for data ready triggersDaniel Baluta
This creates a data ready trigger per IIO device. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-12iio: imu: kmx61: Add PM sleep supportDaniel Baluta
Per sensor state (ACTIVE/STANDBY) is saved in driver's private data (acc_stby/mag_stby) and restored when resume is called. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-12iio: imu: kmx61: Add PM runtime supportDaniel Baluta
By default both sensors are ACTIVE, in this way the driver will work even if CONFIG_PM_RUNTIME is not selected. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-12iio: imu: kmx61: Add acpi supportDaniel Baluta
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-12iio: imu: Add support for Kionix KMX61 sensorDaniel Baluta
Minimal implementation for KMX61 6-axis accelerometer/magnetometer. It exports raw accel/magn readings together with scale and sampling frequency. This driver uses two IIO devices one for accelerometer and one for magnetometer. Datasheet will be available at: http://www.kionix.com/6-axis-accelerometer-magnetometer/kmx61 Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-12Revert "iio: imu: Add support for Kionix KMX61 sensor"Jonathan Cameron
The two halves of this part can run largely independently. Hence a version 4 of this patch followed that reorganized things completely. This reverts commit d7d787d29148cde12958c2e3765ad3a55dc55eaf.
2014-12-12iio: add driver for Freescale MMA9551LVlad Dogaru
Add support for Freescale MMA9551L Intelligent Motion-Sensing Platform. The driver supports raw reads for acceleration and inclination, as well as configuring inclination rate-of-change events. The events can be used similarly to an Android sensor Tilt event. The specifications can be downloaded from: http://www.freescale.com/files/sensors/doc/ref_manual/MMA955xLSWRM.pdf Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-12iio: Add ABI documentation for input current readingsAdam Thomson
Add information on in_current related readings. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-12iio: consumer.h: Fix scale factor in function commentIvan T. Ivanov
1 milivolt is equal to 1000000 nanovolts. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-12iio: accel: kxcjk-1013: power off device if probe failsIrina Tirdea
When the device is initialized in probe, it is also powered on. If there is an error after the initialization, the device will remain powered on. Power off the device in case probe fails after device initialization. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Suggested-by: Daniel Baluta <daniel.baluta@intel.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-12iio: accel: kxcjk-1013: error handling when set mode failsIrina Tirdea
If there is an error in set mode at runtime resume, reset the state of the runtime usage count. If there is an error in set mode at runtime suspend, make sure the framework retries to suspend the device. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>