From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Rob Herring <robh@kernel.org>, Conor Dooley <conor@kernel.org>,
	Cosmin Tanislav <cosmin.tanislav@analog.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>, <devicetree@vger.kernel.org>,
	<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [PATCH 1/2] dt-bindings: iio: ad74413r: add binding for digital input threshold
Date: Sun, 2 Jul 2023 17:36:48 +0800	[thread overview]
Message-ID: <20230702173648.00006a1d@Huawei.com> (raw)
In-Reply-To: <075c8d01-5788-a3c4-44e0-36cb9318fc6a@linaro.org>
On Mon, 26 Jun 2023 10:29:22 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> On 26/06/2023 10:15, Rasmus Villemoes wrote:
> > On 23/06/2023 23.57, Rob Herring wrote:  
> >> On Fri, Jun 23, 2023 at 05:44:50PM +0100, Conor Dooley wrote:  
> >>> On Fri, Jun 23, 2023 at 01:33:25PM +0200, Rasmus Villemoes wrote:  
> >>>> diff --git a/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml b/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml
> >>>> index 590ea7936ad7..1f90ce3c7932 100644
> >>>> --- a/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml
> >>>> +++ b/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml
> >>>> @@ -51,6 +51,14 @@ properties:
> >>>>        Shunt (sense) resistor value in micro-Ohms.
> >>>>      default: 100000000
> >>>>  
> >>>> +  digital-input-threshold-microvolt:  
> >>>
> >>> Should this not have an adi vendor prefix, similar to
> >>> "adi,digital-input-threshold-mode-fixed"?  
> >>
> >> Yes.  
> > 
> > OK. But I'm not really sure what the rules are for when such a prefix
> > must be added, so some guidance would be appreciated. There's
> > 
> > - DO use a vendor prefix on device specific property names. Consider if
> >   properties could be common among devices of the same class.
> > 
> > And my thinking was that a threshold for when a digital input should
> > count as high/low would be a rather generic thing, so not particularly
> > device specific.  
> 
> Then find some more users of it.
The hi8435 could make use of this, but it currently doesn't get these thresholds
from DT (despite there being a reasonable argument that these should be characteristics
of the board wiring etc) but rather from userspace controls.
Might well be something in gpio drivers?  Linus / Bartosz, any of the input gpio
devices really threshold detectors?  If so is there any precedence for a DT
binding to set the threshold?
> 
> > 
> > Also, this very binding has a shunt-resistor-micro-ohms, and the
> > individual channels have a drive-strength-microamp (granted, that latter
> > one is a recent one of mine and may have slipped through review?). I can
> > certainly understand that when a property specifies a raw value to put
> > into some register (or field), that's very specific to that chip (or
> > small family of chips) - the adi,ch-func properties fall into that category.  
> 
> Best regards,
> Krzysztof
> 
next prev parent reply	other threads:[~2023-07-02  9:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23 11:33 [PATCH 0/2] iio: ad74413r: allow configuring digital input threshold Rasmus Villemoes
2023-06-23 11:33 ` [PATCH 1/2] dt-bindings: iio: ad74413r: add binding for " Rasmus Villemoes
2023-06-23 16:44   ` Conor Dooley
2023-06-23 21:57     ` Rob Herring
2023-06-26  8:15       ` Rasmus Villemoes
2023-06-26  8:29         ` Krzysztof Kozlowski
2023-07-02  9:36           ` Jonathan Cameron [this message]
2023-06-23 21:57   ` Rob Herring
2023-06-23 11:33 ` [PATCH 2/2] iio: addac: ad74413r: wire up digital-input-threshold-microvolt DT property Rasmus Villemoes
2023-06-25 11:14   ` Jonathan Cameron
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=20230702173648.00006a1d@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=brgl@bgdev.pl \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=cosmin.tanislav@analog.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --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).