1. 09 4月, 2015 1 次提交
  2. 29 3月, 2015 2 次提交
    • O
      iio: add support for hardware fifo · f4f4673b
      Octavian Purdila 提交于
      Some devices have hardware buffers that can store a number of samples
      for later consumption. Hardware usually provides interrupts to notify
      the processor when the FIFO is full or when it has reached a certain
      watermark level. This helps with reducing the number of interrupts to
      the host processor and thus it helps decreasing the power consumption.
      
      This patch enables usage of hardware FIFOs for IIO devices in
      conjunction with software device buffers. When the hardware FIFO is
      enabled the samples are stored in the hardware FIFO. The samples are
      later flushed to the device software buffer when the number of entries
      in the hardware FIFO reaches the hardware watermark or when a flush
      operation is triggered by the user when doing a non-blocking read
      on an empty software device buffer.
      
      In order to implement hardware FIFO support the device drivers must
      implement the following new operations: setting and getting the
      hardware FIFO watermark level, flushing the hardware FIFO to the
      software device buffer. The device must also expose information about
      the hardware FIFO such it's minimum and maximum watermark and if
      necessary a list of supported watermark values. Finally, the device
      driver must activate the hardware FIFO when the device buffer is
      enabled, if the current device settings allows it.
      
      The software device buffer watermark is passed by the IIO core to the
      device driver as a hint for the hardware FIFO watermark. The device
      driver can adjust this value to allow for hardware limitations (such
      as capping it to the maximum hardware watermark or adjust it to a
      value that is supported by the hardware). It can also disable the
      hardware watermark (and implicitly the hardware FIFO) it this value is
      below the minimum hardware watermark.
      
      Since a driver may support hardware FIFO only when not in triggered
      buffer mode (due to different semantics of hardware FIFO sampling and
      triggered sampling) this patch changes the IIO core code to allow
      falling back to non-triggered buffered mode if no trigger is enabled.
      Signed-off-by: NOctavian Purdila <octavian.purdila@intel.com>
      Reviewed-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      f4f4673b
    • J
      iio: add watermark logic to iio read and poll · 37d34556
      Josselin Costanzi 提交于
      Currently the IIO buffer blocking read only wait until at least one
      data element is available.
      This patch makes the reader sleep until enough data is collected before
      returning to userspace. This should limit the read() calls count when
      trying to get data in batches.
      
      Co-author: Yannick Bedhomme <yannick.bedhomme@mobile-devices.fr>
      Signed-off-by: NJosselin Costanzi <josselin.costanzi@mobile-devices.fr>
      [rebased and remove buffer timeout]
      Signed-off-by: NOctavian Purdila <octavian.purdila@intel.com>
      Reviewed-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      37d34556
  3. 28 3月, 2015 1 次提交
  4. 15 2月, 2015 1 次提交
  5. 30 1月, 2015 2 次提交
  6. 28 1月, 2015 6 次提交
  7. 26 1月, 2015 1 次提交
  8. 26 12月, 2014 2 次提交
  9. 12 12月, 2014 7 次提交
  10. 22 11月, 2014 4 次提交
  11. 16 11月, 2014 1 次提交
  12. 25 10月, 2014 1 次提交
  13. 04 10月, 2014 1 次提交
  14. 26 8月, 2014 1 次提交
  15. 24 7月, 2014 1 次提交
  16. 20 7月, 2014 1 次提交
  17. 12 7月, 2014 2 次提交
    • S
      iio: core : events ABI for specifying period · 77a533c7
      Srinivas Pandruvada 提交于
      The iio sysfs ABI defines a way to specify period for roc and thresholds.
      What:		/sys/.../events/in_accel_x_thresh_rising_period
      What:		/sys/.../events/in_accel_x_thresh_falling_period
      what:		/sys/.../events/in_accel_x_roc_rising_period
      What:		/sys/.../events/in_accel_x_roc_falling_period
      
      But there is no way to add period with the current event info enum.
      
      Added IIO_EV_INFO_PERIOD and corresponding string.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      77a533c7
    • L
      iio: st_sensors: add devicetree probing support · 2d7768a8
      Linus Walleij 提交于
      The I2C devices that make up the STMicroelectronics MEMS sensors
      may be sneakily enabled by cleverly giving the device node the same
      name as a string match from the platform device ID table. However
      the right method is to use the compatible string.
      
      On detection, the ST sensors use the ID string to probe and
      instatiate the right sensor driver, so pass the kernel-internal ID
      string in the .data field of the OF match table, and set the I2C
      client name to this name when a compatible match is used.
      
      This avoids having misc Linux-specific strings floating around in
      the device tree.
      
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Denis CIOCCA <denis.ciocca@st.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      2d7768a8
  18. 07 7月, 2014 2 次提交
  19. 15 6月, 2014 1 次提交
  20. 14 6月, 2014 1 次提交
  21. 03 5月, 2014 1 次提交