lkml.org 
[lkml]   [2023]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] regmap: force update_bits() to write to HW when reg is volatile
On Fri, Apr 28, 2023 at 12:36:51PM +0000, Vaittinen, Matti wrote:
> On 4/28/23 14:35, Mark Brown wrote:

> > I think you're looking for regmap_write_bits() here.

> Yes. Thanks for pointing this out to me. This is the functionality I
> searched for.

> However, my question really was if the regmap_update_bits() (and
> regmap_set_bits() / regmap_clear_bits()) should automatically work as
> regmap_write_bits() for volatile registers. I'll take your answer as
> "no" - and try to remember just use regmap_write_bits() with volatile
> registers which may require forcing writing the value even when it is
> not changed. Thanks!

Yeah, like you said in your commit there are cases where suppressing the
write is still useful - you might have some bits that are volatile and
some not or you might have something like a pattern where the hardware
can set bits and the host writes 1 to clear. One common thing is to
have read only status bits mixed in with normal read/write bits.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-04-28 15:22    [W:0.030 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site