<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/rtc/interface.c, branch v3.11.2</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.11.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.11.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-07-03T23:08:00Z</updated>
<entry>
<title>drivers/rtc/interface.c: return -EBUSY, not -EACCES when device is busy</title>
<updated>2013-07-03T23:08:00Z</updated>
<author>
<name>Chris Brand</name>
<email>chris.brand@broadcom.com</email>
</author>
<published>2013-07-03T22:07:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0734e27f0befe9e88c2b5dad789b05b7bf86ce90'/>
<id>urn:sha1:0734e27f0befe9e88c2b5dad789b05b7bf86ce90</id>
<content type='text'>
If rtc-&gt;irq_task is non-NULL and task is NULL, they always
rtc_irq_set_freq(), whenever err is set to -EBUSY it will then immediately
be set to -EACCES, misleading the caller as to the underlying problem.

Signed-off-by: Chris Brand &lt;chris.brand@broadcom.com&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/rtc/interface.c: fix checkpatch errors</title>
<updated>2013-07-03T23:07:46Z</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2013-07-03T22:05:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3ff2e13ce1b4172bf7d188799d3a106c0e2bb5cd'/>
<id>urn:sha1:3ff2e13ce1b4172bf7d188799d3a106c0e2bb5cd</id>
<content type='text'>
Fixes the following types of errors:
  ERROR: "foo* bar" should be "foo *bar"
  ERROR: else should follow close brace '}'
  WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Cc: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>driver-core: constify data for class_find_device()</title>
<updated>2013-02-06T20:18:56Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2013-02-01T19:40:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9f3b795a626ee79574595e06d1437fe0c7d51d29'/>
<id>urn:sha1:9f3b795a626ee79574595e06d1437fe0c7d51d29</id>
<content type='text'>
All in-kernel users of class_find_device() don't really need mutable
data for match callback.

In two places (kernel/power/suspend_test.c, drivers/scsi/osd/osd_uld.c)
this patch changes match callbacks to use const search data.

The const is propagated to rtc_class_open() and power_supply_get_by_name()
parameters.

Note that there's a dev reference leak in suspend_test.c that's not
touched in this patch.

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>RTC: Avoid races between RTC alarm wakeup and suspend.</title>
<updated>2012-08-08T18:49:16Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-08-05T20:56:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7523ceed42d84c1afaa1dc498bffed53c2aa444e'/>
<id>urn:sha1:7523ceed42d84c1afaa1dc498bffed53c2aa444e</id>
<content type='text'>
If an RTC alarm fires just as suspend is happening, it is possible for
suspend to complete and the alarm to be missed.

To avoid the race, we must register the event with the PM core.

As the event is made visible to userspace through a thread which is
only scheduled by the interrupt, we need a pm_stay_awake/pm_relax
pair preventing suspend from the interrupt until the thread completes
its work.

This makes the pm_wakeup_event() call in cmos_interrupt unnecessary as
it provides suspend protection for all RTCs that use rtc_update_irq.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>rtc: Provide flag for rtc devices that don't support UIE</title>
<updated>2012-03-16T01:23:10Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2012-03-07T01:16:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4a649903f91232d02284d53724b0a45728111767'/>
<id>urn:sha1:4a649903f91232d02284d53724b0a45728111767</id>
<content type='text'>
Richard Weinberger noticed that on some RTC hardware that
doesn't support UIE mode, due to coarse granular alarms
(like 1minute resolution), the current virtualized RTC
support doesn't properly error out when UIE is enabled.

Instead the current code queues an alarm for the next second,
but it won't fire until up to a miniute later.

This patch provides a generic way to flag this sort of hardware
and fixes the issue on the mpc5121 where Richard noticed the
problem.

CC: stable@vger.kernel.org
Reported-by: Richard Weinberger &lt;richard@nod.at&gt;
Tested-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>rtc: Disable the alarm in the hardware (v2)</title>
<updated>2012-01-27T03:41:42Z</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin.vincent@stericsson.com</email>
</author>
<published>2011-11-22T10:03:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=41c7f7424259ff11009449f87c95656f69f9b186'/>
<id>urn:sha1:41c7f7424259ff11009449f87c95656f69f9b186</id>
<content type='text'>
Currently, the RTC code does not disable the alarm in the hardware.

This means that after a sequence such as the one below (the files are in the
RTC sysfs), the box will boot up after 2 minutes even though we've
asked for the alarm to be turned off.

	# echo $((`cat since_epoch`)+120) &gt; wakealarm
	# echo 0 &gt; wakealarm
	# poweroff

Fix this by disabling the alarm when there are no timers to run.

The original version of this patch was reverted. This version
disables the irq directly instead of setting a disabled timer
in the future.

Cc: stable@kernel.org
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Rabin Vincent &lt;rabin.vincent@stericsson.com&gt;
[Merged in the second revision from Rabin]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>rtc: Expire alarms after the time is set. (v2)</title>
<updated>2012-01-27T03:41:36Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-12-08T22:39:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5f9679d29c7959445d4af1eb85ee55e4ebad4a93'/>
<id>urn:sha1:5f9679d29c7959445d4af1eb85ee55e4ebad4a93</id>
<content type='text'>
If the alarm time programming in the rtc is ever in the past, it won't fire,
and any other alarm will be queued after it so they won't fire either.

So any time that the alarm might be in the past, we need to trigger
the irq handler to ensure the old alarm is cleared and the timer queue
is fully in the future.

This is done whenever the RTC clock is set.

This is the second revision of this patch, which was earlier reverted.
This version avoids the initialization problem, which is handled by
a different patch.

Tested-by: Sander Eikelenboom &lt;linux@eikelenboom.it&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
[Remove problematic initialization change, update commit log, also
catch set_mmss case -jstultz]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>rtc: Avoid setting alarm to a time in the past</title>
<updated>2012-01-27T03:41:30Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2012-01-05T23:21:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bd729d72b428261f2975360e0c117d7d7a2cd6e8'/>
<id>urn:sha1:bd729d72b428261f2975360e0c117d7d7a2cd6e8</id>
<content type='text'>
In some cases at boot up, the RTC alarm may be set in the past,
but still have the enabled flag on. This was causing problems,
because we would then enqueue the alarm into the timerqueue,
but it would never fire. This would clog up the timerqueue
and keep other alarms from working.

The fix is to check the alarm against the current rtc time at
boot and avoid enqueueing the alarm if it is in the past.

Reported-by: NeilBrown &lt;neilb@suse.de&gt;
Tested-by: NeilBrown &lt;neilb@suse.de&gt;
Tested-by: Sander Eikelenboom &lt;linux@eikelenboom.it&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>drivers/rtc/interface.c: fix alarm rollover when day or month is out-of-range</title>
<updated>2012-01-11T00:30:53Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2012-01-10T23:11:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e74a8f2edb92cb690b467cea0ab652c509e9f624'/>
<id>urn:sha1:e74a8f2edb92cb690b467cea0ab652c509e9f624</id>
<content type='text'>
Commit f44f7f96a20a ("RTC: Initialize kernel state from RTC") introduced a
potential infinite loop.  If an alarm time contains a wildcard month and
an invalid day (&gt; 31), or a wildcard year and an invalid month (&gt;= 12),
the loop searching for the next matching date will never terminate.  Treat
the invalid values as wildcards.

Fixes &lt;http://bugs.debian.org/646429&gt;, &lt;http://bugs.debian.org/653331&gt;

Reported-by: leo weppelman &lt;leoweppelman@googlemail.com&gt;
Reported-by: "P. van Gaans" &lt;mailme667@yahoo.co.uk&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: Marcelo Roberto Jimenez &lt;mroberto@cpti.cetuc.puc-rio.br&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "rtc: Expire alarms after the time is set."</title>
<updated>2012-01-04T15:57:22Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-01-04T15:57:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f423fc627b05f47bc9305f9661630fce30f208f9'/>
<id>urn:sha1:f423fc627b05f47bc9305f9661630fce30f208f9</id>
<content type='text'>
This reverts commit 93b2ec0128c431148b216b8f7337c1a52131ef03.

The call to "schedule_work()" in rtc_initialize_alarm() happens too
early, and can cause oopses at bootup

Neil Brown explains why we do it:

  "If you set an alarm in the future, then shutdown and boot again after
   that time, then you will end up with a timer_queue node which is in
   the past.

   When this happens the queue gets stuck.  That entry-in-the-past won't
   get removed until and interrupt happens and an interrupt won't happen
   because the RTC only triggers an interrupt when the alarm is "now".

   So you'll find that e.g.  "hwclock" will always tell you that
   'select' timed out.

   So we force the interrupt work to happen at the start just in case."

and has a patch that convert it to do things in-process rather than with
the worker thread, but right now it's too late to play around with this,
so we just revert the patch that caused problems for now.

Reported-by: Sander Eikelenboom &lt;linux@eikelenboom.it&gt;
Requested-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Requested-by: John Stultz &lt;john.stultz@linaro.org&gt;
Cc: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
