mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 3/4] reset_resource: add wakeup source
Date: Sun, 14 Oct 2012 11:56:16 +0200	[thread overview]
Message-ID: <20121014095616.GP13639@game.jcrosoft.org> (raw)
In-Reply-To: <20121013181849.GZ27665@pengutronix.de>

On 20:18 Sat 13 Oct     , Sascha Hauer wrote:
> On Sat, Oct 13, 2012 at 03:49:21PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > This will allow to known the source of wakeup
> > 
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > ---
> >  common/reset_source.c  |   17 +++++++++++++++++
> >  include/reset_source.h |   11 +++++++++++
> >  2 files changed, 28 insertions(+)
> > 
> > diff --git a/common/reset_source.c b/common/reset_source.c
> > index ec1afc0..4791d29 100644
> > --- a/common/reset_source.c
> > +++ b/common/reset_source.c
> > @@ -34,11 +34,28 @@ void set_reset_source(enum reset_src_type st)
> >  }
> >  EXPORT_SYMBOL(set_reset_source);
> >  
> > +static const char * const wakeup_src_names[] = {
> > +	[WAKEUP_UKWNOWN] = "unknown",
> > +	[WAKEUP_POWER] = "power",
> > +	[WAKEUP_RTC] = "rtc",
> > +	[WAKEUP_TIMER] = "timer",
> > +	[WAKEUP_USER] = "user",
> > +	[WAKEUP_WOL] = "wakeup on lan",
> > +};
> 
> I'm unsure we need a second array for this. I mean RTC can't be seen as
> a reset source, but with a bit of good will the watchdog for example can
> be seen as a wakeup source. We have:
> 
> 	WAKEUP_POWER
> 	WAKEUP_RTC
> 	WAKEUP_TIMER
> 	WAKEUP_USER
> 	WAKEUP_WOL
> 	RESET_POWER
> 	RESET_RESET
> 	RESET_WATCHDOG
> 	RESET_WAKEUP
> 	RESET_JTAG
> 
> WAKEUP_POWER and RESET_POWER are duplicates, RESET_WAKEUP is just an
> indicator that we should look into the WAKEUP_* array. The rest are all
> mutually exclusive. So we would have:
for reset POWER mean inmy ming we gcc power up on the soc
not I plug the power

so it could be WKAEUP_POWER_UP

for RESET_WAKEUP I agree
> 
> 	WAKEUP_POWER
> 	WAKEUP_RTC
> 	WAKEUP_TIMER
> 	WAKEUP_USER
> 	WAKEUP_WOL
> 	WAKEUP_RESET
> 	WAKEUP_WATCHDOG
> 	WAKEUP_JTAG
> 
> Wouldn't that be better?
Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-10-14  9:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-13 13:46 [PATCH 0/4 v2] add wakup source Jean-Christophe PLAGNIOL-VILLARD
2012-10-13 13:49 ` [PATCH 1/4] reset_source: make enum and string human readable Jean-Christophe PLAGNIOL-VILLARD
2012-10-13 13:49   ` [PATCH 2/4] reset_source: add software reset as possible source Jean-Christophe PLAGNIOL-VILLARD
2012-10-13 13:49   ` [PATCH 3/4] reset_resource: add wakeup source Jean-Christophe PLAGNIOL-VILLARD
2012-10-13 18:18     ` Sascha Hauer
2012-10-14  9:56       ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-10-14 10:34         ` Eric Bénard
2012-10-15  8:04     ` Jan Lübbe
2012-10-13 13:49   ` [PATCH 4/4] at91: add reset and wakeup source detection support Jean-Christophe PLAGNIOL-VILLARD
  -- strict thread matches above, loose matches on Subject: below --
2012-10-13  7:51 [PATCH 1/4] reset_source: make enum and string human readable Jean-Christophe PLAGNIOL-VILLARD
2012-10-13  7:51 ` [PATCH 3/4] reset_resource: add wakeup source Jean-Christophe PLAGNIOL-VILLARD

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=20121014095616.GP13639@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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