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

- From: Mark Brown \<broonie@kernel.org\>
- Date: 2021-06-14 10:43:49 
- List: linux-devicetree
- Page: https://ratatoskr.run/linux-devicetree/2021/06/1412861
- Thread: https://ratatoskr.run/linux-leds/2021/06/1412200/t.md

```text
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

- [signature.asc](https://ratatoskr.run/linux-devicetree/2021/06/1412861/attachment/0) (application/pgp-signature, 488 bytes)
