devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: mazziesaccount@gmail.com, mikko.mutanen@fi.rohmeurope.com,
	markus.laine@fi.rohmeurope.com,
	Linus Walleij <linus.walleij@linaro.org>,
	Sebastian Reichel <sre@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/3] power: (regmap:) Add linear_range helper
Date: Tue, 11 Feb 2020 19:06:14 +0000	[thread overview]
Message-ID: <20200211190614.GP4543@sirena.org.uk> (raw)
In-Reply-To: <20b107ac6e40206b82d014a145abe0569d7a6f81.1581327762.git.matti.vaittinen@fi.rohmeurope.com>

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

On Mon, Feb 10, 2020 at 02:13:13PM +0200, Matti Vaittinen wrote:

> Provide a linear_range helper which can do conversion from user value
> to register value 'selector'.

> Mark, this is loosely bound to register handling... Do you think
> the regmap could host these helpers?

There's no real tie to regmap here, something like this could quite
happily be used by memory mapped devices where regmap has limited uses
and would be a lot to pull in.  A separate library would probably make
more sense.  Not sure how many users there would be outside of power
related stuff, I don't recall seeing the pattern elsewhere.

Note also that we already have quite extensive helpers for this sort of
stuff in the regulator API which I sense may have been involved in this
implementation and to an extent in ALSA which takes a different approach
with TLVs since it baked selectors directly into the ABI.

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

  reply	other threads:[~2020-02-11 19:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 12:11 [RFC PATCH 0/3] Support ROHM BD99954 charger IC Matti Vaittinen
2020-02-10 12:11 ` [RFC PATCH 1/3] dt_bindings: ROHM BD99954 Charger Matti Vaittinen
2020-02-10 13:00   ` Vaittinen, Matti
2020-02-10 12:13 ` [RFC PATCH 2/3] power: (regmap:) Add linear_range helper Matti Vaittinen
2020-02-11 19:06   ` Mark Brown [this message]
2020-02-12  6:56     ` Vaittinen, Matti
2020-02-14 11:47       ` Mark Brown
2020-02-14 12:32         ` Vaittinen, Matti
2020-02-18  7:23           ` Vaittinen, Matti
2020-02-18 13:49             ` Mark Brown
2020-02-19  8:14               ` Vaittinen, Matti
2020-02-10 12:13 ` [RFC PATCH 3/3] 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=20200211190614.GP4543@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.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).