linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sa, Nuno" <Nuno.Sa@analog.com>
To: "robh@kernel.org" <robh@kernel.org>
Cc: "linux@roeck-us.net" <linux@roeck-us.net>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"jdelvare@suse.com" <jdelvare@suse.com>
Subject: Re: [PATCH 3/3] dt-bindings: iio: Add ltc2947 documentation
Date: Tue, 8 Oct 2019 14:20:03 +0000	[thread overview]
Message-ID: <3b9f5fd1923231e8f7efc28ce76d8d1b6d845a7e.camel@analog.com> (raw)
In-Reply-To: <CAL_JsqK6oC1VFb4ni9pn9a=sfxWK9pAmBBgajpZwad5udFkPoA@mail.gmail.com>

On Fri, 2019-10-04 at 10:23 -0500, Rob Herring wrote:
> 
> On Fri, Oct 4, 2019 at 9:59 AM Sa, Nuno <Nuno.Sa@analog.com> wrote:
> > Hi Rob,
> > 
> > Just wanted to clarify something which I don't know if is something
> > I'm
> > doing wrong or if it is some issue.
> > 
> > On Wed, 2019-10-02 at 14:06 -0500, Rob Herring wrote:
> > > On Wed, Oct 2, 2019 at 10:09 AM Sa, Nuno <Nuno.Sa@analog.com>
> > > wrote:
> > > > On Wed, 2019-10-02 at 09:19 -0500, Rob Herring wrote:
> > > > > On Tue, Sep 24, 2019 at 02:49:45PM +0200, Nuno Sá wrote:
> > > > > > Document the LTC2947 device devicetree bindings.
> > > > > > 
> > > > > > Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> > > > > > ---
> > > > > >  .../bindings/hwmon/adi,ltc2947.yaml           | 101
> > > > > > ++++++++++++++++++
> > > > > >  MAINTAINERS                                   |   1 +
> > > > > >  2 files changed, 102 insertions(+)
> > > > > >  create mode 100644
> > > > > > Documentation/devicetree/bindings/hwmon/adi,ltc2947.yaml
> > > > > > 
> > > > > > diff --git
> > > > > > a/Documentation/devicetree/bindings/hwmon/adi,ltc2947.yaml
> > > > > > b/Documentation/devicetree/bindings/hwmon/adi,ltc2947.yaml
> > > > > > new file mode 100644
> > > > > > index 000000000000..2ea0187421d4
> > > > > > --- /dev/null
> > > > > > +++
> > > > > > b/Documentation/devicetree/bindings/hwmon/adi,ltc2947.yaml
> > > > > > @@ -0,0 +1,101 @@
> > > > > 
> > > > > Missing license. Please make new bindings (GPL-2.0-only OR
> > > > > BSD-2-
> > > > > Clause)
> > > > 
> > > > ack.
> > > > 
> > > > > > +%YAML 1.2
> > > > > > +---
> > > > > > +$id:
> > > > > > http://devicetree.org/schemas/bindings/hwmon/adi,ltc2947.yaml#
> > > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > > > +
> > > > > > +title: Analog Devices LTC2947 high precision power and
> > > > > > energy
> > > > > > monitor
> > > > > > +
> > > > > > +maintainers:
> > > > > > +  - Nuno Sá <nuno.sa@analog.com>
> > > > > > +
> > > > > > +description: |
> > > > > > +  Analog Devices LTC2947 high precision power and energy
> > > > > > monitor
> > > > > > over SPI or I2C.
> > > > > > +
> > > > > > +
> > > > > > https://www.analog.com/media/en/technical-documentation/data-sheets/LTC2947.pdf
> > > > > > +
> > > > > > +properties:
> > > > > > +  compatible:
> > > > > > +    enum:
> > > > > > +      - adi,ltc2947
> > > > > > +
> > > > > > +  reg:
> > > > > > +    maxItems: 1
> > > > > > +
> > > > > > +  clocks:
> > > > > > +    description:
> > > > > > +      The LTC2947 uses either a trimmed internal
> > > > > > oscillator or
> > > > > > an
> > > > > > external clock
> > > > > > +      as the time base for determining the integration
> > > > > > period
> > > > > > to
> > > > > > represent time,
> > > > > > +      charge and energy. When an external clock is used,
> > > > > > this
> > > > > > property must be
> > > > > > +      set accordingly.
> > > > > > +    maxItems: 1
> > > > > > +
> > > > > > +  adi,accumulator-ctl-pol:
> > > > > > +    description:
> > > > > > +      This property controls the polarity of current that
> > > > > > is
> > > > > > accumulated to
> > > > > > +      calculate charge and energy so that, they can be
> > > > > > only
> > > > > > accumulated for
> > > > > > +      positive current for example. Since there are two
> > > > > > sets
> > > > > > of
> > > > > > registers for
> > > > > > +      the accumulated values, this entry can also have two
> > > > > > items
> > > > > > which sets
> > > > > > +      energy1/charge1 and energy2/charger2 respectively.
> > > > > > Check
> > > > > > table 12 of the
> > > > > > +      datasheet for more information on the supported
> > > > > > options.
> > > > > > +    allOf:
> > > > > > +      - $ref: /schemas/types.yaml#/definitions/uint32-
> > > > > > array
> > > > > > +      - enum: [0, 1, 2, 3]
> > > > > > +      - minItems: 2
> > > > > > +      - maxItems: 2
> > > > > > +    default: [0, 0]
> > > > > 
> > > > > This should be:
> > > > > 
> > > > > allOf:
> > > > >   - $ref: ...
> > > > > items:
> > > > >   enum: [0, 1, 2, 3]
> > > > >   default: 0
> > > > > minItems: 2
> > > > > maxItems: 2
> > 
> > When trying the above I get:
> > 
> > "ltc2947@0: adi,accumulator-ctl-pol:0: [0, 1] is not valid under
> > any of
> > the given schemas"
> 
> Is dtschema up to date with the latest. I think I fixed this case
> recently, though with the wonderful json-schema errors it is hard to
> tell.

