* [PATCH v6 1/2] staging: iio: accel: adis16240: enforce SPI mode on probe function
@ 2019-12-07 4:53 ` Rodrigo Carvalho
0 siblings, 0 replies; 8+ messages in thread
From: Rodrigo Carvalho @ 2019-12-07 4:53 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Stefan Popa,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman
Cc: linux-iio, devel, linux-kernel, devicetree, kernel-usp, Rodrigo Carvalho
According to the datasheet, this driver supports only SPI mode 3,
so we should enforce it on probe function.
Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com>
---
V6:
-none
drivers/staging/iio/accel/adis16240.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/staging/iio/accel/adis16240.c b/drivers/staging/iio/accel/adis16240.c
index 82099db4bf0c..77b6b81767b9 100644
--- a/drivers/staging/iio/accel/adis16240.c
+++ b/drivers/staging/iio/accel/adis16240.c
@@ -400,6 +400,13 @@ static int adis16240_probe(struct spi_device *spi)
indio_dev->num_channels = ARRAY_SIZE(adis16240_channels);
indio_dev->modes = INDIO_DIRECT_MODE;
+ spi->mode = SPI_MODE_3;
+ ret = spi_setup(spi);
+ if (ret) {
+ dev_err(&spi->dev, "spi_setup failed!\n");
+ return ret;
+ }
+
ret = adis_init(st, indio_dev, spi, &adis16240_data);
if (ret)
return ret;
--
2.24.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v6 1/2] staging: iio: accel: adis16240: enforce SPI mode on probe function
@ 2019-12-07 4:53 ` Rodrigo Carvalho
0 siblings, 0 replies; 8+ messages in thread
From: Rodrigo Carvalho @ 2019-12-07 4:53 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Stefan Popa,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman
Cc: devel, devicetree, linux-iio, linux-kernel, Rodrigo Carvalho, kernel-usp
According to the datasheet, this driver supports only SPI mode 3,
so we should enforce it on probe function.
Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com>
---
V6:
-none
drivers/staging/iio/accel/adis16240.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/staging/iio/accel/adis16240.c b/drivers/staging/iio/accel/adis16240.c
index 82099db4bf0c..77b6b81767b9 100644
--- a/drivers/staging/iio/accel/adis16240.c
+++ b/drivers/staging/iio/accel/adis16240.c
@@ -400,6 +400,13 @@ static int adis16240_probe(struct spi_device *spi)
indio_dev->num_channels = ARRAY_SIZE(adis16240_channels);
indio_dev->modes = INDIO_DIRECT_MODE;
+ spi->mode = SPI_MODE_3;
+ ret = spi_setup(spi);
+ if (ret) {
+ dev_err(&spi->dev, "spi_setup failed!\n");
+ return ret;
+ }
+
ret = adis_init(st, indio_dev, spi, &adis16240_data);
if (ret)
return ret;
--
2.24.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v6 2/2] dt-bindings: iio: accel: add binding documentation for ADIS16240
2019-12-07 4:53 ` Rodrigo Carvalho
@ 2019-12-07 4:53 ` Rodrigo Carvalho
-1 siblings, 0 replies; 8+ messages in thread
From: Rodrigo Carvalho @ 2019-12-07 4:53 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Stefan Popa,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman
Cc: linux-iio, devel, linux-kernel, devicetree, kernel-usp, Rodrigo Carvalho
This patch add device tree binding documentation for ADIS16240.
Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com>
---
V6:
- Update SPDX license identifier
.../bindings/iio/accel/adi,adis16240.yaml | 49 +++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
new file mode 100644
index 000000000000..4147f02b5e3c
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/accel/adi,adis16240.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ADIS16240 Programmable Impact Sensor and Recorder driver
+
+maintainers:
+ - Alexandru Ardelean <alexandru.ardelean@analog.com>
+
+description: |
+ ADIS16240 Programmable Impact Sensor and Recorder driver that supports
+ SPI interface.
+ https://www.analog.com/en/products/adis16240.html
+
+properties:
+ compatible:
+ enum:
+ - adi,adis16240
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ spi0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* Example for a SPI device node */
+ accelerometer@0 {
+ compatible = "adi,adis16240";
+ reg = <0>;
+ spi-max-frequency = <2500000>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
--
2.24.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v6 2/2] dt-bindings: iio: accel: add binding documentation for ADIS16240
@ 2019-12-07 4:53 ` Rodrigo Carvalho
0 siblings, 0 replies; 8+ messages in thread
From: Rodrigo Carvalho @ 2019-12-07 4:53 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Stefan Popa,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman
Cc: devel, devicetree, linux-iio, linux-kernel, Rodrigo Carvalho, kernel-usp
This patch add device tree binding documentation for ADIS16240.
Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com>
---
V6:
- Update SPDX license identifier
.../bindings/iio/accel/adi,adis16240.yaml | 49 +++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
new file mode 100644
index 000000000000..4147f02b5e3c
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/accel/adi,adis16240.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ADIS16240 Programmable Impact Sensor and Recorder driver
+
+maintainers:
+ - Alexandru Ardelean <alexandru.ardelean@analog.com>
+
+description: |
+ ADIS16240 Programmable Impact Sensor and Recorder driver that supports
+ SPI interface.
+ https://www.analog.com/en/products/adis16240.html
+
+properties:
+ compatible:
+ enum:
+ - adi,adis16240
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ spi0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* Example for a SPI device node */
+ accelerometer@0 {
+ compatible = "adi,adis16240";
+ reg = <0>;
+ spi-max-frequency = <2500000>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
--
2.24.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v6 2/2] dt-bindings: iio: accel: add binding documentation for ADIS16240
2019-12-07 4:53 ` Rodrigo Carvalho
@ 2019-12-13 19:10 ` Rob Herring
-1 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2019-12-13 19:10 UTC (permalink / raw)
To: Rodrigo Carvalho
Cc: Lars-Peter Clausen, Michael Hennerich, Stefan Popa,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman, linux-iio, devel, linux-kernel, devicetree,
kernel-usp, Rodrigo Carvalho
On Sat, 7 Dec 2019 01:53:39 -0300, Rodrigo Carvalho wrote:
> This patch add device tree binding documentation for ADIS16240.
>
> Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com>
> ---
> V6:
> - Update SPDX license identifier
>
> .../bindings/iio/accel/adi,adis16240.yaml | 49 +++++++++++++++++++
> 1 file changed, 49 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
>
Please add Acked-by/Reviewed-by tags when posting new versions. However,
there's no need to repost patches *only* to add the tags. The upstream
maintainer will do that for acks received on the version they apply.
If a tag was not added on purpose, please state why and what changed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v6 2/2] dt-bindings: iio: accel: add binding documentation for ADIS16240
@ 2019-12-13 19:10 ` Rob Herring
0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2019-12-13 19:10 UTC (permalink / raw)
To: Rodrigo Carvalho
Cc: devel, devicetree, Lars-Peter Clausen, Stefan Popa,
Michael Hennerich, linux-iio, Greg Kroah-Hartman, linux-kernel,
Rodrigo Carvalho, kernel-usp, Peter Meerwald-Stadler,
Hartmut Knaack, Jonathan Cameron
On Sat, 7 Dec 2019 01:53:39 -0300, Rodrigo Carvalho wrote:
> This patch add device tree binding documentation for ADIS16240.
>
> Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com>
> ---
> V6:
> - Update SPDX license identifier
>
> .../bindings/iio/accel/adi,adis16240.yaml | 49 +++++++++++++++++++
> 1 file changed, 49 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
>
Please add Acked-by/Reviewed-by tags when posting new versions. However,
there's no need to repost patches *only* to add the tags. The upstream
maintainer will do that for acks received on the version they apply.
If a tag was not added on purpose, please state why and what changed.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v6 2/2] dt-bindings: iio: accel: add binding documentation for ADIS16240
2019-12-13 19:10 ` Rob Herring
@ 2019-12-15 12:20 ` Jonathan Cameron
-1 siblings, 0 replies; 8+ messages in thread
From: Jonathan Cameron @ 2019-12-15 12:20 UTC (permalink / raw)
To: Rob Herring
Cc: Rodrigo Carvalho, Lars-Peter Clausen, Michael Hennerich,
Stefan Popa, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman, linux-iio, devel, linux-kernel, devicetree,
kernel-usp
On Fri, 13 Dec 2019 13:10:36 -0600
Rob Herring <robh@kernel.org> wrote:
> On Sat, 7 Dec 2019 01:53:39 -0300, Rodrigo Carvalho wrote:
> > This patch add device tree binding documentation for ADIS16240.
> >
> > Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com>
> > ---
> > V6:
> > - Update SPDX license identifier
> >
> > .../bindings/iio/accel/adi,adis16240.yaml | 49 +++++++++++++++++++
> > 1 file changed, 49 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
> >
>
> Please add Acked-by/Reviewed-by tags when posting new versions. However,
> there's no need to repost patches *only* to add the tags. The upstream
> maintainer will do that for acks received on the version they apply.
>
> If a tag was not added on purpose, please state why and what changed.
Applied to the togreg branch of iio.git, picking up Rob's tag from v5.
Pushed out as testing for the autobuilders to poke at it.
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v6 2/2] dt-bindings: iio: accel: add binding documentation for ADIS16240
@ 2019-12-15 12:20 ` Jonathan Cameron
0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Cameron @ 2019-12-15 12:20 UTC (permalink / raw)
To: Rob Herring
Cc: devel, devicetree, Lars-Peter Clausen, Peter Meerwald-Stadler,
Michael Hennerich, linux-iio, Greg Kroah-Hartman, linux-kernel,
Rodrigo Carvalho, kernel-usp, Stefan Popa, Hartmut Knaack
On Fri, 13 Dec 2019 13:10:36 -0600
Rob Herring <robh@kernel.org> wrote:
> On Sat, 7 Dec 2019 01:53:39 -0300, Rodrigo Carvalho wrote:
> > This patch add device tree binding documentation for ADIS16240.
> >
> > Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com>
> > ---
> > V6:
> > - Update SPDX license identifier
> >
> > .../bindings/iio/accel/adi,adis16240.yaml | 49 +++++++++++++++++++
> > 1 file changed, 49 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
> >
>
> Please add Acked-by/Reviewed-by tags when posting new versions. However,
> there's no need to repost patches *only* to add the tags. The upstream
> maintainer will do that for acks received on the version they apply.
>
> If a tag was not added on purpose, please state why and what changed.
Applied to the togreg branch of iio.git, picking up Rob's tag from v5.
Pushed out as testing for the autobuilders to poke at it.
Thanks,
Jonathan
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-12-15 12:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-07 4:53 [PATCH v6 1/2] staging: iio: accel: adis16240: enforce SPI mode on probe function Rodrigo Carvalho
2019-12-07 4:53 ` Rodrigo Carvalho
2019-12-07 4:53 ` [PATCH v6 2/2] dt-bindings: iio: accel: add binding documentation for ADIS16240 Rodrigo Carvalho
2019-12-07 4:53 ` Rodrigo Carvalho
2019-12-13 19:10 ` Rob Herring
2019-12-13 19:10 ` Rob Herring
2019-12-15 12:20 ` Jonathan Cameron
2019-12-15 12:20 ` 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.