linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Belisko Marek <marek.belisko@gmail.com>,
	"Dr. H. Nikolaus Schaller" <hns@goldelico.com>,
	Linux PM mailing list <linux-pm@vger.kernel.org>
Subject: Re: generic-adc-battery volatge-to-percent formula
Date: Sun, 21 Feb 2016 21:06:53 +0100	[thread overview]
Message-ID: <20160221200653.GD15242@earth> (raw)
In-Reply-To: <20160215115304.GA5014@amd>

[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]

Hi,

On Mon, Feb 15, 2016 at 12:53:04PM +0100, Pavel Machek wrote:
> > >> some time ago I did post series which added some conversion table from
> > >> voltage to percent for charging and discharging states [1] in
> > >> twl4030_madc driver. This approach was not accepted and we still want
> > >> to have something like that in kernel. We re-think re-thinking
> > >> original idea and also get reference where Pavel point us to formula
> > >> which could be used for computing voltage-to-percent conversion [2]
> > >>
> > >> What about adding this formula as a default for the
> > >> voltage-to-percent-conversion to the generic-adc-battery
> > >> driver (and converting it to DT)? Would that be a better
> > >> solution than a table driven and twl4030 only driver?
> > >
> > > I'd say battery, yes. And maybe even better would be putting it into
> > > lib/ or seaparet driver, as it does not really depend on IIO? You just
> > > supply voltage, current and internal resistance, and it produces number...
> > >
> > Can we put this small helper to some common power header file
> > which can be then included to driver which can use this formula.
> > I think it's better way then adding it to /lib as it won't be
> > used in whole kernel tree just in power. What do you think?
> > Thanks.
> 
> Sounds good to me.

Sounds fine for me, too.

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-02-21 20:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 20:38 generic-adc-battery volatge-to-percent formula Belisko Marek
2016-02-12  8:51 ` Pavel Machek
2016-02-15  8:52   ` Belisko Marek
2016-02-15 11:53     ` Pavel Machek
2016-02-21 20:06       ` Sebastian Reichel [this message]
2016-02-21 20:36         ` H. Nikolaus Schaller
2016-02-21 21:12           ` Pavel Machek
2016-02-22  5:58             ` H. Nikolaus Schaller
2016-02-22 17:20               ` Sebastian Reichel
2016-10-24 12:34                 ` Pavel Machek
2016-10-24 13:09                   ` H. Nikolaus Schaller
2017-04-11 17:31                     ` Pavel Machek

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=20160221200653.GD15242@earth \
    --to=sre@kernel.org \
    --cc=hns@goldelico.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=marek.belisko@gmail.com \
    --cc=pavel@ucw.cz \
    /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).