<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/rtc, branch v3.1.8</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/rtc?h=v3.1.8</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/rtc?h=v3.1.8'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-01-06T22:17:34Z</updated>
<entry>
<title>Revert "rtc: Disable the alarm in the hardware"</title>
<updated>2012-01-06T22:17:34Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-01-04T01:32:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f63f475a7edbe389ceb01cd430efb2d2a127eb6e'/>
<id>urn:sha1:f63f475a7edbe389ceb01cd430efb2d2a127eb6e</id>
<content type='text'>
commit 157e8bf8b4823bfcdefa6c1548002374b61f61df upstream.

This reverts commit c0afabd3d553c521e003779c127143ffde55a16f.

It causes failures on Toshiba laptops - instead of disabling the alarm,
it actually seems to enable it on the affected laptops, resulting in
(for example) the laptop powering on automatically five minutes after
shutdown.

There's a patch for it that appears to work for at least some people,
but it's too late to play around with this, so revert for now and try
again in the next merge window.

See for example

	http://bugs.debian.org/652869

Reported-and-bisected-by: Andreas Friedrich &lt;afrie@gmx.net&gt; (Toshiba Tecra)
Reported-by: Antonio-M. Corbi Bellot &lt;antonio.corbi@ua.es&gt; (Toshiba Portege R500)
Reported-by: Marco Santos &lt;marco.santos@waynext.com&gt; (Toshiba Portege Z830)
Reported-by: Christophe Vu-Brugier &lt;cvubrugier@yahoo.fr&gt;  (Toshiba Portege R830)
Cc: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Requested-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>rtc: m41t80: Workaround broken alarm functionality</title>
<updated>2012-01-06T22:16:49Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-12-12T21:57:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dbb49a2b153a9da2a281e927f14e4a15a676987d'/>
<id>urn:sha1:dbb49a2b153a9da2a281e927f14e4a15a676987d</id>
<content type='text'>
commit c3b79770e51ab1fd4201f3b54edf30113b9ce74f upstream.

The m41t80 driver can read and set the alarm, but it doesn't
seem to have a functional alarm irq.

This causes failures when the generic core sees alarm functions,
but then cannot use them properly for things like UIE mode.

Disabling the alarm functions allows proper error reporting,
and possible fallback to emulated modes. Once someone fixes
the alarm irq functionality, this can be restored.

CC: Matt Turner &lt;mattst88@gmail.com&gt;
CC: Nico Macrionitis &lt;acrux@cruxppc.org&gt;
CC: Atsushi Nemoto &lt;anemo@mba.ocn.ne.jp&gt;
Reported-by: Matt Turner &lt;mattst88@gmail.com&gt;
Reported-by: Nico Macrionitis &lt;acrux@cruxppc.org&gt;
Tested-by: Nico Macrionitis &lt;acrux@cruxppc.org&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>drivers/rtc/rtc-s3c.c: fix driver clock enable/disable balance issues</title>
<updated>2011-12-21T20:58:21Z</updated>
<author>
<name>Jonghwan Choi</name>
<email>jhbird.choi@samsung.com</email>
</author>
<published>2011-12-08T22:34:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c7443ad3168fc2fdafdaec2ad5facf9704937092'/>
<id>urn:sha1:c7443ad3168fc2fdafdaec2ad5facf9704937092</id>
<content type='text'>
commit 2dbcd05f1e9e0932833d16dab1696176fc164b07 upstream.

If an error occurs after the clock is enabled, the enable/disable state
can become unbalanced.

Signed-off-by: Jonghwan Choi &lt;jhbird.choi@samsung.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Acked-by: Kukjin Kim &lt;kgene.kim@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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>rtc: Fix some bugs that allowed accumulating time drift in suspend/resume</title>
<updated>2011-12-09T16:55:51Z</updated>
<author>
<name>Arve Hjønnevåg</name>
<email>arve@android.com</email>
</author>
<published>2011-11-23T02:24:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=df9490f1a5f1019ebf36bd7820ff405ddc06bfa9'/>
<id>urn:sha1:df9490f1a5f1019ebf36bd7820ff405ddc06bfa9</id>
<content type='text'>
commit 6a8943d9ec2567572fca25cf69ad45844d0141a3 upstream.

The current code checks if abs(delta_delta.tv_sec) is greater or
equal to two before it discards the old delta value, but this can
trigger at close to -1 seconds since -1.000000001 seconds is stored
as tv_sec -2 and tv_nsec 999999999 in a normalized timespec.

rtc_resume had an early return check if the rtc value had not changed
since rtc_suspend. This effectivly stops time for the duration of the
short sleep. Check if sleep_time is positive after all the adjustments
have been applied instead since this allows the old_system adjustment
in rtc_suspend to have an effect even for short sleep cycles.

Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>rtc: Disable the alarm in the hardware</title>
<updated>2011-12-09T16:55:51Z</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.amat.us/linux/commit/?id=0cbc008c56f7b4a11ba6fe80e196d7ab322baabf'/>
<id>urn:sha1:0cbc008c56f7b4a11ba6fe80e196d7ab322baabf</id>
<content type='text'>
commit c0afabd3d553c521e003779c127143ffde55a16f upstream.

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.

Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Rabin Vincent &lt;rabin.vincent@stericsson.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>drivers/rtc/rtc-s3c.c: fix no occurrence of alarm interrupt</title>
<updated>2011-09-15T01:09:38Z</updated>
<author>
<name>Donggeun Kim</name>
<email>dg77.kim@samsung.com</email>
</author>
<published>2011-09-14T23:22:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=88cee8fd77af28d414b983798dd30c8950c71e31'/>
<id>urn:sha1:88cee8fd77af28d414b983798dd30c8950c71e31</id>
<content type='text'>
The driver does not generate an alarm interrupt even though a time for
an alarm is set.

