From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Tomas Novotny <tomas-P46umIhNmdHrBKCeMvbIDA@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Hartmut Knaack <knaack.h-Mmb7MZpHnFY@public.gmane.org>,
Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
Peter Meerwald <pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Akinobu Mita
<akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Yong Li <sdliyong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/3] Documentation: dt: iio: add mcp4725/6 dac device binding
Date: Sat, 1 Oct 2016 12:21:57 +0100 [thread overview]
Message-ID: <8815a607-c9e3-e7e7-0884-2d5d49c353b4@kernel.org> (raw)
In-Reply-To: <ac9b5f52-5ac1-52a9-aa9a-eb812639e033-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
On 01/10/16 12:15, Jonathan Cameron wrote:
> On 30/09/16 14:19, Tomas Novotny wrote:
>> Signed-off-by: Tomas Novotny <tomas-P46umIhNmdHrBKCeMvbIDA@public.gmane.org>
>> ---
>> .../devicetree/bindings/iio/dac/mcp4725.txt | 28 ++++++++++++++++++++++
>> 1 file changed, 28 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/iio/dac/mcp4725.txt
>>
>> diff --git a/Documentation/devicetree/bindings/iio/dac/mcp4725.txt b/Documentation/devicetree/bindings/iio/dac/mcp4725.txt
>> new file mode 100644
>> index 0000000..69c9462
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iio/dac/mcp4725.txt
>> @@ -0,0 +1,28 @@
>> +Microchpip mcp4725 and mcp4726 DAC device driver
>> +
>> +Required properties:
>> + - compatible: Must be "microchip,mcp4725" or "microchip,mcp4726"
>> + - reg: Should contain the DAC I2C address
>> + - vref-millivolt: Value of the reference voltage
Sorry dozing this morning so missed this until looking at the code.
Use the regulator framework to supply two regulators:
vref-suppy and vdd-supply
first one optional.
Then query them in the driver. Much more flexible than just hard coding
a value here. Entirely possible to have a variable regulator used for
the reference.
>> +
>> +Optional properties:
>> + - vref-mode: Reference voltage selection. It is available only on
> Not a generic attribute, so wants to have a vendor prefix on it.
>> + mcp4726. Valid values are:
>> + - 0, 1: Vdd pin voltage (unbuffered)
> This should not be a direct mapping of the register values but rather
> a means to control the setting. Having two values mapping to the
> same thing makes no sense.
>
> Would also be odd to specify a vref and then not use it. So you could
> infer this first option.
>> + - 2: Vref pin voltage unbuffered
>> + - 3: Vref pin voltage internally buffered
> Having inferred the first option then this becomes control of whether it
> is buffered or not. So could be named appropriately to cover that.
> Might be nice to have a little note here on why you might want the
> buffer or not..
>> +
>> +Examples:
>> +
>> + mcp4725@60 {
>> + compatible = "microchip,mcp4725";
>> + reg = <0x60>;
>> + vref-millivolt = <3300>;
>> + };
>> +
>> + mcp4726@60 {
>> + compatible = "microchip,mcp4726";
>> + reg = <0x60>;
>> + vref-mode = <2>;
>> + vref-millivolt = <2500>;
>> + };
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2016-10-01 11:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 13:19 [PATCH 0/3] iio: dac: mcp4725: add vref selection and devicetree support Tomas Novotny
[not found] ` <1475241588-18429-1-git-send-email-tomas-P46umIhNmdHrBKCeMvbIDA@public.gmane.org>
2016-09-30 13:19 ` [PATCH 1/3] iio: dac: mcp4725: support voltage reference selection Tomas Novotny
[not found] ` <1475241588-18429-2-git-send-email-tomas-P46umIhNmdHrBKCeMvbIDA@public.gmane.org>
2016-10-01 11:23 ` Jonathan Cameron
[not found] ` <7f13e3bd-9052-dbff-e296-f8f7975d1e3b-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-10-01 11:48 ` Peter Meerwald-Stadler
[not found] ` <alpine.DEB.2.02.1610011345040.21854-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>
2016-10-03 12:34 ` Tomas Novotny
2016-09-30 13:19 ` [PATCH 2/3] Documentation: dt: iio: add mcp4725/6 dac device binding Tomas Novotny
[not found] ` <1475241588-18429-3-git-send-email-tomas-P46umIhNmdHrBKCeMvbIDA@public.gmane.org>
2016-10-01 11:15 ` Jonathan Cameron
[not found] ` <ac9b5f52-5ac1-52a9-aa9a-eb812639e033-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-10-01 11:21 ` Jonathan Cameron [this message]
[not found] ` <8815a607-c9e3-e7e7-0884-2d5d49c353b4-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-10-03 12:32 ` Tomas Novotny
2016-10-01 11:42 ` Peter Meerwald-Stadler
2016-09-30 13:19 ` [PATCH 3/3] iio: dac: mcp4725: add devicetree support Tomas Novotny
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=8815a607-c9e3-e7e7-0884-2d5d49c353b4@kernel.org \
--to=jic23-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=knaack.h-Mmb7MZpHnFY@public.gmane.org \
--cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sdliyong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tomas-P46umIhNmdHrBKCeMvbIDA@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).