devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>,
	Cosmin Tanislav <demonsingur@gmail.com>
Cc: "Nuno Sá" <nuno.sa@analog.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Cosmin Tanislav" <cosmin.tanislav@analog.com>
Subject: Re: [PATCH v2 3/5] dt-bindings: iio: temperature: ltc2983: refine
Date: Sun, 23 Oct 2022 15:46:13 +0200	[thread overview]
Message-ID: <5cfc6dbb2a324746ece4f6cc0e633ccedfce2c54.camel@gmail.com> (raw)
In-Reply-To: <20221023135124.1fdeab5e@jic23-huawei>

On Sun, 2022-10-23 at 13:51 +0100, Jonathan Cameron wrote:
> On Thu, 20 Oct 2022 12:02:55 +0300
> Cosmin Tanislav <demonsingur@gmail.com> wrote:
> 
> > From: Cosmin Tanislav <cosmin.tanislav@analog.com>
> > 
> >  * make sure addresses are represented as hex
> >  * add note about wrong unit value for adi,mux-delay-config-us
> >  * simplify descriptions
> >  * add descriptions for the items of custom sensor tables
> >  * add default property values where applicable
> >  * use conditionals to extend minimum reg value
> >    for single ended sensors
> >  * remove " around phandle schema $ref
> >  * remove label from example and use generic temperature
> >    sensor name
> > 
> > Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
> 
> Hi Cosmin,
> 
> Just one question inline from me (other than the build bot report
> that I'll
> assume you'll fix for v3).
> 
> Otherwise looks like a nice cleanup to me.
> 
> I wonder a bit on whether it is worth splitting up, but that would be
> rather messy to actually do so will leave that to the dt experts to
> comment
> on.
> 
> Jonathan
> 
> 
> > ---
> >  .../bindings/iio/temperature/adi,ltc2983.yaml | 309 +++++++++++---
> > ----
> >  1 file changed, 182 insertions(+), 127 deletions(-)
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yam
> > l
> > b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yam
> > l
> > index 722781aa4697..3e97ec841fd6 100644
> > ---
> > a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yam
> > l
> > +++
> > b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yam
> > l
> > @@ -26,25 +26,25 @@ properties:
> >  
> >    adi,mux-delay-config-us:
> >      description:
> > -      The LTC2983 performs 2 or 3 internal conversion cycles per
> > temperature
> > -      result. Each conversion cycle is performed with different
> > excitation and
> > -      input multiplexer configurations. Prior to each conversion,
> > these
> > -      excitation circuits and input switch configurations are
> > changed and an
> > -      internal 1ms delay ensures settling prior to the conversion
> > cycle in most
> > -      cases. An extra delay can be configured using this property.
> > The value is
> > -      rounded to nearest 100us.
> > +      Extra delay prior to each conversion, in addition to the
> > internal 1ms
> > +      delay, for the multiplexer to switch input configurations
> > and
> > +      excitation values.
> > +
> > +      This property is supposed to be in microseconds, but to
> > maintain
> > +      compatibility, this value will be multiplied by 100 before
> > usage.
> 
> This new text has me a little confused.  Previously we talked
> rounding, now it
> is saying the value is multiplied (which would make it definitely not
> in micro
> secs!)..  So are we papering over a driver bug here?
> 
> 

Hi Jonathan,

Let me try to make this one clear as it was my mess...

The multiplication is done internally by the device. I messed up in
this one as this value is clearly not in us but it is the raw value.
So, tecnically, there's nothing wrong in the driver as it just reads
this property and directly writes it. But of course this is misleading
and wrong from the bindings point of view.

That said, me and Cosmin did spoke about just having this property
'deprecated' and add a new one (the driver would need to be changed
accordingly) - no idea also about a new name for it :)

But for this round, Cosmin decided to have this stated on the
description and see what you and dt maintainers had to say about it and
if making it 'deprecated' is the way to go (or something else).

- Nuno Sá


  reply	other threads:[~2022-10-23 13:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20  9:02 [PATCH v2 0/5] Support more parts in LTC2983 Cosmin Tanislav
2022-10-20  9:02 ` [PATCH v2 1/5] iio: temperature: ltc2983: allocate iio channels once Cosmin Tanislav
2022-10-23 12:40   ` Jonathan Cameron
2022-10-20  9:02 ` [PATCH v2 2/5] iio: temperature: ltc2983: make bulk write buffer DMA-safe Cosmin Tanislav
2022-10-23 12:42   ` Jonathan Cameron
2022-10-24  6:35     ` Sa, Nuno
2022-10-20  9:02 ` [PATCH v2 3/5] dt-bindings: iio: temperature: ltc2983: refine Cosmin Tanislav
2022-10-20 12:56   ` Rob Herring
2022-10-23 12:51   ` Jonathan Cameron
2022-10-23 13:46     ` Nuno Sá [this message]
2022-10-24 16:44       ` Jonathan Cameron
2022-10-20  9:02 ` [PATCH v2 4/5] dt-bindings: iio: temperature: ltc2983: support more parts Cosmin Tanislav
2022-10-20  9:02 ` [PATCH v2 5/5] " Cosmin Tanislav
2022-10-23 12:54   ` Jonathan Cameron
2022-10-24  6:37     ` 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=5cfc6dbb2a324746ece4f6cc0e633ccedfce2c54.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=cosmin.tanislav@analog.com \
    --cc=demonsingur@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh+dt@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).