This results from disabling rtc_clk after setting the alarm time.

To generate an alarm interrupt the driver should maintain its enabled
state for rtc_clk the until alarm interrupt occurs.  This patch permits
generation of an alarm interrupt.

[akpm@linux-foundation.org: make s3c_rtc_alarm_clk_lock local to s3c_rtc_alarm_clk_enable()]
Signed-off-by: Donggeun Kim &lt;dg77.kim@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@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>drivers/rtc/rtc-imxdi.c needs linux/sched.h</title>
<updated>2011-09-15T01:09:37Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2011-09-14T23:21:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4c32f355cec2647efb65e4b24e630bd2386f787'/>
<id>urn:sha1:d4c32f355cec2647efb65e4b24e630bd2386f787</id>
<content type='text'>
Include linux/sched.h to fix below build error.

    CC      drivers/rtc/rtc-imxdi.o
  drivers/rtc/rtc-imxdi.c: In function 'di_write_wait':
  drivers/rtc/rtc-imxdi.c:168: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
  drivers/rtc/rtc-imxdi.c:168: error: (Each undeclared identifier is reported only once
  drivers/rtc/rtc-imxdi.c:168: error: for each function it appears in.)
  drivers/rtc/rtc-imxdi.c:168: error: implicit declaration of function 'signal_pending'
  drivers/rtc/rtc-imxdi.c:168: error: implicit declaration of function 'schedule_timeout'
  drivers/rtc/rtc-imxdi.c: In function 'dryice_norm_irq':
  drivers/rtc/rtc-imxdi.c:329: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Cc: Baruch Siach &lt;baruch@tkos.co.il&gt;
Cc: Wan ZongShun &lt;mcuos.com@gmail.com&gt;
Cc: 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>Merge branch 'timers-fixes-for-linus' of git://tesla.tglx.de/git/linux-2.6-tip</title>
<updated>2011-09-07T20:03:48Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-09-07T20:03:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=79016f648872549392d232cd648bd02298c2d2bb'/>
<id>urn:sha1:79016f648872549392d232cd648bd02298c2d2bb</id>
<content type='text'>
* 'timers-fixes-for-linus' of git://tesla.tglx.de/git/linux-2.6-tip:
  rtc: twl: Fix registration vs. init order
  rtc: Initialized rtc_time-&gt;tm_isdst
  rtc: Fix RTC PIE frequency limit
  rtc: rtc-twl: Remove lockdep related local_irq_enable()
  rtc: rtc-twl: Switch to using threaded irq
  rtc: ep93xx: Fix 'rtc' may be used uninitialized warning
  alarmtimers: Avoid possible denial of service with high freq periodic timers
  alarmtimers: Memset itimerspec passed into alarm_timer_get
  alarmtimers: Avoid possible null pointer traversal
</content>
</entry>
<entry>
<title>rtc: twl: Fix registration vs. init order</title>
<updated>2011-08-27T00:26:54Z</updated>
<author>
<name>Todd Poynor</name>
<email>toddpoynor@google.com</email>
</author>
<published>2011-08-11T03:20:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7e72c686347562b4a275c97b4bdd7a79c1f23c65'/>
<id>urn:sha1:7e72c686347562b4a275c97b4bdd7a79c1f23c65</id>
<content type='text'>
Only register as an RTC device after the hardware has been
successfully initialized.  The RTC class driver will call
back to this driver to read a pending alarm, and other
drivers watching for new devices on the RTC class may
read the RTC time upon registration.  Such access might
occur while the RTC is stopped, prior to clearing
pending alarms, etc.

The new ordering also avoids leaving the platform
device drvdata set to an unregistered struct rtc_device *
on probe errors.

Signed-off-by: Todd Poynor &lt;toddpoynor@google.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>rtc: Initialized rtc_time-&gt;tm_isdst</title>
<updated>2011-08-27T00:26:35Z</updated>
<author>
<name>Mike Waychison</name>
<email>mikew@google.com</email>
</author>
<published>2011-08-12T21:04:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a7402deb324f62106566f5a95199a54c41e200ef'/>
<id>urn:sha1:a7402deb324f62106566f5a95199a54c41e200ef</id>
<content type='text'>
Even though the Linux kernel does not use the tm_isdst field, it is
exposed as part of the ABI.  This field can accidentally be left
initialized, which is why we currently memset buffers returned to
userland in rtc_read_time.

There is a case however where the field can return garbage from the
stack though when using the RTC_ALM_READ ioctl on the rtc device.  This
ioctl invokes rtc_read_alarm, which is careful to memset the rtc_wkalrm
buffer that is copied to userland, but it then uses a struct copy to
assign to alarm-&gt;time given the return value from rtc_ktime_to_tm().

rtc_ktime_to_tm() is implemented by calling rtc_time_to_tm using a
derivative seconds counds from ktime, but rtc_time_to_tm does not assign
a value to -&gt;tm_isdst.  This results in garbage from rtc_ktime_to_tm()'s
frame ending up being copied out to userland as part of the returned
rtc_wkalrm.

Fix this by initializing rtc_time-&gt;tm_isdst to 0 in rtc_time_to_tm.

Signed-off-by: Mike Waychison &lt;mikew@google.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
</feed>
