devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
To: Andrew Bresticker <abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
	James Hartley
	<james.hartley-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>,
	Phani Movva <phani.movva-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org,
	knaack.h-Mmb7MZpHnFY@public.gmane.org,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Naidu Tellapati
	<Naidu.Tellapati-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Subject: Re: [PATCH v2 2/3] DT: iio: adc: Add CC_10001 binding documentation
Date: Tue, 11 Nov 2014 13:29:44 -0300	[thread overview]
Message-ID: <54623978.60005@imgtec.com> (raw)
In-Reply-To: <CAL1qeaHzp==jmTB8dJ1M3NuocwuSqsfbVSU4nuM50vrOyfJ3qA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>



On 11/10/2014 06:28 PM, Andrew Bresticker wrote:
> Ezequiel,
> 
> On Mon, Nov 10, 2014 at 11:59 AM, Ezequiel Garcia
> <ezequiel.garcia-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org> wrote:
>> On 11/10/2014 04:50 PM, Ezequiel Garcia wrote:
>>> On 11/08/2014 09:57 AM, Jonathan Cameron wrote:
>>>> On 05/11/14 21:56, Ezequiel Garcia wrote:
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/iio/adc/cc_10001_adc.txt b/Documentation/devicetree/bindings/iio/adc/cc_10001_adc.txt
>>>>> new file mode 100644
>>>>> index 0000000..6491839
>>>>> --- /dev/null
>>>>> +++ b/Documentation/devicetree/bindings/iio/adc/cc_10001_adc.txt
>>>>> @@ -0,0 +1,19 @@
>>>>> +* Cosmic Circuits - Analog to Digital Converter (CC-10001-ADC)
>>>>> +
>>>>> +Required properties:
>>>>> +  - compatible: Should be "cosmic,10001-adc"
>>>>> +  - reg: Should contain adc registers location and length.
>>>>> +  - cosmic,adc-available-channels: Bitmask of the channels currently enabled.
>>>> I suspect there may be other preferred ways of doing this (child nodes perhaps
>>>> for each enabled channel?)
>>>
>>> Hm, I'm not sure about this. As far I can recall, if a node has children
>>> then it *must* be a bus, which is not the case. Of course, you'll find
>>> examples doing this wrong.
>>>
>>
>> On a second thought... I guess you meant something like this?
>>
>> adc: adc@18101600 {
>>         compatible = "cosmic,10001-adc";
>>         reg = <0x18101600 0x24>;
>>         clocks = <&adc_clk>;
>>         clock-names = "adc";
>>         vref-supply = <&reg_1v8>;
>>         cosmic,channels {
>>                 #address-cells = <1>;
>>                 #size-cells = <0>;
>>                 channel@0 {
>>                         reg = <0>;
>>                 };
>>                 channel@1 {
>>                         reg = <1>;
>>                 };
>>         };
>> };
>>
>> Might be better, but I don't have a strong opinion on it.
> 
> I actually don't think this is any better.  The point of the property
> is to indicate which channels are available for use by the main CPU,
> i.e. channels not used by the RPU co-processor.  The property is not
> used to indicate the presence of certain channels in hardware, in
> which case maybe a bus would be appropriate.
> 
> Also, perhaps it would be better to reverse the sense of the property
> (maybe, "cosmic,reserved-adc-channels") and make it optional?  I did
> something similar for the MIPS GIC binding:
> http://patchwork.linux-mips.org/patch/8268/.
> 

I'm fine with that. If Jonathan agrees with it (or better, if we can
have an ack from a devicetree binding maintainer) I can spin a v3.

Thanks!
-- 
Ezequiel

  parent reply	other threads:[~2014-11-11 16:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 21:56 [PATCH v2 0/3] iio: Add Cosmic Circuits ADC support Ezequiel Garcia
     [not found] ` <1415224611-22096-1-git-send-email-ezequiel.garcia-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2014-11-05 21:56   ` [PATCH v2 1/3] iio: adc: Cosmic Circuits 10001 ADC driver Ezequiel Garcia
     [not found]     ` <1415224611-22096-2-git-send-email-ezequiel.garcia-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2014-11-08 12:55       ` Jonathan Cameron
     [not found]         ` <545E12DA.2040107-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-11-10 19:51           ` Ezequiel Garcia
2014-11-05 21:56   ` [PATCH v2 2/3] DT: iio: adc: Add CC_10001 binding documentation Ezequiel Garcia
     [not found]     ` <1415224611-22096-3-git-send-email-ezequiel.garcia-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2014-11-08 12:57       ` Jonathan Cameron
     [not found]         ` <545E1333.9010904-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-11-10 19:50           ` Ezequiel Garcia
     [not found]             ` <5461170B.7070505-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2014-11-10 19:59               ` Ezequiel Garcia
     [not found]                 ` <54611934.6050701-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2014-11-10 21:28                   ` Andrew Bresticker
     [not found]                     ` <CAL1qeaHzp==jmTB8dJ1M3NuocwuSqsfbVSU4nuM50vrOyfJ3qA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-11 16:29                       ` Ezequiel Garcia [this message]
2014-11-08 12:59       ` Jonathan Cameron
2014-11-05 21:56   ` [PATCH v2 3/3] DT: Add a vendor prefix for Cosmic Circuits Ezequiel Garcia

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=54623978.60005@imgtec.com \
    --to=ezequiel.garcia-1axoqhu6uovqt0dzr+alfa@public.gmane.org \
    --cc=Naidu.Tellapati-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org \
    --cc=abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=james.hartley-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org \
    --cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@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=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=phani.movva-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org \
    --cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
    --cc=robh+dt-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).