All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Jyoti Bhayana <jbhayana@google.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Rob Herring <robh@kernel.org>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
	cristian.marussi@arm.com, sudeep.holla@arm.com,
	egranata@google.com, mikhail.golubev@opensynergy.com,
	Igor.Skalkin@opensynergy.com, Peter.hilber@opensynergy.com,
	ankitarora@google.com
Subject: Re: Reply to [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors
Date: Sat, 9 Jan 2021 19:01:33 +0000	[thread overview]
Message-ID: <20210109190133.61051fab@archlinux> (raw)
In-Reply-To: <20210106212353.951807-1-jbhayana@google.com>

On Wed,  6 Jan 2021 21:23:53 +0000
Jyoti Bhayana <jbhayana@google.com> wrote:

> Hi Jonathan,
> 
> Instead of adding IIO_VAL_INT_H32_L32, I am thinking of adding IIO_VAL_FRACTIONAL_LONG
> or IIO_VAL_FRACTIONAL_64 as the scale/exponent used for min/max range can be different
> than the one used in resolution according to specification. 

That's somewhat 'odd'.  Given min/max are inherently values the sensor is supposed to
be able to return why give them different resolutions?  Can you point me at a specific
section of the spec?  The axis_min_range_low etc fields don't seem to have units specified
but I assumed they were in sensor units and so same scale factors?

> 
> I am planning to use read_avail for IIO_CHAN_INFO_PROCESSED using IIO_AVAIL_RANGE 
> and this new IIO_VAL_FRACTIONAL_64 for min range,max range and resolution.
> Instead of two values used in IIO_VAL_FRACTIONAL, IIO_VAL_FRACTIONAL_64 will use 4 values
> val_high,val_low,and val2_high and val2_low.

I'm not keen on the changing that internal kernel interface unless we absolutely
have to.  read_avail() is called from consumer drivers and they won't know anything
about this new variant.

> 
> Let me know if that is an acceptable solution.

Hmm. It isn't a standard use of the ABI given the value in the buffer is (I assume)
raw (needs scale applied).  However, it isn't excluded by the ABI docs.  Whether
a standard userspace is going to expect it is not clear to me.

I don't want to end up in a position where we end up with available being generally
added for processed when what most people care about is what the value range they
might get from a polled read is (rather than via a buffer).

So I'm not that keen on this solution but if we can find a way to avoid it.

Jonathan


> 
> 
> Thanks,
> Jyoti
> 


  reply	other threads:[~2021-01-09 19:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-24  3:19 [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors Jyoti Bhayana
2020-12-24  3:19 ` [RFC PATCH v2 1/1] iio/scmi: Adding support for IIO SCMI Based Sensors Jyoti Bhayana
2020-12-30 13:41   ` Jonathan Cameron
2020-12-30 16:09     ` Lars-Peter Clausen
2020-12-30 12:37 ` [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors Jonathan Cameron
2021-01-05 23:09   ` Reply to " Jyoti Bhayana
2021-01-06 10:29     ` Jonathan Cameron
2021-01-06 11:26       ` Cristian Marussi
2021-01-06 14:36         ` Jonathan Cameron
2021-01-06 16:12           ` Cristian Marussi
2021-01-06 21:23             ` Jyoti Bhayana
2021-01-09 19:01               ` Jonathan Cameron [this message]
2021-01-11  6:44                 ` Jyoti Bhayana
2021-01-11 12:33                   ` Jonathan Cameron
2021-01-11 21:17                     ` Jyoti Bhayana
2021-01-16 19:33                       ` Jonathan Cameron
2021-01-17  7:15                         ` Jyoti Bhayana
2021-01-17 11:56                           ` Jonathan Cameron
2021-01-17 21:02                             ` Jyoti Bhayana
2021-01-18 13:42                               ` 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=20210109190133.61051fab@archlinux \
    --to=jic23@kernel.org \
    --cc=Igor.Skalkin@opensynergy.com \
    --cc=Peter.hilber@opensynergy.com \
    --cc=ankitarora@google.com \
    --cc=cristian.marussi@arm.com \
    --cc=davem@davemloft.net \
    --cc=egranata@google.com \
    --cc=jbhayana@google.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=mikhail.golubev@opensynergy.com \
    --cc=pmeerw@pmeerw.net \
    --cc=robh@kernel.org \
    --cc=sudeep.holla@arm.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.