Message ID | cover.1623532208.git.sander@svanheule.net |
---|---|
Headers | show |
Series | RTL8231 GPIO expander support | expand |
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.