From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757371Ab1JAVcT (ORCPT ); Sat, 1 Oct 2011 17:32:19 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42233 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751439Ab1JAVcP (ORCPT ); Sat, 1 Oct 2011 17:32:15 -0400 Date: Sun, 2 Oct 2011 08:31:51 +1100 From: NeilBrown To: John Stultz Cc: lkml , "Rafael J. Wysocki" , arve@android.com, markgross@thegnar.org, Alan Stern , amit.kucheria@linaro.org, farrowg@sg.ibm.com, "Dmitry Fink (Palm GBU)" , linux-pm@lists.linux-foundation.org, khilman@ti.com, Magnus Damm , mjg@redhat.com, peterz@infradead.org Subject: Re: [PATCH 3/6] [RFC] rtc: rtc-cmos: Add pm_stay_awake/pm_relax calls around IRQ Message-ID: <20111002083151.7b3ca70c@notabene.brown> In-Reply-To: <1317064434-1829-4-git-send-email-john.stultz@linaro.org> References: <1317064434-1829-1-git-send-email-john.stultz@linaro.org> <1317064434-1829-4-git-send-email-john.stultz@linaro.org> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.22.1; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/XSZfw=dIhC_BsRKfX5o5ev="; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/XSZfw=dIhC_BsRKfX5o5ev= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 26 Sep 2011 12:13:51 -0700 John Stultz wro= te: > Flag the rtc-cmos IRQ event as a wakeup event using pm_stay_awake > and pm_relax() It seems that only the 0/6 patch in this sequence was given any attention. However it appears to me that 3, 4, and 5 stand on their own and are clearly bug-fixes - the bug being that the wake-up event generated by the CMOS rtc = is not being counted as a wakeup event by the power core. I'm less clear on 5, but that is probably simply that I don't understand th= is code very well yet. So maybe resend 4,5,6 by themselves and get them accepted? Or maybe Rafael could just pick them up and review/apply them as they are ??? Thanks, NeilBrown >=20 > CC: Rafael J. Wysocki > CC: arve@android.com > CC: markgross@thegnar.org > CC: Alan Stern > CC: amit.kucheria@linaro.org > CC: farrowg@sg.ibm.com > CC: Dmitry Fink (Palm GBU) > CC: linux-pm@lists.linux-foundation.org > CC: khilman@ti.com > CC: Magnus Damm > CC: mjg@redhat.com=20 > CC: peterz@infradead.org=20 > Signed-off-by: John Stultz > --- > drivers/rtc/rtc-cmos.c | 13 +++++++++++-- > 1 files changed, 11 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c > index 05beb6c..1cc4688 100644 > --- a/drivers/rtc/rtc-cmos.c > +++ b/drivers/rtc/rtc-cmos.c > @@ -538,11 +538,15 @@ static struct bin_attribute nvram =3D { > =20 > static struct cmos_rtc cmos_rtc; > =20 > +static struct wakeup_source *rtc_cmos_wakelock; > + > static irqreturn_t cmos_interrupt(int irq, void *p) > { > u8 irqstat; > u8 rtc_control; > =20 > + __pm_stay_awake(rtc_cmos_wakelock); > + > spin_lock(&rtc_lock); > =20 > /* When the HPET interrupt handler calls us, the interrupt > @@ -573,9 +577,12 @@ static irqreturn_t cmos_interrupt(int irq, void *p) > =20 > if (is_intr(irqstat)) { > rtc_update_irq(p, 1, irqstat); > + __pm_relax(rtc_cmos_wakelock); > return IRQ_HANDLED; > - } else > - return IRQ_NONE; > + } > + > + __pm_relax(rtc_cmos_wakelock); > + return IRQ_NONE; > } > =20 > #ifdef CONFIG_PNP > @@ -1153,6 +1160,8 @@ static int __init cmos_init(void) > { > int retval =3D 0; > =20 > + rtc_cmos_wakelock =3D wakeup_source_register("rtc_cmos"); > + > #ifdef CONFIG_PNP > retval =3D pnp_register_driver(&cmos_pnp_driver); > if (retval =3D=3D 0) --Sig_/XSZfw=dIhC_BsRKfX5o5ev= Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iD8DBQFOh4bIG5fc6gV+Wb0RAvPtAKDVG9/LyF3wbqd7rM3Vwj0UUJSgwQCfVpUh vtGhYTt9Ux1nti29juK5U4A= =nWdX -----END PGP SIGNATURE----- --Sig_/XSZfw=dIhC_BsRKfX5o5ev=--