<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/rtc, branch v3.1.7</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/rtc?h=v3.1.7</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/rtc?h=v3.1.7'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-12-21T20:58:21Z</updated>
<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>
<entry>
<title>drivers/rtc/rtc-s3c.c: allow multiple open / allow no-ioctl-open'ed rtc to have irq.</title>
<updated>2011-08-26T01:51:00Z</updated>
<author>
<name>MyungJoo Ham</name>
<email>myungjoo.ham@samsung.com</email>
</author>
<published>2011-08-25T22:59:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=62d1760180c84cba68cc83696fa0bde0593007bd'/>
<id>urn:sha1:62d1760180c84cba68cc83696fa0bde0593007bd</id>
<content type='text'>
The previous rtc-s3c had two issues related with its IRQ.

1. Users cannot open rtc multiple times because an open operation
   calls request_irq on the same IRQ.  (e.g., two user processes wants to
   open and read RTC time from rtc-s3c at the same time)

2. If alarm is set and no one has the rtc opened with filesystem
   (either the alarm is set by kernel/boot-loader or user set an alarm and
   closed rtc dev file), the pending bit is not cleared and no further
   interrupt is invoked.  When the alarm is used by the system itself such
   as a resume from suspend-to-RAM or other Low-power modes/idle, this is
   a critical issue.

This patch mitigates these issues by calling request_irq at probe and
free_irq at remove.

Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Acked-by: Kukjin Kim &lt;kgene.kim@samsung.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Changhwan Youn &lt;chaos.youn@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-s3c.c: correct debug messages</title>
<updated>2011-08-26T01:50:43Z</updated>
<author>
<name>MyungJoo Ham</name>
<email>myungjoo.ham@samsung.com</email>
</author>
<published>2011-08-25T22:59:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4e8896cde182b4eab6f2d0af9b6eef87720fae0d'/>
<id>urn:sha1:4e8896cde182b4eab6f2d0af9b6eef87720fae0d</id>
<content type='text'>
RTC-S3C used to print out debug messages incorrectly.  This patch
corrects incorrect outputs.  (undecoded bcd numbers, incorrectly decoded
register values)

This patch affects the pr-debug messages only.

Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Acked-by: Kukjin Kim &lt;kgene.kim@samsung.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Changhwan Youn &lt;chaos.youn@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>
</feed>
