iio: bmc150: refactor slope duration and threshold update
authorOctavian Purdila <octavian.purdila@intel.com>
Sat, 31 Jan 2015 00:00:03 +0000 (02:00 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 8 Feb 2015 10:36:41 +0000 (10:36 +0000)
commit802a3aef30917cc20279d17fe4d0e8568d5c7814
treed15955f47661585e23950d6d48b50418a2999c71
parent6da9b382bd2b6e1b910d7e3512a8a115c8c5f113
iio: bmc150: refactor slope duration and threshold update

Move the slope duration and threshold update in a separate function to
reduce code duplicate between chip init and motion interrupt setup.

Also move the slope update code from the interrupt setup function to
the trigger set state function so that we can later refactor the
interrupt code.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/bmc150-accel.c