linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: jdelvare@suse.com, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org, corbet@lwn.net,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH] hwmon (ina3221) Add single-shot mode support
Date: Mon, 12 Nov 2018 20:58:24 -0800	[thread overview]
Message-ID: <20181113045823.GB26327@Asurada-Nvidia.nvidia.com> (raw)
In-Reply-To: <20181113043248.GB11205@roeck-us.net>

Hi Guenter,

On Mon, Nov 12, 2018 at 08:32:48PM -0800, Guenter Roeck wrote:
> On Mon, Nov 12, 2018 at 08:23:53PM -0800, Nicolin Chen wrote:
> > INA3221 supports both continuous and single-shot modes. When
> > running in the continuous mode, it keeps measuring the inputs
> > and converting them to the data register even if there are no
> > users reading the data out. In this use case, this could be a
> > power waste.
> > 
> > So this patch adds a single-shot mode support so that ina3221
> > could do measurement and conversion only if users trigger it,
> > depending on the use case where it only needs to poll data in
> > a lower frequency.
> > 
> > The change also exposes "mode" and "available_modes" nodes to
> > allow users to switch between two operating modes.
> > 
> Lots and lots of complexity for little gain. Sorry, I don't see
> the point of this change.

The chip is causing considerable power waste on battery-powered
devices so we typically use it running in the single-shot mode.

Although the chip now can be powered down, but we still need to
occasionally poll it for power measurement and critical alerts,
so single-shot mode is the best choice for us, considering that
the power-down-and-up routine would be way heavier.

I could understand that you don't really like it, but it's some
feature that we truly need. Do you have any suggestion to write
the code that can make it more convincing to you?

Thanks
Nicolin

  reply	other threads:[~2018-11-13 14:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13  4:23 [PATCH] hwmon (ina3221) Add single-shot mode support Nicolin Chen
2018-11-13  4:32 ` Guenter Roeck
2018-11-13  4:58   ` Nicolin Chen [this message]
2018-11-13 17:21     ` Guenter Roeck
2018-11-14  0:11       ` Nicolin Chen
2018-11-14 17:23         ` Guenter Roeck
2018-11-17  1:51           ` Nicolin Chen
2018-11-19 17:45             ` Guenter Roeck
2018-11-19 22:18               ` Nicolin Chen
2018-11-23 16:38                 ` Guenter Roeck

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=20181113045823.GB26327@Asurada-Nvidia.nvidia.com \
    --to=nicoleotsuka@gmail.com \
    --cc=corbet@lwn.net \
    --cc=jdelvare@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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 NNTP newsgroup(s).