All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/11] iio: add support for hardware buffers
@ 2014-12-21  0:42 Octavian Purdila
  2014-12-21  0:42 ` [PATCH v2 01/11] iio: buffer: fix custom buffer attributes copy Octavian Purdila
                   ` (10 more replies)
  0 siblings, 11 replies; 50+ messages in thread
From: Octavian Purdila @ 2014-12-21  0:42 UTC (permalink / raw)
  To: linux-iio; +Cc: Octavian Purdila

This 2nd patch set brings a new approach to hadware buffers, as a
result of the feedback from the first patch set. It also fixes a few
issues in the bmc150 refactor patches found during the review.

It builds on the patch of Josselin and Yannick but with the timeout
parameter removed, as the poll timeout can be used instead (for
non-blocking reads).

In order to provide support for hardware buffers a driver must expose
a watermark trigger, a function to set the watermark level in hadware
and a function to flush the hardware buffers. It must also expose the
maximum number of samples that the hardware buffer can hold. When the
watermark trigger is set the driver must make sure that the hardware
buffer is operational so that we can hold samples until the watermark
level is reached. When the watermark level is reached (the watermark
triggered is activated) and when the flush operation is called, the
driver must read all of the entries from the hardware buffers and
store then in the device buffer.

>From the userspace point of view, to enable hardware buffers, the
application must set the device buffer and the watermark level to an
appropriate value then switch to using the watermark trigger. At that
point the data will be hold in the hadware buffer and the processor
will not be interrupted until the hadware buffer level reaches the
watermark level. 

The application can force a flush operation when reading from the
device and there is not enough data available to satisfy the
request. This allows the application to balance power-consumption and
latency by setting a poll timeout and forcing a non-blocking read when
the poll timeout expires which allows the application to retrieve any
samples stored in the hardware buffer.


Josselin Costanzi (1):
  iio: add watermark logic to iio read and poll

Octavian Purdila (10):
  iio: buffer: fix custom buffer attributes copy
  iio: buffer: refactor buffer attributes setup
  iio: add support for hardware fifo
  iio: bmc150: refactor slope duration and threshold update
  iio: bmc150: refactor interrupt enabling
  iio: bmc150: exit early if event / trigger state is not changed
  iio: bmc150: introduce bmc150_accel_interrupt
  iio: bmc150: introduce bmc150_accel_trigger
  iio: bmc150: introduce bmc150_accel_event
  iio: bmc150: add support for hardware fifo

 Documentation/ABI/testing/sysfs-bus-iio  |  32 ++
 drivers/iio/accel/bmc150-accel.c         | 919 ++++++++++++++++++++-----------
 drivers/iio/industrialio-buffer.c        | 179 ++++--
 drivers/iio/kfifo_buf.c                  |  11 +-
 drivers/staging/iio/accel/sca3000_ring.c |   4 +-
 include/linux/iio/buffer.h               |   9 +-
 include/linux/iio/iio.h                  |  17 +
 7 files changed, 819 insertions(+), 352 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2015-02-09 13:44 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-21  0:42 [PATCH v2 00/11] iio: add support for hardware buffers Octavian Purdila
2014-12-21  0:42 ` [PATCH v2 01/11] iio: buffer: fix custom buffer attributes copy Octavian Purdila
2015-01-04 11:25   ` Jonathan Cameron
2015-01-04 11:34     ` Lars-Peter Clausen
2015-01-04 16:11       ` Jonathan Cameron
2014-12-21  0:42 ` [PATCH v2 02/11] iio: buffer: refactor buffer attributes setup Octavian Purdila
2015-01-04 11:31   ` Jonathan Cameron
2015-01-05 10:48     ` Octavian Purdila
2014-12-21  0:42 ` [PATCH v2 03/11] iio: add watermark logic to iio read and poll Octavian Purdila
2015-01-04 15:44   ` Jonathan Cameron
2015-01-25 21:22   ` Hartmut Knaack
2015-01-26  9:40     ` Octavian Purdila
2014-12-21  0:42 ` [PATCH v2 04/11] iio: add support for hardware fifo Octavian Purdila
2015-01-04 16:07   ` Jonathan Cameron
2015-01-05 11:29     ` Octavian Purdila
2015-02-04 17:08       ` Jonathan Cameron
2015-02-05 21:36         ` Octavian Purdila
2015-02-08 10:53           ` Jonathan Cameron
2015-02-09 13:44             ` Octavian Purdila
2015-01-28 23:46   ` Hartmut Knaack
2015-01-29 11:38     ` Octavian Purdila
2015-01-29 22:49       ` Hartmut Knaack
2015-02-04 17:18         ` Jonathan Cameron
2015-02-04 17:11       ` Jonathan Cameron
2014-12-21  0:42 ` [PATCH v2 05/11] iio: bmc150: refactor slope duration and threshold update Octavian Purdila
2015-01-04 16:21   ` Jonathan Cameron
2015-01-06 18:53     ` Srinivas Pandruvada
2015-01-28  9:22       ` Octavian Purdila
2015-01-28 17:15         ` Srinivas Pandruvada
2014-12-21  0:42 ` [PATCH v2 06/11] iio: bmc150: refactor interrupt enabling Octavian Purdila
2015-01-04 16:27   ` Jonathan Cameron
2015-01-28 10:33     ` Octavian Purdila
2014-12-21  0:42 ` [PATCH v2 07/11] iio: bmc150: exit early if event / trigger state is not changed Octavian Purdila
2015-01-04 16:29   ` Jonathan Cameron
2014-12-21  0:42 ` [PATCH v2 08/11] iio: bmc150: introduce bmc150_accel_interrupt Octavian Purdila
2015-01-04 16:36   ` Jonathan Cameron
2015-01-28 11:09     ` Octavian Purdila
2015-01-28 13:20       ` Jonathan Cameron
2014-12-21  0:42 ` [PATCH v2 09/11] iio: bmc150: introduce bmc150_accel_trigger Octavian Purdila
2015-01-04 16:39   ` Jonathan Cameron
2014-12-21  0:42 ` [PATCH v2 10/11] iio: bmc150: introduce bmc150_accel_event Octavian Purdila
2015-01-04 16:49   ` Jonathan Cameron
2014-12-21  0:42 ` [PATCH v2 11/11] iio: bmc150: add support for hardware fifo Octavian Purdila
2015-01-04 17:08   ` Jonathan Cameron
2015-01-28 19:26     ` Octavian Purdila
2015-02-04 17:16       ` Jonathan Cameron
2015-02-04 20:18         ` Octavian Purdila
2015-02-05 11:20           ` Jonathan Cameron
2015-02-05 20:04             ` Octavian Purdila
2015-02-06 12:19               ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.