summaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorNariman Poushin <nariman@opensource.wolfsonmicro.com>2015-07-16 16:36:22 +0100
committerMark Brown <broonie@kernel.org>2015-07-16 22:02:55 +0100
commit2de9d6006c190bb0f706e8404de94cd94293801f (patch)
treeef9cb9b8a86de024834940a8aedd77db82c70077 /include/linux/regmap.h
parent8019ff6cfc0440415fcfb6352c58c3951e6ab053 (diff)
downloadlinux-2de9d6006c190bb0f706e8404de94cd94293801f.tar.gz
linux-2de9d6006c190bb0f706e8404de94cd94293801f.tar.xz
regmap: Apply optional delay in multi_reg_write/register_patch
Add an optional delay_us field in reg_sequence to allow the client to specify a delay (in microseconds) to be applied after any given write in a sequence of writes. We treat a delay in a sequence the same way we treat a page change as they are logically similar in that you can coalesce all write before a delay (in the same way you can coalesce all writes before a page change is needed) Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index c9ef2ec69142..5a7cf2136c81 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -51,14 +51,17 @@ struct reg_default {
};
/**
- * Register/value pairs for sequences of writes
+ * Register/value pairs for sequences of writes with an optional delay in
+ * microseconds to be applied after each write.
*
* @reg: Register address.
* @def: Register value.
+ * @delay_us: Delay to be applied after the register write in microseconds
*/
struct reg_sequence {
unsigned int reg;
unsigned int def;
+ unsigned int delay_us;
};
#ifdef CONFIG_REGMAP