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>
This commit is contained in:

committed by
Mark Brown

parent
8019ff6cfc
commit
2de9d6006c
@@ -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
|
||||
|
Reference in New Issue
Block a user