From: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> To: Bjorn Andersson <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Cc: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, "linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> Subject: Re: [PATCH 1/5] iio: xoadc: augment DT bindings a bit Date: Mon, 27 Mar 2017 09:56:03 +0200 [thread overview] Message-ID: <CACRpkdZwB9D_DrgKxTUUA-87qK7U4+tMPV+MCFM2zgVVO4t8ow@mail.gmail.com> (raw) In-Reply-To: <20170326045717.GB70446-iTMlPVAvTYNoL7IsjepNBwq4bfNCki47rNQQ6b5fDX0@public.gmane.org> On Sun, Mar 26, 2017 at 6:57 AM, Bjorn Andersson <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote: > On Sat 18 Mar 06:33 PDT 2017, Linus Walleij wrote: > >> +adc-channel@0c { > > Shouldn't the @ be followed by the value of the first cell in "reg"? > (Which will collide if we name them all "adc-channel"). I don't think we have a rule about these other than that they should be unique. I renamed them so that it is unique using the combined premux+amux number: >> + reg = <0x00 0x0c>; So this becomes adc-channel@000c { reg = <0x00 0x0c>; }; >> + On PM8058 the hardware only supports 16 channels, but we get the same >> + channels repeating with its input divided down by 1 or 3. Channels 00, >> + 10, 20, ... f0 are the raw values, 04, 14, 24 .. f4 are "unity" channels >> + divided by 1, and 08, 18, 28 .. f8 are channels divided by 3. Bits 0 >> + and 1 of the channel index should always be 0. >> + >> + On PM8921 the hardware supports more than 16 channels through a complex >> + routing matrix using a premux, so 00, 10, 20 .. f0 are the basic raw >> + channels while another set of channels appear for 04, 14, 24 .. f4, >> + and again some of the same channels appear again divided down by 3 >> + in 08, 18, 28 .. f8. Again bits 0 and 1 of the channel index should >> + always be 0. > > While I believe documenting this is a good thing I do not think it adds > value to this binding document (other than showing Rob the absurdness of > the addressing scheme). Please consider moving it to the driver (haven't > checked how you commented it yet) and drop it from here. Dropped it. I'm sending this modified version as v2. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Linus Walleij <linus.walleij@linaro.org> To: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: Jonathan Cameron <jic23@kernel.org>, "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org> Subject: Re: [PATCH 1/5] iio: xoadc: augment DT bindings a bit Date: Mon, 27 Mar 2017 09:56:03 +0200 [thread overview] Message-ID: <CACRpkdZwB9D_DrgKxTUUA-87qK7U4+tMPV+MCFM2zgVVO4t8ow@mail.gmail.com> (raw) In-Reply-To: <20170326045717.GB70446@Bjorns-MacBook-Pro-2.local> On Sun, Mar 26, 2017 at 6:57 AM, Bjorn Andersson <bjorn.andersson@linaro.org> wrote: > On Sat 18 Mar 06:33 PDT 2017, Linus Walleij wrote: > >> +adc-channel@0c { > > Shouldn't the @ be followed by the value of the first cell in "reg"? > (Which will collide if we name them all "adc-channel"). I don't think we have a rule about these other than that they should be unique. I renamed them so that it is unique using the combined premux+amux number: >> + reg = <0x00 0x0c>; So this becomes adc-channel@000c { reg = <0x00 0x0c>; }; >> + On PM8058 the hardware only supports 16 channels, but we get the same >> + channels repeating with its input divided down by 1 or 3. Channels 00, >> + 10, 20, ... f0 are the raw values, 04, 14, 24 .. f4 are "unity" channels >> + divided by 1, and 08, 18, 28 .. f8 are channels divided by 3. Bits 0 >> + and 1 of the channel index should always be 0. >> + >> + On PM8921 the hardware supports more than 16 channels through a complex >> + routing matrix using a premux, so 00, 10, 20 .. f0 are the basic raw >> + channels while another set of channels appear for 04, 14, 24 .. f4, >> + and again some of the same channels appear again divided down by 3 >> + in 08, 18, 28 .. f8. Again bits 0 and 1 of the channel index should >> + always be 0. > > While I believe documenting this is a good thing I do not think it adds > value to this binding document (other than showing Rob the absurdness of > the addressing scheme). Please consider moving it to the driver (haven't > checked how you commented it yet) and drop it from here. Dropped it. I'm sending this modified version as v2. Yours, Linus Walleij
next prev parent reply other threads:[~2017-03-27 7:56 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-03-18 13:33 [PATCH 1/5] iio: xoadc: augment DT bindings a bit Linus Walleij 2017-03-18 13:33 ` Linus Walleij [not found] ` <20170318133358.22314-1-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2017-03-19 9:34 ` Jonathan Cameron 2017-03-19 9:34 ` Jonathan Cameron 2017-03-24 15:12 ` Rob Herring 2017-03-24 15:12 ` Rob Herring 2017-03-24 15:25 ` Linus Walleij 2017-03-24 15:25 ` Linus Walleij [not found] ` <CACRpkdaZmauodn+xvSudUELCRrO4j7Dj+SM+H4bkkqQMeJ6EoA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-03-25 15:47 ` Jonathan Cameron 2017-03-25 15:47 ` Jonathan Cameron 2017-03-26 4:57 ` Bjorn Andersson 2017-03-26 4:57 ` Bjorn Andersson [not found] ` <20170326045717.GB70446-iTMlPVAvTYNoL7IsjepNBwq4bfNCki47rNQQ6b5fDX0@public.gmane.org> 2017-03-27 7:56 ` Linus Walleij [this message] 2017-03-27 7:56 ` Linus Walleij
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=CACRpkdZwB9D_DrgKxTUUA-87qK7U4+tMPV+MCFM2zgVVO4t8ow@mail.gmail.com \ --to=linus.walleij-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \ --cc=bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \ --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.