Introduce DATA_RDY trigger for triggered buffer setup; this enables continuous
data capture. Additionally, add support for direct register access using the debugfs
iio interface.
The device-tree bindings documentation illustrates an example of using a GPIO irq
line to trigger a data capture.
Nishant Malpani (3):
iio: gyro: adxrs290: Add triggered buffer support
dt-bindings: iio: gyro: adxrs290: Add interrupts support
iio: gyro: adxrs290: Add debugfs register access support
.../bindings/iio/gyroscope/adi,adxrs290.yaml | 7 +
drivers/iio/gyro/Kconfig | 2 +
drivers/iio/gyro/adxrs290.c | 284 +++++++++++++++++-
3 files changed, 279 insertions(+), 14 deletions(-)
--
2.20.1
Include 'interrupts' property and provide a suitable example for using
a GPIO interrupt line.
Signed-off-by: Nishant Malpani <[email protected]>
---
Changes in v2:
- remove 'interrupts' property from the required properties list
- rewrite commit message
---
.../devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml b/Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml
index 61adb2c2454b..a5f209e8bbef 100644
--- a/Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml
+++ b/Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml
@@ -28,6 +28,9 @@ properties:
spi-cpha: true
+ interrupts:
+ maxItems: 1
+
required:
- compatible
- reg
@@ -39,6 +42,8 @@ additionalProperties: false
examples:
- |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -48,6 +53,8 @@ examples:
spi-max-frequency = <5000000>;
spi-cpol;
spi-cpha;
+ interrupt-parent = <&gpio>;
+ interrupts = <25 IRQ_TYPE_EDGE_RISING>;
};
};
...
--
2.20.1
On Thu, 3 Sep 2020 18:39:49 +0530
Nishant Malpani <[email protected]> wrote:
> Include 'interrupts' property and provide a suitable example for using
> a GPIO interrupt line.
>
> Signed-off-by: Nishant Malpani <[email protected]>
One little point inline. Otherwise looks fine to me
Thanks,
Jonathan
> ---
>
> Changes in v2:
>
> - remove 'interrupts' property from the required properties list
> - rewrite commit message
> ---
> .../devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml b/Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml
> index 61adb2c2454b..a5f209e8bbef 100644
> --- a/Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml
> +++ b/Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml
> @@ -28,6 +28,9 @@ properties:
>
> spi-cpha: true
>
> + interrupts:
> + maxItems: 1
> +
> required:
> - compatible
> - reg
> @@ -39,6 +42,8 @@ additionalProperties: false
>
> examples:
> - |
> + #include <dt-bindings/gpio/gpio.h>
Shouldn't need that header. I don't see anything being used that
is defined in gpio.h
> + #include <dt-bindings/interrupt-controller/irq.h>
> spi {
> #address-cells = <1>;
> #size-cells = <0>;
> @@ -48,6 +53,8 @@ examples:
> spi-max-frequency = <5000000>;
> spi-cpol;
> spi-cpha;
> + interrupt-parent = <&gpio>;
> + interrupts = <25 IRQ_TYPE_EDGE_RISING>;
> };
> };
> ...