On Sun, Jun 13, 2021 at 12:13 AM Sander Vanheule [off-list ref] 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.
+int regmap_read_bypassed(struct regmap *map, unsigned int reg, unsigned int *val)
If this is acceptable in general, I will rather name the function like
regmap_nocache_read() to be aligned with the other API naming pattern
(see below).
quoted hunk ↗ jump to hunk
int regmap_raw_write_async(struct regmap *map, unsigned int reg,
const void *val, size_t val_len);
int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
+int regmap_read_bypassed(struct regmap *map, unsigned int reg, unsigned int *val);
int regmap_raw_read(struct regmap *map, unsigned int reg,
void *val, size_t val_len);
int regmap_noinc_read(struct regmap *map, unsigned int reg,
--
With Best Regards,
Andy Shevchenko