All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/9] iio: add support for hardware fifo
@ 2015-01-30 23:59 Octavian Purdila
  2015-01-31  0:00 ` [PATCH v3 1/9] iio: buffer: refactor buffer attributes setup Octavian Purdila
                   ` (8 more replies)
  0 siblings, 9 replies; 25+ messages in thread
From: Octavian Purdila @ 2015-01-30 23:59 UTC (permalink / raw)
  To: linux-iio; +Cc: srinivas.pandruvada, Octavian Purdila

Here is the 3rd version of the patch that adds support for hardware
buffering.

I though a bit more about the watermark trigger approach and I still
think it is the right approach because:

 * it allows the application to enable or disable the FIFO

 * it avoids potential race conditions during configuration of the FIFO

 * an interrupt usually maps with a trigger, and since the FIFO
   watermark generates an interrupt it is natural to have a trigger for it

 * it matches well with the current trigger design, where only one
   trigger/interrupt can be active for one device

 * data is written to the FIFO based on the sampling rate and not
   based on a specific trigger; for example, it is at best confusing
   to have the any-motion trigger active while the FIFO is active

After the discussion with Jonathan I have decided to add a
hwfifo_watermark parameter to allow the application to change both the
device buffer watermark and the hardware fifo watermark as we want to
avoid dictating policy from kernel. I also think that it is important
for debugging and for allowing the application to use the right
settings depending on its goal (latency, power, etc.).

Other small changes since v2:

 * add a parameter to flush for the maximum number of samples to flush

 * fix a few comments

 * use indio_dev->active_scan_mask instead of buffer->scan_mask in the
   flush function

 * constify bmc150_accel_interrupts

 * use an anonymouse struct instead of struct
   bmc150_accel_interrupt_info and move it together with the
   initialization code

 * rewrote the slope code refactoring so that we update the registers
   when we enable the trigger

 * fix a potential division by zero spotted by Harmut

 * dropped the bmc150_accel_event patch


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

Octavian Purdila (8):
  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: add support for hardware fifo

 Documentation/ABI/testing/sysfs-bus-iio  |  40 ++
 drivers/iio/accel/bmc150-accel.c         | 752 +++++++++++++++++++------------
 drivers/iio/industrialio-buffer.c        | 225 +++++++--
 drivers/iio/kfifo_buf.c                  |  11 +-
 drivers/staging/iio/accel/sca3000_ring.c |   4 +-
 include/linux/iio/buffer.h               |   8 +-
 include/linux/iio/iio.h                  |  18 +
 7 files changed, 735 insertions(+), 323 deletions(-)

-- 
1.9.1


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

end of thread, other threads:[~2015-02-14  0:03 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 23:59 [PATCH v3 0/9] iio: add support for hardware fifo Octavian Purdila
2015-01-31  0:00 ` [PATCH v3 1/9] iio: buffer: refactor buffer attributes setup Octavian Purdila
2015-02-04 18:47   ` Jonathan Cameron
2015-01-31  0:00 ` [PATCH v3 2/9] iio: add watermark logic to iio read and poll Octavian Purdila
2015-02-04 18:49   ` Jonathan Cameron
2015-02-04 19:29     ` Octavian Purdila
2015-01-31  0:00 ` [PATCH v3 3/9] iio: add support for hardware fifo Octavian Purdila
2015-02-08 10:33   ` Jonathan Cameron
2015-01-31  0:00 ` [PATCH v3 4/9] iio: bmc150: refactor slope duration and threshold update Octavian Purdila
2015-02-05 17:02   ` Srinivas Pandruvada
2015-02-08 10:37     ` Jonathan Cameron
2015-02-09  9:54       ` Octavian Purdila
2015-01-31  0:00 ` [PATCH v3 5/9] iio: bmc150: refactor interrupt enabling Octavian Purdila
2015-02-05 17:06   ` Srinivas Pandruvada
2015-02-08 10:39     ` Jonathan Cameron
2015-01-31  0:00 ` [PATCH v3 6/9] iio: bmc150: exit early if event / trigger state is not changed Octavian Purdila
2015-02-05 17:09   ` Srinivas Pandruvada
2015-02-08 10:40     ` Jonathan Cameron
2015-01-31  0:00 ` [PATCH v3 7/9] iio: bmc150: introduce bmc150_accel_interrupt Octavian Purdila
2015-02-08 11:01   ` Jonathan Cameron
2015-01-31  0:00 ` [PATCH v3 8/9] iio: bmc150: introduce bmc150_accel_trigger Octavian Purdila
2015-02-08 11:07   ` Jonathan Cameron
2015-02-14  0:03     ` Srinivas Pandruvada
2015-01-31  0:00 ` [PATCH v3 9/9] iio: bmc150: add support for hardware fifo Octavian Purdila
2015-02-08 11:26   ` 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.