lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200211190614.GP4543@sirena.org.uk>
Date:   Tue, 11 Feb 2020 19:06:14 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Cc:     mazziesaccount@...il.com, mikko.mutanen@...rohmeurope.com,
        markus.laine@...rohmeurope.com,
        Linus Walleij <linus.walleij@...aro.org>,
        Sebastian Reichel <sre@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 2/3] power: (regmap:) Add linear_range helper

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.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