From: Andreas Kemnade <andreas@kemnade.info>
To: Lee Jones <lee.jones@linaro.org>
Cc: robh+dt@kernel.org, mark.rutland@arm.com, a.zummo@towertech.it,
alexandre.belloni@bootlin.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org,
stefan@agner.ch, b.galvani@gmail.com, phh@phh.me,
letux-kernel@openphoenux.org
Subject: Re: [PATCH v4 2/5] mfd: rn5t618: add IRQ support
Date: Mon, 16 Dec 2019 17:01:52 +0100 [thread overview]
Message-ID: <20191216170152.25da1051@kemnade.info> (raw)
In-Reply-To: <20191216152715.GH2369@dell>
[-- Attachment #1: Type: text/plain, Size: 2829 bytes --]
On Mon, 16 Dec 2019 15:27:15 +0000
Lee Jones <lee.jones@linaro.org> wrote:
> On Wed, 11 Dec 2019, Andreas Kemnade wrote:
>
> > This adds support for IRQ handling in the RC5T619 which is required
> > for properly implementing subdevices like RTC.
> > For now only definitions for the variant RC5T619 are included.
> >
> > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > ---
> > Changes in v4:
> > merge rn5t618-irq.c into rn5t618.c
> > use macros for IRQ table
> >
> > Changes in v3:
> > alignment cleanup
> >
> > Changes in v2:
> > - no dead code, did some more testing and thinking for that
> > - remove extra empty lines
> > drivers/mfd/Kconfig | 1 +
> > drivers/mfd/rn5t618.c | 88 +++++++++++++++++++++++++++++++++++++++++++++
> > include/linux/mfd/rn5t618.h | 15 ++++++++
> > 3 files changed, 104 insertions(+)
> >
> > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> > index ae24d3ea68ea..522e068d0082 100644
> > --- a/drivers/mfd/Kconfig
> > +++ b/drivers/mfd/Kconfig
> > @@ -1057,6 +1057,7 @@ config MFD_RN5T618
> > depends on OF
> > select MFD_CORE
> > select REGMAP_I2C
> > + select REGMAP_IRQ
> > help
> > Say yes here to add support for the Ricoh RN5T567,
> > RN5T618, RC5T619 PMIC.
> > diff --git a/drivers/mfd/rn5t618.c b/drivers/mfd/rn5t618.c
> > index da5cd9c92a59..76d997c0cfe4 100644
> > --- a/drivers/mfd/rn5t618.c
> > +++ b/drivers/mfd/rn5t618.c
> > @@ -8,6 +8,8 @@
> >
> > #include <linux/delay.h>
> > #include <linux/i2c.h>
> > +#include <linux/interrupt.h>
> > +#include <linux/irq.h>
> > #include <linux/mfd/core.h>
> > #include <linux/mfd/rn5t618.h>
> > #include <linux/module.h>
> > @@ -45,9 +47,63 @@ static const struct regmap_config rn5t618_regmap_config = {
> > .cache_type = REGCACHE_RBTREE,
> > };
> >
> > +static const struct regmap_irq rc5t619_irqs[] = {
> > + REGMAP_IRQ_REG(RN5T618_IRQ_SYS, 0, BIT(0)),
> > + REGMAP_IRQ_REG(RN5T618_IRQ_DCDC, 0, BIT(1)),
> > + REGMAP_IRQ_REG(RN5T618_IRQ_RTC, 0, BIT(2)),
> > + REGMAP_IRQ_REG(RN5T618_IRQ_ADC, 0, BIT(3)),
> > + REGMAP_IRQ_REG(RN5T618_IRQ_GPIO, 0, BIT(4)),
> > + REGMAP_IRQ_REG(RN5T618_IRQ_CHG, 0, BIT(6)),
> > +};
> > +
> > +static const struct regmap_irq_chip rc5t619_irq_chip = {
> > + .name = "rc5t619",
> > + .irqs = rc5t619_irqs,
> > + .num_irqs = ARRAY_SIZE(rc5t619_irqs),
> > + .num_regs = 1,
> > + .status_base = RN5T618_INTMON,
> > + .mask_base = RN5T618_INTEN,
> > + .mask_invert = true,
> > +};
> > +
> > static struct rn5t618 *rn5t618_pm_power_off;
> > static struct notifier_block rn5t618_restart_handler;
> >
> > +int rn5t618_irq_init(struct rn5t618 *rn5t618)
>
> Static?
>
yes, it should be static since IRQ and core do live
in the same file now.
Regards,
Andreas
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-12-16 16:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 21:54 [PATCH v4 0/5] Add rtc support for rn5t618 mfd Andreas Kemnade
2019-12-11 21:54 ` [PATCH v4 1/5] dt-bindings: mfd: rn5t618: Document optional property interrupts Andreas Kemnade
2019-12-16 15:27 ` Lee Jones
2019-12-18 20:54 ` Rob Herring
2019-12-11 21:54 ` [PATCH v4 2/5] mfd: rn5t618: add IRQ support Andreas Kemnade
2019-12-16 15:27 ` Lee Jones
2019-12-16 16:01 ` Andreas Kemnade [this message]
2019-12-11 21:54 ` [PATCH v4 3/5] mfd: rn5t618: add RTC related registers Andreas Kemnade
2019-12-16 15:28 ` Lee Jones
2019-12-11 21:54 ` [PATCH v4 4/5] mfd: rn5t618: add more subdevices Andreas Kemnade
2019-12-16 15:31 ` Lee Jones
2019-12-16 16:00 ` Andreas Kemnade
2019-12-17 8:01 ` Lee Jones
2019-12-17 11:25 ` Andreas Kemnade
2019-12-17 19:26 ` Andreas Kemnade
2019-12-11 21:54 ` [PATCH v4 5/5] rtc: rc5t619: add ricoh rc5t619 RTC driver Andreas Kemnade
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=20191216170152.25da1051@kemnade.info \
--to=andreas@kemnade.info \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=b.galvani@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=letux-kernel@openphoenux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=phh@phh.me \
--cc=robh+dt@kernel.org \
--cc=stefan@agner.ch \
/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).