Re: [PATCH v5 1/8] regmap: Support atomic forced uncached reads

From
Mark Brown <broonie@kernel.org>
Date
2021-06-14 10:43:49
Also in
linux-gpio, linux-leds, lkml
Reply to
Sander Vanheule, 2021-06-12
On Sat, Jun 12, 2021 at 11:12:31PM +0200, Sander Vanheule wrote:
When a user wants to read a single uncached register, cache bypassing
can be enabled. However, this is not atomic unless an external lock is
used for the regmap. When using regcache_cache_bypass, the original
bypass state also cannot be restored.
Add support to atomically read a single uncached value, bypassing any
regmap cache.
The expectation here is that if there is a need to do this for some
reason the user can arrange to do this for itself - if something is
happening that makes a normally non-volatile register volatile then 
it probably needs higher level coordination.  What's the use case?
+int regmap_read_bypassed(struct regmap *map, unsigned int reg, unsigned int *val)
Bypassed what?  I think Andy's naming suggestion was much better.

Please also keep to 80 columns if you can, I know the requirements got
relaxed a bit but no need to do it excessively.

Attachments

Thread (14 messages) 14 messages, 3 authors, last reply 2021-07-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help