From: Marco Felsch <m.felsch@pengutronix.de>
To: broonie@kernel.org
Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: [PATCH] regmap: add reg_sequence helpers
Date: Thu, 2 Apr 2020 10:41:11 +0200 [thread overview]
Message-ID: <20200402084111.30123-1-m.felsch@pengutronix.de> (raw)
Add helper to make it easier to define a reg_sequence array.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
include/linux/regmap.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index f0a092a1a96d..050a5aba4056 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)\
--
2.20.1
next reply other threads:[~2020-04-02 8:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-02 8:41 Marco Felsch [this message]
2020-04-14 15:37 ` Applied "regmap: add reg_sequence helpers" to the regmap tree Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200402084111.30123-1-m.felsch@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=broonie@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).