With latest dtschema works.

Thanks!
Nuno Sa

> Rob

-- 
Analog Devices GmbH      Otl-Aicher Strasse 60-64      80807 München
Sitz der Gesellschaft München, Registergericht München HRB 40368,
Geschäftsführer: Stefan Steyerl, Thomas Edward Cribben, Michael Paul
Sondel

  reply	other threads:[~2019-10-08 14:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 12:49 [PATCH 0/3] LTC2947 support Nuno Sá
2019-09-24 12:49 ` [PATCH 1/3] hwmon: Fix HWMON_P_MIN_ALARM mask Nuno Sá
2019-10-02 13:37   ` Guenter Roeck
2019-09-24 12:49 ` [PATCH 2/3] hwmon: Add support for ltc2947 Nuno Sá
2019-10-03  4:14   ` Guenter Roeck
2019-10-04  7:45     ` Sa, Nuno
2019-10-04 15:06       ` Guenter Roeck
2019-10-07 12:25         ` Sa, Nuno
2019-10-07 12:44           ` Guenter Roeck
2019-10-07 14:51             ` Sa, Nuno
2019-10-10  7:13               ` Sa, Nuno
2019-10-10 15:21                 ` Guenter Roeck
2019-10-11  6:59                   ` Sa, Nuno
2019-09-24 12:49 ` [PATCH 3/3] dt-bindings: iio: Add ltc2947 documentation Nuno Sá
2019-10-02 14:19   ` Rob Herring
2019-10-02 15:09     ` Sa, Nuno
2019-10-02 19:06       ` Rob Herring
2019-10-04 14:58         ` Sa, Nuno
2019-10-04 15:23           ` Rob Herring
2019-10-08 14:20             ` Sa, Nuno [this message]
2019-09-26 10:17 ` [PATCH 0/3] LTC2947 support Sa, Nuno

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=3b9f5fd1923231e8f7efc28ce76d8d1b6d845a7e.camel@analog.com \
    --to=nuno.sa@analog.com \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mark.rutland@arm.com \
    --cc=robh@kernel.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).