Linux-IIO Archive mirror
 help / color / mirror / Atom feed
From: Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com>
To: Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
	INV Git Commit <INV.git-commit@tdk.com>
Cc: "jic23@kernel.org" <jic23@kernel.org>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] iio: imu: inv_icm42600: add support of accel low-power mode
Date: Mon, 13 May 2024 09:18:34 +0000	[thread overview]
Message-ID: <FR3P281MB175734C16B7C8F430874A866CEE22@FR3P281MB1757.DEUP281.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20240509141326.00000684@Huawei.com>

Hello Jonathan,

sorry for the patch malformation, I will send a V2 fixed.

Our chips have usually 2 working modes called "low-noise" and "low-power".

"Low-noise" is the standard mode where the chip (ADC/MEMS) runs continuously with high precision oscillator. Measures are the best with the less jitter (low noise), you can use the highest possible frequencies (> 500Hz), but power consumption is high, and you cannot use the lowest frequencies (< 12.5Hz).

"Low-power" is duty cycling the chip, turning ADC and MEMS on only when measuring and then turns it off. Power consumption is then much lower (low power), you can use the lowest frequencies (< 12.5Hz), but measures have more jitter, and you cannot use the highest frequencies.

Depending on the use case, you may prefer to have the "low-noise" mode with better measures and high frequencies, or the "low-power" mode with less power consumption and low frequencies. The main point is the frequencies availability depending on the power mode.

We could have the driver switching automatically from low-noise to low-power to support all possible frequencies, but we need to arbitrary choose the mode for the common frequencies, and the configured hardware bias in bias registers are not the same depending on the power mode. We prefer handling all this from userspace, switching the mode when needed depending on the use case and dealing with the 2 sets of hardware bias depending on the modes.

I hope I am clear enough with my description.

Thanks,
JB



________________________________________
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
Sent: Thursday, May 9, 2024 15:13
To: INV Git Commit <INV.git-commit@tdk.com>
Cc: jic23@kernel.org <jic23@kernel.org>; lars@metafoo.de <lars@metafoo.de>; linux-iio@vger.kernel.org <linux-iio@vger.kernel.org>; Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com>
Subject: Re: [PATCH] iio: imu: inv_icm42600: add support of accel low-power mode
 
This Message Is From an External Sender
This message came from outside your organization.
 
On Tue,  7 May 2024 10:30:56 +0000
inv.git-commit@tdk.com wrote:

> From: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
> 
> Add channel attributes "power_mode" and "power_mode_available" for
> setting accel power mode (low-noise or low-power).
> 
> Differents ODRs and filter are possible depending on the power mode.
> Thus make ODRs and filter dynamic and check values when applying.
Hi Jean-Baptiste

No Sign-off?

We have never provided this sort of control because it's near
impossible for user space to know what to do with it.

Various attempts happened in the past to provide enough info
to userspace, but didn't succeed because what low power means
is incredibly chip dependent.  As a general rule everyone wants
low power, but at 0 perf cost :)

What are the results of low power mode? Normally it maps as
something we can enable when some other set of states is set or
automatically control based on how often the device is being accessed etc.

For example, what do we loose by choosing this mode for everything
below 200Hz?

I see there is some reference to 'low noise' - what does that actually
mean for this device? Is it oversampling or running lower resolution on
the ADCs?  If so those are the things to look at as ways to control
this.  Choose lowest power to meet a given set of requirements.

Jonathan

  reply	other threads:[~2024-05-13 10:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07 10:30 [PATCH] iio: imu: inv_icm42600: add support of accel low-power mode inv.git-commit
2024-05-09 13:13 ` Jonathan Cameron
2024-05-13  9:18   ` Jean-Baptiste Maneyrol [this message]
2024-05-19 11:52     ` Jonathan Cameron
2024-05-22 15:35       ` Jean-Baptiste Maneyrol

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=FR3P281MB175734C16B7C8F430874A866CEE22@FR3P281MB1757.DEUP281.PROD.OUTLOOK.COM \
    --to=jean-baptiste.maneyrol@tdk.com \
    --cc=INV.git-commit@tdk.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).