aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/imu/kmx61.c
Commit message (Collapse)AuthorAge
* iio kmx61 / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PMDaniel Baluta2015-01-20
| | | | | | | | | | | | | After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under drivers/iio/imu/kmx61.c Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: imu: kmx61: Use correct base when reading dataDaniel Baluta2015-01-05
| | | | | | | | | 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>
* iio: imu: kmx61: Remove unnecessary REG_INS1 readDaniel Baluta2015-01-05
| | | | | | | | 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>
* iio: imu: kmx61: Fix device initialization when setting trigger stateDaniel Baluta2015-01-05
| | | | | | 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>
* iio: imu: kmx61: Use false instead of 0 for ev_enable_stateDaniel Baluta2015-01-05
| | | | | | 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>
* iio: imu: kmx61: Drop unused device parameterDaniel Baluta2015-01-05
| | | | | | 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>
* iio: imu: kmx61: Fixup parameters alignmentDaniel Baluta2015-01-05
| | | | | | 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>
* iio: imu: kmx61: Enhance error handlingDaniel Baluta2015-01-05
| | | | | | | | | | | | | | | 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>
* iio: imu: kmx61: Don't ignore kmx61_set_power_state errorsDaniel Baluta2015-01-05
| | | | | | | | | ..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>
* iio: imu: kmx61: Save odr_bits for later useDaniel Baluta2015-01-05
| | | | | | 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>
* iio: imu: kmx61: kmx61_set_wake_up_odr() can be statickbuild test robot2014-12-12
| | | | | | | | 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>
* iio: imu: kmx61: Add support for any motion triggerDaniel Baluta2014-12-12
| | | | | | | | 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>
* iio: imu: kmx61: Add support for data ready triggersDaniel Baluta2014-12-12
| | | | | | | 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>
* iio: imu: kmx61: Add PM sleep supportDaniel Baluta2014-12-12
| | | | | | | | | 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>
* iio: imu: kmx61: Add PM runtime supportDaniel Baluta2014-12-12
| | | | | | | | 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>
* iio: imu: kmx61: Add acpi supportDaniel Baluta2014-12-12
| | | | | Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: imu: Add support for Kionix KMX61 sensorDaniel Baluta2014-12-12
| | | | | | | | | | | | | 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>
* Revert "iio: imu: Add support for Kionix KMX61 sensor"Jonathan Cameron2014-12-12
| | | | | | | 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.
* iio: imu: Add support for Kionix KMX61 sensorDaniel Baluta2014-11-22
Minimal implementation for KMX61 6-axis accelerometer/magnetometer. It exports raw accel/magn readings together with scale and sampling frequency. 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>