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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YtBgEreCVZyD0kwb@sirena.org.uk>
Date:   Thu, 14 Jul 2022 19:27:30 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Question: regmap_field_write() - why using update?

On Thu, Jul 14, 2022 at 05:15:34PM +0200, Krzysztof Kozlowski wrote:
> On 14/07/2022 17:13, Krzysztof Kozlowski wrote:

> > Indeed, I forgot about bits in a field... So it has to be like this or I
> > need to use regmap_write(). I find the regmap field API very useful for
> > devices with different register layouts, but the actual "fields" part is
> > not really needed in my case.

> ... and few registers (like "clear" registers) actually do not allow to
> read.

The write only registers are a good point - we could handle them through
special casing, that'd avoid any overhead from reading or issues if a
physical read happens to return something unfortunate for some reason.
Now I think about it there's also the fun case of registers which don't
have symmetric read and write, though at some point regmap_field does
stop being useful and those might well be pushing it.

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