public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: gyeyoung <gye976@gmail.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	lars@metafoo.de, gustavograzs@gmail.com,
	javier.carrasco.cruz@gmail.com, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v1 3/5] ABI: iio: add new ABI doc for mhz19b
Date: Sun, 6 Apr 2025 16:33:38 +0100	[thread overview]
Message-ID: <20250406163338.7457f940@jic23-huawei> (raw)
In-Reply-To: <CAKbEzntnZ+SJ07An+tD3ByrxqOR0FrJ09bymoUZODM0XXjYFQQ@mail.gmail.com>

On Sun, 6 Apr 2025 22:31:43 +0900
gyeyoung <gye976@gmail.com> wrote:

> Hello Jonathan,
> 
> On Sun, Apr 6, 2025 at 8:26 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > On Sun, 6 Apr 2025 12:20:48 +0100
> > Jonathan Cameron <jic23@kernel.org> wrote:
> >  
> > > On Sat, 5 Apr 2025 22:47:45 +0900
> > > gyeyoung <gye976@gmail.com> wrote:
> > >  
> > > > Hello Jonathan, thank you for the review.
> > > >  
> > > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio-chemical-mhz19b b/Documentation/ABI/testing/sysfs-bus-iio-chemical-mhz19b
> > > > > > new file mode 100644
> > > > > > index 000000000000..6cdfd34be016
> > > > > > --- /dev/null
> > > > > > +++ b/Documentation/ABI/testing/sysfs-bus-iio-chemical-mhz19b
> > > > > > @@ -0,0 +1,7 @@
> > > > > > +What:                /sys/bus/iio/devices/co2_range
> > > > > > +Date:                April 2025
> > > > > > +KernelVersion:       6.14
> > > > > > +Contact:     Gyeyoung Baek <gye976@gmail.com>
> > > > > > +Description:
> > > > > > +             Writing a value adjust maximum measurable PPM.
> > > > > > +             should be 2000 or 5000.  
> > > > >
> > > > > I haven't checked but assume this also results in a scaling of the
> > > > > measure _raw values?  If so the control should be via the standard
> > > > > ABI scale.  If you need to be able to establish the range, provide
> > > > > the _available for the _raw via the read_avail() callback and setting
> > > > > appropriate bit in info_mask_separate_available
> > > > >  
> > > >
> > > > In this device, changing the measurement range does not affect the
> > > > unit or scaling.
> > > > As far as I know, increasing the range just leads to a decrease in accuracy.  
> > >
> > > That's unusual but fair enough.  hardwaregain is perhaps appropriate
> > > as this doesn't really map to calibscale which is the other thing close
> > > to this.
> > >  
> > Actually - any idea what the gain is doing?  Is it adjusting a analog
> > amplfier, or messing with the integration time (I have little idea
> > how these sensors work!)
> >  
> sorry, I'm not affiliated with the vendor,
> so I do not have any information other than the datasheet.
> And the datasheet doesn't specify any trade-offs related to adjusting the range.
> (only "± (50ppm+3% reading value)" is here)
> 
> I think this range setting would be better implemented in
> some other way (like module parameter) rather than IIO subsystem.

I'm not in general keen on module parameters effecting policy (and noise
vs range is definitely a policy thing) so I think we would want to figure out
a suitable sysfs ABI.

> For now I'll just drop this range setting code..
Makes sense  - can revisit when needed.
> 
> Regards,
> Gyeyoung


  reply	other threads:[~2025-04-06 15:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03  5:32 [PATCH v1 0/5] add support for winsen MHZ19B CO2 sensor Gyeyoung Baek
2025-04-03  5:32 ` [PATCH v1 1/5] dt-bindings: add winsen to the vendor prefixes Gyeyoung Baek
2025-04-03  7:48   ` Krzysztof Kozlowski
2025-04-03 12:45     ` gyeyoung
2025-04-03  5:32 ` [PATCH v1 2/5] dt-bindings: add device tree support for winsen MHZ19B CO2 sensor Gyeyoung Baek
2025-04-03  7:48   ` Krzysztof Kozlowski
2025-04-03  5:32 ` [PATCH v1 3/5] ABI: iio: add new ABI doc for mhz19b Gyeyoung Baek
2025-04-03  7:51   ` Krzysztof Kozlowski
2025-04-03 14:09     ` gyeyoung
2025-04-04 11:33   ` Jonathan Cameron
2025-04-05 13:47     ` gyeyoung
2025-04-06 11:20       ` Jonathan Cameron
2025-04-06 11:26         ` Jonathan Cameron
2025-04-06 13:31           ` gyeyoung
2025-04-06 15:33             ` Jonathan Cameron [this message]
2025-04-07  2:10               ` gyeyoung
2025-04-07 18:52                 ` Jonathan Cameron
2025-04-03  5:32 ` [PATCH v1 4/5] iio: chemical: add support for winsen MHZ19B CO2 sensor Gyeyoung Baek
2025-04-03  7:56   ` Krzysztof Kozlowski
2025-04-03 14:04     ` gyeyoung
2025-04-04 11:51   ` Jonathan Cameron
2025-04-05 14:45     ` gyeyoung
2025-04-06 11:21       ` Jonathan Cameron
2025-04-03  5:32 ` [PATCH v1 5/5] MAINTAINERS: Add WINSEN MHZ19B Gyeyoung Baek

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=20250406163338.7457f940@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gustavograzs@gmail.com \
    --cc=gye976@gmail.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --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