All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amit Kucheria <amit.kucheria@linaro.org>
To: Jishnu Prakash <jprakash@codeaurora.org>
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Matthias Kaehlcke <mka@chromium.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Jonathan.Cameron@huawei.com,
	Siddartha Mohanadoss <smohanad@codeaurora.org>,
	kgunda@codeaurora.org, aghayal@codeaurora.org,
	Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Andy Gross <andy.gross@linaro.org>,
	"open list:IIO SUBSYSTEM AND DRIVERS" <linux-iio@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	linux-arm-msm-owner@vger.kernel.org
Subject: Re: [PATCH 1/3] iio: adc: Convert the QCOM SPMI ADC bindings to .yaml format
Date: Tue, 14 Apr 2020 14:39:13 +0530	[thread overview]
Message-ID: <CAP245DXqDFGkd0Q3WactiwZjx5HpV3UrLmb7hd_9uvoy2_=d5Q@mail.gmail.com> (raw)
In-Reply-To: <69b882b0-56ad-1b93-0a9d-2c7f96dd9d32@codeaurora.org>

On Mon, Apr 6, 2020 at 5:15 PM Jishnu Prakash <jprakash@codeaurora.org> wrote:
>
> Hi Amit,
>
> On 4/3/2020 5:34 PM, Amit Kucheria wrote:
> >
> >> +required:
> >> +  - compatible
> >> +  - reg
> >> +  - '#address-cells'
> >> +  - '#size-cells'
> >> +  - '#io-channel-cells'
> >> +
> >> +patternProperties:
> >> +  "^[a-z0-9-_@]$":
> >> +    type: object
> >> +    description: |
> >> +      Represents the external channels which are connected to the ADC.
> >> +      For compatible property "qcom,spmi-vadc" following channels, also known as
> >> +      reference point channels, are used for result calibration and their channel
> >> +      configuration nodes should be defined:
> >> +      VADC_REF_625MV and/or VADC_SPARE1(based on PMIC version) VADC_REF_1250MV,
> >> +      VADC_GND_REF and VADC_VDD_VADC.
> > Instead of this note for "qcom,spmi-vadc", you can enforce this
> > through checks in YAML grammar.
> >
> > A simple example can be found in
> > Documentation/devicetree/bindings/thermal/qcom-tsens.yaml. Look for
> > the if, then, else clause which determines how many interrupts need to
> > be defined.
>
> I have gone through tsens and other examples, but I'm not able to get a
> way to apply this kind of constraint, on what child nodes should be present.
>
> In this case, the constraint would have to be that for compatible
> property "qcom,spmi-vadc", there should be at least four child nodes and
> those four should have their "reg" property fixed to the channel values
> mentioned above. I can see how to apply constraints on a single property
> like interrupts in tsens, but I'm not sure if there is a way to specify
> a lower limit to the number of child nodes or something like "there
> should be at least one child node with value 0x9 for its "reg"
> property". I could not find any examples with constraints placed on
> number of occurrences of a child node.
>
> Can you please share an example of such a constraint if you are aware of
> any or suggest some way by which this kind of constraint can be specified?

Hi Jishnu,

I misread that particular property. I don't think it is possible to
specify child nodes w/o splitting this binding into two, I think.
Please go ahead with the rest of changes. I'll keep digging to see if
this is possible.

Regards,
Amit

  reply	other threads:[~2020-04-14  9:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 15:44 [PATCH 0/3] iio: adc: Add support for QCOM SPMI PMIC7 ADC Jishnu Prakash
2020-03-24 15:44 ` [PATCH 1/3] iio: adc: Convert the QCOM SPMI ADC bindings to .yaml format Jishnu Prakash
2020-03-28 16:51   ` Jonathan Cameron
2020-04-06 11:41     ` Jishnu Prakash
2020-03-30 15:38   ` Rob Herring
2020-04-06 11:43     ` Jishnu Prakash
2020-04-03 12:04   ` Amit Kucheria
2020-04-06 11:44     ` Jishnu Prakash
2020-04-14  9:09       ` Amit Kucheria [this message]
2020-03-24 15:44 ` [PATCH 2/3] iio: adc: Add PMIC7 ADC bindings Jishnu Prakash
2020-03-28 16:54   ` Jonathan Cameron
2020-04-06 11:45     ` Jishnu Prakash
2020-04-06 16:05       ` Jonathan Cameron
2020-04-03 12:11   ` Amit Kucheria
2020-04-06 11:45     ` Jishnu Prakash
2020-03-24 15:44 ` [PATCH 3/3] iio: adc: Add support for PMIC7 ADC Jishnu Prakash
2020-03-24 16:33   ` Andy Shevchenko
2020-04-06 11:46     ` Jishnu Prakash
2020-03-28 17:04   ` Jonathan Cameron
2020-04-06 11:46     ` Jishnu Prakash
2020-03-31 20:06   ` Rob Herring
2020-04-06 11:47     ` Jishnu Prakash

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='CAP245DXqDFGkd0Q3WactiwZjx5HpV3UrLmb7hd_9uvoy2_=d5Q@mail.gmail.com' \
    --to=amit.kucheria@linaro.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=aghayal@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=jprakash@codeaurora.org \
    --cc=kgunda@codeaurora.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm-owner@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mka@chromium.org \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=smohanad@codeaurora.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 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.