From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: s.abhisit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
Jonathan.Cameron-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org,
jacopo-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
knaack.h-Mmb7MZpHnFY@public.gmane.org,
lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org,
fabrice.gasnier-qxv4g6HH51o@public.gmane.org,
akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
marek.vasut+renesas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org,
mike.looijmans-Oq418RWZeHk@public.gmane.org,
peda-koto5C5qi+TLoDKTGw+V6w@public.gmane.org,
jeff.dagenais-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org,
adi.reus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH 5/5] lmp92001: mfd: doc: Add support LMP92001
Date: Tue, 12 Sep 2017 11:09:23 +0100 [thread overview]
Message-ID: <20170912110923.0f80c116@archlinux> (raw)
In-Reply-To: <20170911215841.jaaipbdcf5hchjck@rob-hp-laptop>
On Mon, 11 Sep 2017 16:58:41 -0500
Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Thu, Aug 31, 2017 at 01:25:28AM +0700, s.abhisit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> > From: Abhisit Sangjan <s.abhisit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >
> > TI LMP92001 Analog System Monitor and Controller
> >
> > 8-bit GPIOs.
> > 12 DACs with 12-bit resolution.
> >
> > The GPIOs and DACs are shared port function with Cy function pin to
> > take control the pin suddenly from external hardware.
> > DAC's referance voltage selectable for Internal/External.
> >
> > 16 + 1 ADCs with 12-bit resolution.
> >
> > Built-in internal Temperature Sensor on channel 17.
> > Window Comparator Function is supported on channel 1-3 and 9-11 for
> > monitoring with interrupt signal (pending to implement for interrupt).
> > ADC's referance voltage selectable for Internal/External.
> >
> > Signed-off-by: Abhisit Sangjan <s.abhisit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> > Documentation/ABI/testing/sysfs-bus-iio-lmp920001 | 65 ++++++++++++++++++++++
> > .../devicetree/bindings/gpio/gpio-lmp92001.txt | 22 ++++++++
>
> As Jonathan said, please split.
>
> > .../bindings/iio/adc/ti-lmp92001-adc.txt | 20 +++++++
> > .../bindings/iio/dac/ti-lmp92001-dac.txt | 35 ++++++++++++
> > 4 files changed, 142 insertions(+)
> > create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-lmp920001
> > create mode 100644 Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt
> > create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt
> > create mode 100644 Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt
>
> [...]
>
> > diff --git a/Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt b/Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt
> > new file mode 100644
> > index 000000000000..f9a18c492145
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/gpio/gpio-lmp92001.txt
> > @@ -0,0 +1,22 @@
> > +* Texas Instruments' LMP92001 GPIOs
> > +
>
> Need to state what this is a child of and refer to that binding doc.
> Same for the others.
>
> > +Required properties:
> > + - compatible: Must be set to "ti,lmp92001-gpio".
> > + - reg: i2c chip address for the device.
>
> ? That's for the parent.
>
> > + - gpio-controller: Marks the device node as a gpio controller.
> > + - #gpio-cells : Should be two. The first cell is the pin number and the
> > + second cell is used to specify the gpio polarity:
> > + 0 = Active high
> > + 1 = Active low
> > +
> > +Example:
> > +lmp92001@20 {
> > + compatible = "ti,lmp92001";
> > + reg = <0x20>;
> > +
> > + gpio-controller {
>
> Should be "gpio {"
>
> > + compatible = "ti,lmp92001-gpio";
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > + };
> > +};
> > diff --git a/Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt b/Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt
> > new file mode 100644
> > index 000000000000..4565961bf511
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/ti-lmp92001-adc.txt
> > @@ -0,0 +1,20 @@
> > +* Texas Instruments' LMP92001 ADCs
> > +
> > +Required properties:
> > + - compatible: Must be set to "ti,lmp92001-adc".
> > + - reg: i2c chip address for the device.
> > + - ti,lmp92001-adc-mask: bit mask for which channel is enable.
> > + 0 = Off
> > + 1 = On
> > +
> > +Example:
> > +lmp92001@20 {
> > + compatible = "ti,lmp92001";
> > + reg = <0x20>;
> > +
> > + lmp92001-adc {
>
> adc {
>
> > + compatible = "ti,lmp92001-adc";
> > + ti,lmp92001-adc-mode = "continuous";
>
> Not documented and I believe we're going to add a common property for
> this.
Possibly. I'm not keen on it being explicitly controlled in general.
It isn't a feature of the hardware in this case (I think) and as userspace
control it is very hard for userspace to know what to do with it -
normally it is better to put sufficient smarts in the driver to handle
this transparently from either dt or userspace abi point of view.
At a rough guess 10-25% of the hardware in IIO has a similar mode (possibly more)
We expose it precisely 1 other driver at the moment (and to be honest
I can't recall why we allowed it in there) There are all sorts of optimizations
that can be done in the driver if we don't make this a manual control.
Jonathan
>
> > + ti,lmp92001-adc-mask = <0x00000079>;
> > + };
> > +};
> > diff --git a/Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt b/Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt
> > new file mode 100644
> > index 000000000000..882db9ca92f5
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/dac/ti-lmp92001-dac.txt
> > @@ -0,0 +1,35 @@
> > +* Texas Instruments' LMP92001 DACs
> > +
> > +Required properties:
> > + - compatible: Must be set to "ti,lmp92001-dac".
> > + - reg: i2c chip address for the device.
> > + - ti,lmp92001-dac-hiz: hi-impedance control,
> > + 1 = Forces all OUT[1:12] outputs to hi-z, 0 = normal
> > + - ti,lmp92001-dac-outx:
> > + Cy = 0, 1 = will force associated OUTx outputs to VDD
> > + Cy = 0, 0 = will force associated OUTx outputs to GND
> > + - ti,lmp92001-dac-gang: What group of Cy is governed to.
> > + -----------------------------------------
> > + | Cy | CDAC:GANG = 0 | CDAC:GANG = 1 |
> > + -----------------------------------------
> > + | C1 | OUT[1:4] | OUT[1:3] |
> > + -----------------------------------------
> > + | C2 | OUT[5:6] | OUT[4:6] |
> > + -----------------------------------------
> > + | C3 | OUT[7:8] | OUT[7:9] |
> > + -----------------------------------------
> > + | C4 | OUT[9:12] | OUT[10:12] |
> > + -----------------------------------------
> > +
> > +Example:
> > +lmp92001@20 {
> > + compatible = "ti,lmp92001";
> > + reg = <0x20>;
> > +
> > + lmp92001-dac {
>
> dac {
>
> > + compatible = "ti,lmp92001-dac";
> > + ti,lmp92001-dac-hiz = /bits/ 8 <0>;
> > + ti,lmp92001-dac-outx = /bits/ 8 <0>;
> > + ti,lmp92001-dac-gang = /bits/ 8 <0>;
> > + };
> > +};
> > --
> > 2.13.0
> >
> --
> 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:[~2017-09-12 10:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 18:25 [PATCH 5/5] lmp92001: mfd: doc: Add support LMP92001 s.abhisit-Re5JQEeQqe8AvxtiuMwx3w
2017-09-10 14:45 ` Jonathan Cameron
[not found] ` <20170830182528.9479-1-s.abhisit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-11 21:58 ` Rob Herring
2017-09-12 10:09 ` Jonathan Cameron [this message]
2017-09-12 13:45 ` Rob Herring
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=20170912110923.0f80c116@archlinux \
--to=jic23-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=Jonathan.Cameron-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=adi.reus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=fabrice.gasnier-qxv4g6HH51o@public.gmane.org \
--cc=jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org \
--cc=jacopo-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org \
--cc=jeff.dagenais-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=knaack.h-Mmb7MZpHnFY@public.gmane.org \
--cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org \
--cc=marek.vasut+renesas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mike.looijmans-Oq418RWZeHk@public.gmane.org \
--cc=peda-koto5C5qi+TLoDKTGw+V6w@public.gmane.org \
--cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=s.abhisit-Re5JQEeQqe8AvxtiuMwx3w@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).