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

From
Andy Shevchenko <hidden>
Date
2021-06-12 21:24:22
Also in
linux-devicetree, linux-leds, lkml
Reply to
Sander Vanheule, 2021-06-12
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
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