From: Pavel Machek <pavel@ucw.cz>
To: Belisko Marek <marek.belisko@gmail.com>
Cc: Sebastian Reichel <sre@kernel.org>,
"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: Mon, 15 Feb 2016 12:53:04 +0100 [thread overview]
Message-ID: <20160215115304.GA5014@amd> (raw)
In-Reply-To: <CAAfyv34=C5NSTuqR9Pf4MT2Z42XvT_1Gw+kyjZZh12zC2cBoFA@mail.gmail.com>
Hi!
>
> On Fri, Feb 12, 2016 at 9:51 AM, Pavel Machek <pavel@ucw.cz> wrote:
> > Hi!
> >>
> >> 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.
Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2016-02-15 11:53 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 [this message]
2016-02-21 20:06 ` Sebastian Reichel
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=20160215115304.GA5014@amd \
--to=pavel@ucw.cz \
--cc=hns@goldelico.com \
--cc=linux-pm@vger.kernel.org \
--cc=marek.belisko@gmail.com \
--cc=sre@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 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.