From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: <alexandru.ardelean@analog.com>
Cc: <linux-iio@vger.kernel.org>, <michael.hennerich@analog.com>
Subject: Re: [PATCH 2/2][V2] staging:iio:docs: add ad7192 doc to detail dt usage
Date: Sat, 6 Jan 2018 12:56:13 +0000 [thread overview]
Message-ID: <20180106125613.71a04a63@archlinux> (raw)
In-Reply-To: <20180105152826.12076-1-alexandru.ardelean@analog.com>
On Fri, 5 Jan 2018 17:28:26 +0200
<alexandru.ardelean@analog.com> wrote:
> From: Alexandru Ardelean <alexandru.ardelean@analog.com>
>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Always resend the whole series rather than just one patch.
The chances of me getting confused and merging the wrong
combination is way too high if you do it like this.
This needs a proper device tree binding doc. Which will contain
descriptions of all those parameters and be ready to put under
Documentation/devicetree/bindings/iio
A random documentation file like this is not going to be found
by anyone so provides little value.
Also dt bindings docs are used in some formal checkers to
verify that everything is described as it should be.
Resulting document needs to be cc'd to the devicetree maintainers
as well. This is particularly true when you are introducing
a whole load of new devicetree bindings as you are here.
Jonathan
> ---
> drivers/staging/iio/Documentation/adc/ad7192.txt | 60 ++++++++++++++++++++++++
> 1 file changed, 60 insertions(+)
> create mode 100644 drivers/staging/iio/Documentation/adc/ad7192.txt
>
> diff --git a/drivers/staging/iio/Documentation/adc/ad7192.txt b/drivers/staging/iio/Documentation/adc/ad7192.txt
> new file mode 100644
> index 000000000000..19efc0a9411c
> --- /dev/null
> +++ b/drivers/staging/iio/Documentation/adc/ad7192.txt
> @@ -0,0 +1,60 @@
> +Analog Devices AD719x ADC Driver
> +
> +1. Overview
> +
> +The driver is intended to work with all AD719x ADC chips
> +from Analog Devices (AD7190, AD7192, AD7193, AD7195).
> +
> +It's based on top of the AD Sigma Delta driver
> +
> +2. Device Tree Configuration
> +
> +Example for use on a Raspberry Pi with interrupt line
> +connected to PIN 25 on the GPIO:
> +
> + adc_vref: fixedregulator@0 {
> + reg = <0>;
> +
> + compatible = "regulator-fixed";
> + regulator-name = "fixed-supply";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-boot-on;
> + };
> +
> + ad7190@0 {
> + compatible = "ad7190";
> + reg = <0>;
> + spi-max-frequency = <1000000>;
> + spi-cpol;
> + spi-cpha;
> +
> + #interrupt-cells = <2>;
> + interrupts = <25 0x2>;
> + interrupt-parent = <&gpio>;
> + avdd-supply = <&adc_vref>;
> +
> + adi,clock-source-select = /bits/ 8 <0>;
> + adi,reference-voltage-mv = /bits/ 16 <3300>;
> +
> + adi,refin2-pins-enable;
> + adi,rejection-60-Hz-enable;
> + adi,chop-enable;
> + adi,buffer-enable;
> + adi,burnout-currents-enable;
> + adi,sinc3-filter-enable;
> + adi,unipolar-enable;
> + };
> +
> +Notes (about this example):
> +* be sure to replace `compatible = "ad7190";` with
> + your actual chip model (ad7190, ad7192, ad7193, ad7195)
> + in order to make sure it works correctly
> +* PIN 25 must also be connected also to the DOUT pin
> + of the ADC (or MISO on the host)
> +* be sure to add the "/bits/" specifiers ; newer dtc versions
> + specify the property type/size using this field,
> + and the driver may not be able to find the property
> +* not all "adi,xxx" parameters are required ;
> + see the datasheet to get an idea of what you need
> +
prev parent reply other threads:[~2018-01-06 12:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-05 15:28 [PATCH 2/2][V2] staging:iio:docs: add ad7192 doc to detail dt usage alexandru.ardelean
2018-01-06 12:56 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180106125613.71a04a63@archlinux \
--to=jic23@jic23.retrosnub.co.uk \
--cc=alexandru.ardelean@analog.com \
--cc=linux-iio@vger.kernel.org \
--cc=michael.hennerich@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox