iio: accel: kxcjk1013: allow using an external trigger
authorVlad Dogaru <vlad.dogaru@intel.com>
Fri, 3 Apr 2015 12:03:02 +0000 (15:03 +0300)
committerJonathan Cameron <jic23@kernel.org>
Thu, 9 Apr 2015 13:20:02 +0000 (14:20 +0100)
commita25691c1f9674090fb66586cf4c5d60d3efdf339
tree0502626ff1553feff17d869f84c14fa063208872
parent53375103eae8dd6b717b170c69b72ac50fa01985
iio: accel: kxcjk1013: allow using an external trigger

In its present state, the driver mandates that its buffer only be
triggered by one of the device's own triggers (data ready or any
motion).  This is not always desirable, for example because the
interrupt pins may not be wired in.

Patch the driver to be able to accept using an external trigger, such as
one based on hrtimer.  When using such a trigger, we need to ensure that
the device is powered on when the buffer is started.  We do that by
setting setup_ops for the buffer.

Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/kxcjk-1013.c
This page took 0.024475 seconds and 5 git commands to generate.