[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAN8YU5NO5mcrPa5ZCB3XnAb=3N3cyXZUT=gH5G+EbnM-En0a3Q@mail.gmail.com>
Date: Tue, 4 Jan 2022 12:42:40 +0100
From: Andrea Merello <andrea.merello@...il.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
linux-iio <linux-iio@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Rob Herring <robh+dt@...nel.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Matt Ranostay <matt.ranostay@...sulko.com>,
Alexandru Ardelean <ardeleanalex@...il.com>,
Jacopo Mondi <jacopo@...ndi.org>,
Andrea Merello <andrea.merello@....it>
Subject: Re: [v2 06/10] iio: document bno055 private sysfs attributes
Sorry for the huge delay...
> There is still a units question though. Should we express the ranges
> in _processed or _raw units? Or do we make it explicit and call it
> rangeprocessed for example? For some devices the range will naturally
> be expressed as the range of ADC raw values, so there is definite room
> for confusion if we don't make it clear in the name.
>
> I'm open to other suggestions of how we name this to avoid falling into
> any heffalump traps.
You are right: this might lead to confusion.. Making it explicit in
the name seems a good idea.
I've looked at other iio sysfs attributes in the DOC. It seems that
"thesh" and "roc" attributes allows for both preprocessed and raw
data: I found e.g. "<type>[Y][_name]_<raw|input>_thresh_value", but
the related "what" entries written above all seem to omit both "_raw"
and "_input"; I don't understand why.
In any case, maybe we can stick to that already-existent naming schema?
Assuming the pattern is correct, then wouldn't it be
"in_accel_raw_range" (or "in_accel_x_raw_range", in case it could
have different values for each axis) or "in_accel_input_range" in case
range applies to preprocessed vals, etc ?
Andrea
Powered by blists - more mailing lists