archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <>
To: Tony Xie <>
Cc: Mark Brown <>,
Subject: Applied "regmap: add a new macro:REGMAP_IRQ_REG_LINE(_id, _reg_bits)" to the regmap tree
Date: Wed, 14 Nov 2018 22:26:54 +0000 (GMT)	[thread overview]
Message-ID: <> (raw)

The patch

   regmap: add a new macro:REGMAP_IRQ_REG_LINE(_id, _reg_bits)

has been applied to the regmap tree at 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.


From 43fac3238c1d9363b2a93d8d56c2be0c29c64e6c Mon Sep 17 00:00:00 2001
From: Tony Xie <>
Date: Tue, 30 Oct 2018 18:07:56 +0800
Subject: [PATCH] regmap: add a new macro:REGMAP_IRQ_REG_LINE(_id, _reg_bits)

if there are lots of irqs for a device and the register addresses for these
irqs is continuous, we can use this macro to initialize regmap_irq value.

Signed-off-by: Tony Xie <>
Signed-off-by: Mark Brown <>
 include/linux/regmap.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index a367d59c301d..3930f3331652 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -1110,6 +1110,12 @@ struct regmap_irq {
 #define REGMAP_IRQ_REG(_irq, _off, _mask)		\
 	[_irq] = { .reg_offset = (_off), .mask = (_mask) }
+#define REGMAP_IRQ_REG_LINE(_id, _reg_bits) \
+	[_id] = {				\
+		.mask = BIT((_id) % (_reg_bits)),	\
+		.reg_offset = (_id) / (_reg_bits),	\
+	}
  * struct regmap_irq_chip - Description of a generic regmap irq_chip.

                 reply	other threads:[~2018-11-14 22:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \
    --subject='Re: Applied "regmap: add a new macro:REGMAP_IRQ_REG_LINE(_id, _reg_bits)" to the regmap tree' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox