mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC 5/5] commands: add hwclock
Date: Fri, 11 Jul 2014 08:07:07 +0200	[thread overview]
Message-ID: <20140711060707.GL23235@pengutronix.de> (raw)
In-Reply-To: <20140711095936.afd2e87610ee74eb2921309f@gmail.com>

On Fri, Jul 11, 2014 at 09:59:36AM +0400, Antony Pavlov wrote:
> On Thu, 10 Jul 2014 23:45:47 +0200
> Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > > +BAREBOX_CMD_START(hwclock)
> > > +	.cmd		= do_hwclock,
> > > +	BAREBOX_CMD_DESC("query or set the hardware clock (RTC)")
> > 
> > This initial version doesn't allow to set the time.
> 
> I have no idea about simple and elegant solution for setting clock :(
> 
> My hwclock man page show me an example:
> 
>  hwclock --set --date="2011-08-14 16:45:05"
> 
> I'll try to find some ready-to-use strptime-like function (e.g. in uClibc).

The format which the date man page describes as "coordinated universal
time" seems quite easy to parse. It's [MMDDhhmm[[CC]YY][.ss]], so
071107572014 for now.

> 
> Also there is no epoch handling.
> 
> May be it's better to drop hwclock clock setting in the inital rtc support series?

I think we should have set time support from the beginning. I mean
setting the time is an important part of testing the drivers before
merging them.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

  reply	other threads:[~2014-07-11  6:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10  8:33 [RFC 0/5] add rtc support Antony Pavlov
2014-07-10  8:33 ` [RFC 1/5] lib: import 'bcd' from linux-3.15 Antony Pavlov
2014-07-10  8:33 ` [RFC 2/5] add rtc support Antony Pavlov
2014-07-10 21:40   ` Sascha Hauer
2014-07-11  5:31     ` Antony Pavlov
2014-07-10  8:33 ` [RFC 3/5] i2c: import SMBus stuff from linux Antony Pavlov
2014-07-10  8:33 ` [RFC 4/5] rtc: add ds1307 support Antony Pavlov
2014-07-10  8:33 ` [RFC 5/5] commands: add hwclock Antony Pavlov
2014-07-10 21:45   ` Sascha Hauer
2014-07-11  5:59     ` Antony Pavlov
2014-07-11  6:07       ` Sascha Hauer [this message]
2014-07-11  5:37 ` [RFC 0/5] add rtc support Sascha Hauer
2014-07-11  6:12   ` Antony Pavlov
2014-07-11  6:10     ` Sascha Hauer
2014-07-11  6:32       ` Antony Pavlov
2014-07-11  6:37         ` Sascha Hauer
2014-07-11 11:27     ` Antony Pavlov

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=20140711060707.GL23235@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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