From: Linus Walleij <linus.walleij@linaro.org>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Matti Vaittinen <mazziesaccount@gmail.com>,
mikko.mutanen@fi.rohmeurope.com, markus.laine@fi.rohmeurope.com,
Mark Brown <broonie@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Linux PM list <linux-pm@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v2 3/5] power: Add linear_range helper
Date: Fri, 21 Feb 2020 14:49:21 +0100 [thread overview]
Message-ID: <CACRpkdY1oa859bkVrgwA4iai7982GL_EMxns5+wAhQr+ggf9Kw@mail.gmail.com> (raw)
In-Reply-To: <1d333e88974571322c14cf3e881b9a854e94bd9d.1581597365.git.matti.vaittinen@fi.rohmeurope.com>
On Fri, Feb 14, 2020 at 8:37 AM Matti Vaittinen
<matti.vaittinen@fi.rohmeurope.com> wrote:
> Many devices have control registers which control some measurable
> property. Often a register contains control field so that change in
> this field causes linear change in the controlled property. It is not
> a rare case that user wants to give 'meaningfull' control values and
> driver needs to convert them to register field values. Even more
> often user wants to 'see' the currently set value - again in
> meaningfull units - and driver needs to convert the values it reads
> from register to these meaningfull units.
Rename meaningfull -> meaningful
> This ideas is stol... borrowed from regulator framework's
> regulator_linear_ranges handling.
Hehe maybe one day we can move the whole thing to lib/
but let's take one step at a time.
> Provide a linear_range helper which can do conversion from user value
> to register value 'selector'.
>
> Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> ---
>
> Where should we put these?
This works.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
next prev parent reply other threads:[~2020-02-21 13:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-14 7:29 [RFC PATCH v2 0/5] Support ROHM BD99954 charger IC Matti Vaittinen
2020-02-14 7:30 ` [RFC PATCH v2 1/5] dt-bindings: battry: add new battery parameters Matti Vaittinen
2020-02-19 19:57 ` Rob Herring
2020-02-20 6:39 ` Vaittinen, Matti
2020-02-14 7:36 ` [RFC PATCH v2 2/5] dt_bindings: ROHM BD99954 Charger Matti Vaittinen
2020-02-18 20:21 ` Rob Herring
2020-02-19 8:05 ` Vaittinen, Matti
2020-02-20 20:18 ` Rob Herring
2020-02-21 8:52 ` Vaittinen, Matti
2020-02-14 7:37 ` [RFC PATCH v2 3/5] power: Add linear_range helper Matti Vaittinen
2020-02-21 13:49 ` Linus Walleij [this message]
2020-02-22 8:33 ` Vaittinen, Matti
2020-02-14 7:38 ` [RFC PATCH v2 4/5] power: supply: add battery parameters Matti Vaittinen
2020-02-21 13:50 ` Linus Walleij
2020-02-14 7:39 ` [RFC PATCH v2 5/5] power: supply: Support ROHM bd99954 charger Matti Vaittinen
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=CACRpkdY1oa859bkVrgwA4iai7982GL_EMxns5+wAhQr+ggf9Kw@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=markus.laine@fi.rohmeurope.com \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mazziesaccount@gmail.com \
--cc=mikko.mutanen@fi.rohmeurope.com \
--cc=robh+dt@kernel.org \
--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 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).