lkml.org 
[lkml]   [2018]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/5] iio:adxl372: Add FIFO and interrupts support
On Thu, Jul 12, 2018 at 06:36:00PM +0300, Stefan Popa wrote:
> This patch adds support for the adxl372 FIFO. In order to accomplish this,
> triggered buffers were used.
>
> The number of FIFO samples which trigger the watermark interrupt can be
> configured by using the buffer watermark, while the format depends on the
> selected channels.The FIFO data along with the timestamp is pushed to the
> IIO device's buffer.
>
> Signed-off-by: Stefan Popa <stefan.popa@analog.com>
> ---
> .../devicetree/bindings/iio/accel/adxl372.txt | 7 +

This belongs in patch 2. Bindings should reflect the h/w, not driver
features.

> drivers/iio/accel/adxl372.c | 346 ++++++++++++++++++++-
> 2 files changed, 352 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/accel/adxl372.txt b/Documentation/devicetree/bindings/iio/accel/adxl372.txt
> index fea4baf..73d7e03 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adxl372.txt
> +++ b/Documentation/devicetree/bindings/iio/accel/adxl372.txt
> @@ -7,10 +7,17 @@ Required properties:
> - reg: SPI chip select number for the device
> - spi-max-frequency: Max SPI frequency to use
>
> +Optional properties:
> + - interrupt-parent: phandle to the parent interrupt controller

Don't need to put this in the binding.

> + - interrupts: interrupt mapping for GPIO IRQ, it should by configured with
> + flag IRQ_TYPE_EDGE_FALLING
> +
> Example:
>
> accelerometer@0 {
> compatible = "adi,adxl372";
> reg = <0>;
> spi-max-frequency = <1000000>;
> + interrupt-parent = <&gpio>;
> + interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
> };

\
 
 \ /
  Last update: 2018-07-20 16:47    [W:0.148 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site