projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca747be
)
regcache: Introduce the index parsing API by stride order
author
Xiubo Li
<lixiubo@cmss.chinamobile.com>
Mon, 4 Jan 2016 10:00:34 +0000
(18:00 +0800)
committer
Mark Brown
<broonie@kernel.org>
Fri, 19 Feb 2016 16:12:11 +0000
(
01:12
+0900)
Here introduces regcache_get_index_by_order() for regmap cache,
which uses the register stride order and bit rotation, to improve
the performance.
Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/internal.h
patch
|
blob
|
blame
|
history
diff --git
a/drivers/base/regmap/internal.h
b/drivers/base/regmap/internal.h
index c22b04b2ca1724b26df4440ad1003fbd7d15e796..5c79526245c2e3309a28766b781a9f2bccc850d5 100644
(file)
--- a/
drivers/base/regmap/internal.h
+++ b/
drivers/base/regmap/internal.h
@@
-273,4
+273,10
@@
static inline unsigned int regmap_get_offset(const struct regmap *map,
return index * map->reg_stride;
}
+static inline unsigned int regcache_get_index_by_order(const struct regmap *map,
+ unsigned int reg)
+{
+ return reg >> map->reg_stride_order;
+}
+
#endif