Linux IIO development
 help / color / mirror / Atom feed
From: "Mårten Lindahl" <martenli@axis.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@axis.com
Subject: Re: [PATCH 0/2] Introduce new iio resolution standard attribute
Date: Mon, 18 Dec 2023 16:08:00 +0100	[thread overview]
Message-ID: <7b0599b5-15ae-7104-5298-805b6377f39d@axis.com> (raw)
In-Reply-To: <20231217141046.4cf3e34e@jic23-huawei>

On 12/17/23 15:10, Jonathan Cameron wrote:
> On Fri, 15 Dec 2023 13:43:03 +0100
> Mårten Lindahl <marten.lindahl@axis.com> wrote:
>
>> This patch introduces a new IIO standard attribute to set the bit
>> resolution of the data *_raw readings dynamically using sysfs.
>>
>> The VCNL4040/4200 proximity/ambient light sensors support 12-bit
>> (default) and 16-bit ADC resolutions. This can be dynamically changed,
>> so to support this with the standard iio channel configuration a new iio
>> attribute should be added.
>>
>> The VCNL4040 devices will use this for setting proximity high definition
>> (16-bit resolution).
>>
>> Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com>
> Hi Mårten,
>
> What is the use case?  We've had lots of devices capable of doing this
> sort of resolution change, but never yet come up with a reason to do so for
> the sysfs interfaces on the basis the overhead of the sysfs interfaces is
> high enough the best bet is almost always to use the highest available resolution
> and don't worry that the read takes a little longer.
>
> Jonathan

Hi Jonathan!

My use case probably does not differ from others, in that 12 bits does 
not give enough precision. So it's just a dynamic feature that the 
sensor has, but as you suggest to hard code this to the highest works 
fine for me. I just didn't feel confident enough to do that :)

I'll make a single patch for this change instead. Thanks!

Kind regards

Mårten

>
>> ---
>> Mårten Lindahl (2):
>>        iio: core: Introduce resolution standard attribute
>>        iio: light: vcnl4000: Add ps high definition for vcnl4040
>>
>>   drivers/iio/industrialio-core.c |  1 +
>>   drivers/iio/light/vcnl4000.c    | 87 ++++++++++++++++++++++++++++++++++++++++-
>>   include/linux/iio/types.h       |  1 +
>>   3 files changed, 87 insertions(+), 2 deletions(-)
>> ---
>> base-commit: a39b6ac3781d46ba18193c9dbb2110f31e9bffe9
>> change-id: 20231212-vcnl4000-ps-hd-38d42abf9095
>>
>> Best regards,

      reply	other threads:[~2023-12-18 15:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 12:43 [PATCH 0/2] Introduce new iio resolution standard attribute Mårten Lindahl
2023-12-15 12:43 ` [PATCH 1/2] iio: core: Introduce " Mårten Lindahl
2023-12-15 12:43 ` [PATCH 2/2] iio: light: vcnl4000: Add ps high definition for vcnl4040 Mårten Lindahl
2023-12-17 14:15   ` Jonathan Cameron
2023-12-18 15:19     ` Mårten Lindahl
2023-12-18 16:00       ` Mårten Lindahl
2023-12-18 18:14         ` Jonathan Cameron
2023-12-17 14:10 ` [PATCH 0/2] Introduce new iio resolution standard attribute Jonathan Cameron
2023-12-18 15:08   ` Mårten Lindahl [this message]

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=7b0599b5-15ae-7104-5298-805b6377f39d@axis.com \
    --to=martenli@axis.com \
    --cc=jic23@kernel.org \
    --cc=kernel@axis.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.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