From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Akinobu Mita
<akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"open list:OPEN FIRMWARE AND..."
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
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>
Subject: Re: [PATCH v3] iio: adc: add ADC12130/ADC12132/ADC12138 ADC driver
Date: Sun, 21 Aug 2016 10:45:31 +0100 [thread overview]
Message-ID: <e76a92c5-4de6-88e5-746f-337f82d196d2@kernel.org> (raw)
In-Reply-To: <CAC5umyg831=Q4iih+4rPpdNSyEEgBKqHk00cLCd6XJ5dTw92Jw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 20/08/16 03:54, Akinobu Mita wrote:
> Hi Rob,
>
> 2016-08-16 1:42 GMT+09:00 Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>:
>> On 07/08/16 16:22, Akinobu Mita wrote:
>>> This adds Texas Instruments' ADC12130/ADC12132/ADC12138 12-bit plus
>>> sign ADC driver. I have tested with the ADC12138. The ADC12130 and
>>> ADC12132 are not tested but these are similar to ADC12138 except that
>>> the mode programming instruction is a bit different.
>>>
>>> Signed-off-by: Akinobu Mita <akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>> Hi,
>>
>> Now had time for a closer look. A few minor bits and bobs to fix
>> up highlighted inline.
>>
>> Looks pretty good.
>>
>> Jonathan
>>> Cc: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>>> Cc: Hartmut Knaack <knaack.h-Mmb7MZpHnFY@public.gmane.org>
>>> Cc: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
>>> Cc: Peter Meerwald <pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>
>>> ---
>>> * Changes from v2
>>> - improve error label names
>>>
>>> .../devicetree/bindings/iio/adc/ti-adc12138.txt | 32 ++
>>> drivers/iio/adc/Kconfig | 12 +
>>> drivers/iio/adc/Makefile | 1 +
>>> drivers/iio/adc/ti-adc12138.c | 542 +++++++++++++++++++++
>>> 4 files changed, 587 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-adc12138.txt
>>> create mode 100644 drivers/iio/adc/ti-adc12138.c
>>>
>>> diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc12138.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc12138.txt
>>> new file mode 100644
>>> index 0000000..3a11d2a
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/iio/adc/ti-adc12138.txt
>>> @@ -0,0 +1,32 @@
>>> +* Texas Instruments' ADC12130/ADC12132/ADC12138
>>> +
>>> +Required properties:
>>> + - compatible: Should be one of
>>> + * "ti,adc12130"
>>> + * "ti,adc12132"
>>> + * "ti,adc12138"
>>> + - reg: SPI chip select number for the device
>>> + - interrupts: Should contain interrupt for EOC (end of conversion)
>>> + - clocks: phandle to conversion clock input
>>> + - spi-max-frequency: Definision as per
>>> + Documentation/devicetree/bindings/spi/spi-bus.txt
>>> + - vref-p-supply: The regulator supply for positive analog voltage reference
>>> +
>>> +Optional properties:
>>> + - vref-n-supply: The regulator supply for negative analog voltage reference
>>> + If not specified, this is assumed to be analog ground.
>> This is novel. Documented in the datasheet as a negative reference which
>> must be positive (greater than 0) for it to work well.
>>
>> Intersting question on whether this should be optional. Easy enough to
>> provided a fixed regulator at 0V afterall.
>>
>>
>>> + - acquisition-time: The number of conversion clock periods for the S/H's
>>> + acquisition time. Should be one of 6, 10, 18, 34. If not specified,
>>> + default value of 10 is used.
>> Should this be a ti specific parameter. Not sure.
>
> Is it better to change this parameter to "ti,acquisition-time" ?
I think so. If not it needs to go in generic docs rather than this file then
be appropriately cross referenced from here. I'd keep it as ti specific for now.
We can generalize later if it makes sense (though will have to support this
as well which isn't too difficult).
>
>> I'd also add a note here about why one would set this to other than the
>> default (source impedance etc).
>>
>>
>>> +
>>> +Example:
>>> +adc@0 {
>>> + compatible = "ti,adc12138";
>>> + reg = <0>;
>>> + interrupts = <28 IRQ_TYPE_EDGE_RISING>;
>>> + interrupt-parent = <&gpio1>;
>>> + clocks = <&cclk>;
>>> + vref-p-supply = <&ldo4_reg>;
>>> + spi-max-frequency = <5000000>;
>>> + acquisition-time = <6>;
>>> +};
> --
> 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
>
prev parent reply other threads:[~2016-08-21 9:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-07 15:22 [PATCH v3] iio: adc: add ADC12130/ADC12132/ADC12138 ADC driver Akinobu Mita
[not found] ` <1470583330-6850-1-git-send-email-akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-15 16:42 ` Jonathan Cameron
[not found] ` <b43674fb-6a68-de05-0f06-e1f92986705d-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-08-20 2:50 ` Akinobu Mita
2016-08-20 2:54 ` Akinobu Mita
[not found] ` <CAC5umyg831=Q4iih+4rPpdNSyEEgBKqHk00cLCd6XJ5dTw92Jw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-21 9:45 ` 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=e76a92c5-4de6-88e5-746f-337f82d196d2@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=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@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).