From: Andreas Kemnade <andreas@kemnade.info>
To: Pierre-Hugues Husson <phh@phh.me>
Cc: Lee Jones <lee.jones@linaro.org>,
a.zummo@towertech.it, alexandre.belloni@bootlin.com,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-rtc@vger.kernel.org, b.galvani@gmail.com, stefan@agner.ch,
letux-kernel@openphoenux.org
Subject: Re: [PATCH v2 2/5] mfd: rn5t618: add irq support
Date: Wed, 20 Nov 2019 09:13:39 +0100 [thread overview]
Message-ID: <20191120091339.4de02ad0@kemnade.info> (raw)
In-Reply-To: <CAJ-oXjTQMgF+zzTkWz21yG4ZdAszSDKkiAqocBcUjyMNEd0ozQ@mail.gmail.com>
On Wed, 20 Nov 2019 08:54:44 +0100
Pierre-Hugues Husson <phh@phh.me> wrote:
[...]
> >
> > +static int __maybe_unused rn5t618_i2c_suspend(struct device *dev)
> > +{
> > + struct rn5t618 *priv = dev_get_drvdata(dev);
> > +
> > + if (priv->chip_irq)
> > + disable_irq(priv->chip_irq);
> > +
> > + return 0;
> > +}
> > +
> > +static int __maybe_unused rn5t618_i2c_resume(struct device *dev)
> > +{
> > + struct rn5t618 *priv = dev_get_drvdata(dev);
> > +
> > + if (priv->chip_irq)
> > + enable_irq(priv->chip_irq);
> > +
> > + return 0;
> > +}
>
> For what it's worth, the boards I have (Archos 101 Oxygen and Pipo P9)
> with rc5t619 use GPIO for power button.
> So IRQ would need to be enabled in suspend for this to work.
> Also, since you actually added alarm support, perhaps you want to
> wake-up from suspend using alarm as well?
>
Already tested that, that works, because device_init_wakeup() is used.
disable_irq() is needed because we cannot do i2c that early after resume.
Other mfd drivers do thas as well and waking up works.
Regards,
Andreas
next prev parent reply other threads:[~2019-11-20 8:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-31 21:38 [PATCH v2 0/5] Add rtc support for rn5t618 mfd Andreas Kemnade
2019-10-31 21:38 ` [PATCH v2 1/5] mfd: rn5t618: prepare for irq handling Andreas Kemnade
2019-11-16 0:41 ` kbuild test robot
2019-10-31 21:38 ` [PATCH v2 2/5] mfd: rn5t618: add irq support Andreas Kemnade
2019-11-06 21:48 ` Andreas Kemnade
2019-11-16 6:52 ` kbuild test robot
2019-11-20 7:54 ` Pierre-Hugues Husson
2019-11-20 8:13 ` Andreas Kemnade [this message]
2019-10-31 21:38 ` [PATCH v2 3/5] mfd: rn5t618: add rtc related registers Andreas Kemnade
2019-10-31 21:38 ` [PATCH v2 4/5] mfd: rn5t618: add more subdevices Andreas Kemnade
2019-10-31 21:38 ` [PATCH v2 5/5] rtc: rtc-rc5t619: add ricoh rc5t619 RTC driver Andreas Kemnade
2019-11-28 10:57 ` Alexandre Belloni
2019-11-29 6:59 ` Andreas Kemnade
2019-11-29 8:55 ` Alexandre Belloni
2019-11-29 11:25 ` 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=20191120091339.4de02ad0@kemnade.info \
--to=andreas@kemnade.info \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=b.galvani@gmail.com \
--cc=lee.jones@linaro.org \
--cc=letux-kernel@openphoenux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=phh@phh.me \
--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