From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
khilman@baylibre.com, carlo@caione.org, a.zummo@towertech.it,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, rtc-linux@googlegroups.com
Subject: Re: [rtc-linux] Re: [RFC PATCH 2/3] rtc: Add Amlogic Virtual Wake RTC
Date: Thu, 1 Dec 2016 01:51:59 +0100 [thread overview]
Message-ID: <20161201005159.l54yo4kspgrb75ev@piout.net> (raw)
In-Reply-To: <20161103153647.GD25852@remoulade>
On 03/11/2016 at 15:36:48 +0000, Mark Rutland wrote :
> > In order to be able to reuse the RTC wakealarm feature, this
> > driver implements a fake RTC device which uses the system time
> > to deduce a suspend delay.
>
> This sounds like an always-on oneshot timer device, not an RTC.
>
> > +static int meson_vrtc_read_time(struct device *dev, struct rtc_time *tm)
> > +{
> > + unsigned long local_time;
> > + struct timeval time;
> > +
> > + do_gettimeofday(&time);
> > + local_time = time.tv_sec - (sys_tz.tz_minuteswest * 60);
> > + rtc_time_to_tm(local_time, tm);
> > +
> > + return 0;
> > +}
>
> ... if this were a timer, you wouldn't need this hack.
>
The main issue I think is that the clockevents are not able to wakeup a
platform so it doesn't really fit as a timer inside the kernel.
I think it may be fine to handle that in the RTC subsystem for now.
The same issue can be seen with the flextimer on LS1021A:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-August/365597.html
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-12-01 0:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 14:29 [RFC PATCH 0/3] ARM64: meson-gxbb: Add support for system suspend Neil Armstrong
2016-11-03 14:29 ` [RFC PATCH 1/3] ARM64: meson: Add Amlogic Meson GX PM Suspend Neil Armstrong
2016-11-03 15:30 ` Mark Rutland
2016-11-03 21:53 ` Sudeep Holla
2016-11-04 9:13 ` Neil Armstrong
2016-11-03 14:29 ` [RFC PATCH 2/3] rtc: Add Amlogic Virtual Wake RTC Neil Armstrong
2016-11-03 15:36 ` Mark Rutland
2016-11-03 15:46 ` Neil Armstrong
2016-12-01 0:51 ` Alexandre Belloni [this message]
2016-11-03 14:29 ` [RFC PATCH 3/3] ARM64: dts: meson-gxbb: Add support for PM and Virtual RTC Neil Armstrong
2016-11-03 15:25 ` [RFC PATCH 0/3] ARM64: meson-gxbb: Add support for system suspend Mark Rutland
2016-11-03 15:43 ` Mark Rutland
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=20161201005159.l54yo4kspgrb75ev@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=a.zummo@towertech.it \
--cc=carlo@caione.org \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=narmstrong@baylibre.com \
--cc=rtc-linux@googlegroups.com \
/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).