diff options
author | Marco Felsch <m.felsch@pengutronix.de> | 2020-04-02 11:41:11 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-04-14 18:37:30 +0300 |
commit | bd3ddb495762575ab14e7bd2e4017dc1f9a80b2f (patch) | |
tree | 0c60b386aa0fc2e3558fae8f898d96b1d9c863c6 /include/linux/regmap.h | |
parent | 8f3d9f354286745c751374f5f1fcafee6b3f3136 (diff) | |
download | linux-bd3ddb495762575ab14e7bd2e4017dc1f9a80b2f.tar.xz |
regmap: add reg_sequence helpers
Add helper to make it easier to define a reg_sequence array.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.kernel.org/r/20200402084111.30123-1-m.felsch@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r-- | include/linux/regmap.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 40b07168fd8e..0b5582a78df8 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -71,6 +71,13 @@ struct reg_sequence { unsigned int delay_us; }; +#define REG_SEQ(_reg, _def, _delay_us) { \ + .reg = _reg, \ + .def = _def, \ + .delay_us = _delay_us, \ + } +#define REG_SEQ0(_reg, _def) REG_SEQ(_reg, _def, 0) + #define regmap_update_bits(map, reg, mask, val) \ regmap_update_bits_base(map, reg, mask, val, NULL, false, false) #define regmap_update_bits_async(map, reg, mask, val)\ |