2024-05-22 12:03:21

by Ramona Alexandra Nechita

[permalink] [raw]
Subject: [PATCH] dt-bindings: iio: adc: add a7779 doc

Add dt bindings for adc ad7779.

Signed-off-by: ranechita <[email protected]>
---
.../ABI/testing/sysfs-bus-iio-adc-ad777x | 23 +++++
.../bindings/iio/adc/adi,ad7779.yaml | 93 +++++++++++++++++++
2 files changed, 116 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-ad777x
create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7779.yaml

diff --git a/Documentation/ABI/testing/sysfs-bus-iio-adc-ad777x b/Documentation/ABI/testing/sysfs-bus-iio-adc-ad777x
new file mode 100644
index 000000000000..0a57fda598e6
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-adc-ad777x
@@ -0,0 +1,23 @@
+What: /sys/bus/iio/devices/iio:deviceX/filter_type_available
+KernelVersion: 6.1
+Contact: [email protected]
+Description:
+ Reading returns a list with the possible filter modes. Only supported by
+ AD7771.
+
+ * "sinc3" - The digital sinc3 filter implements three main notches, one at
+ the maximum ODR (128 kHz or 32 kHz, depending on the
+ power mode) and another two at the ODR frequency selected to
+ stop noise aliasing into the pass band.
+
+ * "sinc5" - The sinc5 filter implements five notches, one at
+ the maximum ODR (128 kHz or 32 kHz, depending on the
+ power mode) and another four at the ODR frequency
+ selected to stop noise aliasing into the pass band.
+
+What: /sys/bus/iio/devices/iio:deviceX/filter_type
+KernelVersion: 6.1
+Contact: [email protected]
+Description:
+ Set the filter mode of the differential channel. The current sampling_frequency
+ is set according to the filter range. Only supported by AD7771.
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7779.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7779.yaml
new file mode 100644
index 000000000000..7176674595fc
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7779.yaml
@@ -0,0 +1,93 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/adi,ad7779.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD777X family 8-Channel, 24-Bit, Simultaneous Sampling ADCs
+
+maintainers:
+ - Ramona Nechita <[email protected]>
+
+description: |
+ The AD777X family consist of 8-channel, simultaneous sampling analog-to-
+ digital converter (ADC). Eight full Σ-Δ ADCs are on-chip. The
+ AD7771 provides an ultralow input current to allow direct sensor
+ connection. Each input channel has a programmable gain stage
+ allowing gains of 1, 2, 4, and 8 to map lower amplitude sensor
+ outputs into the full-scale ADC input range, maximizing the
+ dynamic range of the signal chain.
+
+ https://www.analog.com/media/en/technical-documentation/data-sheets/ad7770.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/ad7771.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/ad7779.pdf
+
+$ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+ compatible:
+ enum:
+ - adi,ad7770
+ - adi,ad7771
+ - adi,ad7779
+
+ reg:
+ maxItems: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ spi-max-frequency: true
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: adc-clk
+
+ interrupts:
+ maxItems: 1
+
+ vref-supply:
+ description:
+ ADC reference voltage supply
+
+ start-gpios:
+ description:
+ Pin that controls start synchronization pulse.
+ maxItems: 1
+
+ reset-gpios:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ adc@0 {
+ compatible = "adi,ad7779";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+ vref-supply = <&vref>;
+ start-gpios = <&gpio0 87 GPIO_ACTIVE_LOW>;
+ reset-gpios = <&gpio0 93 GPIO_ACTIVE_LOW>;
+ clocks = <&adc_clk>;
+ clock-names = "adc-clk";
+ };
+ };
+...
--
2.43.0



2024-05-22 13:34:14

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: iio: adc: add a7779 doc

On 22/05/2024 14:01, ranechita wrote:
> Add dt bindings for adc ad7779.
>
> Signed-off-by: ranechita <[email protected]>

Are you sure that's the name or identity you want to use? Looks like
misconfigured git...

> ---
> .../ABI/testing/sysfs-bus-iio-adc-ad777x | 23 +++++
> .../bindings/iio/adc/adi,ad7779.yaml | 93 +++++++++++++++++++

Where is any user of it?
..

> +
> + clock-names:
> + items:
> + - const: adc-clk

Drop names, it repeats what's obvious.


Best regards,
Krzysztof


2024-05-23 17:05:42

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: iio: adc: add a7779 doc

On Wed, 22 May 2024 15:33:56 +0200
Krzysztof Kozlowski <[email protected]> wrote:
Typo in the patch title.. dt-bindings: iio: adc: add ad7779

> On 22/05/2024 14:01, ranechita wrote:
> > Add dt bindings for adc ad7779.

Good to provide a very brief intro here to the device.
> >
> > Signed-off-by: ranechita <[email protected]>
>
> Are you sure that's the name or identity you want to use? Looks like
> misconfigured git...
>
> > ---
> > .../ABI/testing/sysfs-bus-iio-adc-ad777x | 23 +++++
> > .../bindings/iio/adc/adi,ad7779.yaml | 93 +++++++++++++++++++
>
> Where is any user of it?
> ...
>
> > +
> > + clock-names:
> > + items:
> > + - const: adc-clk
>
> Drop names, it repeats what's obvious.
>
>
> Best regards,
> Krzysztof
>
>


2024-05-29 15:26:13

by Ramona Alexandra Nechita

[permalink] [raw]
Subject: RE: [PATCH] dt-bindings: iio: adc: add a7779 doc

Hello,

Thank you for your review. I will send a v2 shortly, I just have a minor misunderstanding below. I will send a v2 shortly without the clock-names.

>On 22/05/2024 14:01, ranechita wrote:
>> Add dt bindings for adc ad7779.
>>
>> Signed-off-by: ranechita <[email protected]>
>
>Are you sure that's the name or identity you want to use? Looks like misconfigured git...

Do you mean the email sign-off? Or just the name? That is my git username and I have used it for other patches/purposes, but I might update in the future with the full name.

>
>> ---
>> .../ABI/testing/sysfs-bus-iio-adc-ad777x | 23 +++++
>> .../bindings/iio/adc/adi,ad7779.yaml | 93 +++++++++++++++++++
>
>Where is any user of it?
>...
>
>> +
>> + clock-names:
>> + items:
>> + - const: adc-clk
>
>Drop names, it repeats what's obvious.


Best regards,
Ramona

2024-05-31 07:45:47

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: iio: adc: add a7779 doc

On 29/05/2024 17:25, Nechita, Ramona wrote:
> Hello,
>
> Thank you for your review. I will send a v2 shortly, I just have a minor misunderstanding below. I will send a v2 shortly without the clock-names.
>
>> On 22/05/2024 14:01, ranechita wrote:
>>> Add dt bindings for adc ad7779.
>>>
>>> Signed-off-by: ranechita <[email protected]>
>>
>> Are you sure that's the name or identity you want to use? Looks like misconfigured git...
>
> Do you mean the email sign-off? Or just the name? That is my git username and I have used it for other patches/purposes, but I might update in the future with the full name.

"Might"? OK, so this is not a known identity case, then please use full
name *now*. For all entries. Don't post your usernames to mailing list.

Best regards,
Krzysztof