All of lore.kernel.org
 help / color / mirror / Atom feed
From: Slawomir Stepien <sst@poczta.fm>
To: Guenter Roeck <linux@roeck-us.net>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	jdelvare@suse.com, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, przemyslaw.cencner@nokia.com,
	krzysztof.adamski@nokia.com, alexander.sverdlin@nokia.com,
	Slawomir Stepien <slawomir.stepien@nokia.com>
Subject: Re: [PATCH 3/8] dt-bindings: hwmon: Allow specifying channels for lm90
Date: Tue, 24 May 2022 19:27:25 +0200	[thread overview]
Message-ID: <Yo0VfVthNdtjIWF+@t480s.localdomain> (raw)
In-Reply-To: <YozM0L5uftHOgkjL@t480s.localdomain>

On maj 24, 2022 14:17, Slawomir Stepien wrote:
> On maj 24, 2022 13:53, Slawomir Stepien wrote:
> > On maj 20, 2022 07:22, Guenter Roeck wrote:
> > > On 5/20/22 07:09, Krzysztof Kozlowski wrote:
> > > > On 20/05/2022 15:42, Guenter Roeck wrote:
> > > > > > 
> > > > > > > +          A descriptive name for this channel, like "ambient" or "psu".
> > > > > > > +
> > > > > > > +      offset:
> > > > > > > +        description: |
> > > > > > 
> > > > > > This does not look like standard property, so you need vendor and unit
> > > > > > suffix.
> > > > > > 
> > > > > 
> > > > > Temperature offset is a standard property for temperature sensor
> > > > 
> > > > The original description was strictly connected to registers, so that
> > > > one as not a standard. It seems it was just a wording...
> > > > 
> > > > > chips with external channels, implemented by a diode or transistor.
> > > > > Making it non-standard will mean that we'll have lots of
> > > > > "vendor,offset" properties, one each for each vendor selling
> > > > > temperature sensor chips with external channels. This gets
> > > > > more complicated here because the lm90 driver does support chips
> > > > > from several different vendors. Almost all of them support
> > > > > this functionality. Which vendor do you select in this case ?
> > > > > 
> > > > > I would suggest to use temperature-offset-milliseconds, though.
> > > > 
> > > > Yes, this sounds good. Just not seconds but millicelsius, I guess?
> > > > 
> > > 
> > > Uuh, yes. Sorry, must be too early in the morning here.
> > 
> > Hello
> > 
> > I see that: *-millicelsius is defined as uint32-array:
> >   "-millicelsius$":
> >     $ref: "types.yaml#/definitions/uint32-array"
> >     description: Degreee milli-Celsius
> > 
> > But it would be nice to have negative values as the prop value, for example <(-1000)>.
> > 
> > How should I approach that? Is change to this definition possible? If yes, how should it be
> > conducted? On github or via device-tree mailing list?
> > 
> > Or maybe there is a way to overwrite this (using $defs?) for this particular binding? I haven't
> > found any solution that will pass dt_binding_check.
> 
> Well ok, looks like this:
> 
>       temperature-offset-millicelsius:
>         description: Temperature offset to be added to or subtracted from remote temperature measurements.
>         items:
>           items:
>             type: integer
>             minimum: -128000
>             maximum: 127000

This isn't working...from what I've read we cannot just simply overwrite existing schemas.

Krzysztof, Guenter what I should do? Is there a way to match with uint32-array schema and with
schema that allows items in array to be below 0 (seems impossible to me)? I've tried a lot of
combinations today without any luck. Any helpful tips? Thanks!

> Will overwrite the definition...most likely just minimum: -128000 in 2nd items will be enough.
> 
> > > > > > > +          The value (millidegree Celsius) to be programmed in the channel specific offset register
> > > > > > > +          (if supported by device).
> > > > > > 
> > > > > > You described programming model which should not be put in the bindings.
> > > > > > Please describe the hardware.
> > > > > > 
> > > > > 
> > > > > It is a configuration value, which is hardware dependent because
> > > > > it depends on the temperature diode or transistor connected to the chip.
> > > > 
> > > > Sure, so this could be reworded "Offset against some base value for each
> > > > channel temperature", or something similar (you know better than me).
> > > > Referring to registers and where exactly this should be programmed in
> > > > the device is related to device programming model, not to bindings.
> > > > 
> > > 
> > > Maybe something like "Temperature offset to be added to or
> > > subtracted from remote temperature measurements".

-- 
Slawomir Stepien

  reply	other threads:[~2022-05-24 17:27 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20  9:32 [PATCH 0/8] Add support for ADT7481 in lm90 Slawomir Stepien
2022-05-20  9:32 ` [PATCH 1/8] dt-bindings: hwmon: " Slawomir Stepien
2022-05-20 10:08   ` Krzysztof Kozlowski
2022-05-20  9:32 ` [PATCH 2/8] dt-bindings: hwmon: Add 'extended-range-enable' property support " Slawomir Stepien
2022-05-20 10:09   ` Krzysztof Kozlowski
2022-05-20 10:57     ` Slawomir Stepien
2022-05-20  9:32 ` [PATCH 3/8] dt-bindings: hwmon: Allow specifying channels for lm90 Slawomir Stepien
2022-05-20 10:13   ` Krzysztof Kozlowski
2022-05-20 12:38     ` Slawomir Stepien
2022-05-20 12:47       ` Krzysztof Kozlowski
2022-05-20 13:23         ` Slawomir Stepien
2022-05-20 13:34           ` Krzysztof Kozlowski
2022-05-20 14:02       ` Guenter Roeck
2022-05-20 13:42     ` Guenter Roeck
2022-05-20 14:09       ` Krzysztof Kozlowski
2022-05-20 14:22         ` Guenter Roeck
2022-05-24 11:53           ` Slawomir Stepien
2022-05-24 12:17             ` Slawomir Stepien
2022-05-24 17:27               ` Slawomir Stepien [this message]
2022-05-24 17:59                 ` Krzysztof Kozlowski
2022-05-25  7:07                   ` Slawomir Stepien
2022-05-20  9:32 ` [PATCH 4/8] hwmon: (lm90) add support for ADT7481 Slawomir Stepien
2022-05-20  9:32 ` [PATCH 5/8] hwmon: (lm90) define maximum number of channels that are supported Slawomir Stepien
2022-05-21  2:36   ` Guenter Roeck
2022-05-22 14:59     ` Slawomir Stepien
2022-05-20  9:32 ` [PATCH 6/8] hwmon: (lm90) enable the extended temperature range Slawomir Stepien
2022-05-20  9:32 ` [PATCH 7/8] hwmon: (lm90) read the channel's label from device-tree Slawomir Stepien
2022-05-20 10:15   ` Krzysztof Kozlowski
2022-05-20 11:01     ` Slawomir Stepien
2022-05-20 11:41       ` Krzysztof Kozlowski
2022-05-20  9:32 ` [PATCH 8/8] hwmon: (lm90) read the channel's offset " Slawomir Stepien
2022-05-20 13:45 ` [PATCH 0/8] Add support for ADT7481 in lm90 Guenter Roeck
2022-05-20 16:01   ` Guenter Roeck
2022-05-22 14:52     ` Slawomir Stepien
2022-05-22 15:00       ` Guenter Roeck

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=Yo0VfVthNdtjIWF+@t480s.localdomain \
    --to=sst@poczta.fm \
    --cc=alexander.sverdlin@nokia.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.adamski@nokia.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=przemyslaw.cencner@nokia.com \
    --cc=robh+dt@kernel.org \
    --cc=slawomir.stepien@nokia.com \
    /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.