<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/rtc/interface.c, branch v2.6.38</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.38</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.38'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-02-17T22:59:42Z</updated>
<entry>
<title>RTC: Re-enable UIE timer/polling emulation</title>
<updated>2011-02-17T22:59:42Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-02-12T02:15:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=456d66ecd09e3bc326b93174745faafb6ac378d6'/>
<id>urn:sha1:456d66ecd09e3bc326b93174745faafb6ac378d6</id>
<content type='text'>
This patch re-enables UIE timer/polling emulation for rtc devices
that do not support alarm irqs.

CC: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reported-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Tested-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>RTC: Release mutex in error path of rtc_alarm_irq_enable</title>
<updated>2011-02-17T22:59:22Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2011-02-14T10:33:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=516373b8b60fa4152334b6b6f2ece0f178c540ce'/>
<id>urn:sha1:516373b8b60fa4152334b6b6f2ece0f178c540ce</id>
<content type='text'>
On hardware that doesn't support alarm interrupts, rtc_alarm_irq_enable
could return without releasing the ops_lock mutex.

This was introduced in
	aa0be0f (RTC: Propagate error handling via rtc_timer_enqueue properly)

This patch corrects the issue by only returning once the mutex is
released.

[john.stultz: Reworded the commit log]

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>RTC: Prevents a division by zero in kernel code.</title>
<updated>2011-02-03T20:59:50Z</updated>
<author>
<name>Marcelo Roberto Jimenez</name>
<email>mroberto@cpti.cetuc.puc-rio.br</email>
</author>
<published>2011-02-02T18:04:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=83a06bf50bdf2074b9404951ff60e142d159d93b'/>
<id>urn:sha1:83a06bf50bdf2074b9404951ff60e142d159d93b</id>
<content type='text'>
This patch prevents a user space program from calling the RTC_IRQP_SET
ioctl with a negative value of frequency. Also, if this call is make
with a zero value of frequency, there would be a division by zero in the
kernel code.

[jstultz: Also initialize irq_freq to 1 to catch other divbyzero issues]

CC: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Marcelo Roberto Jimenez &lt;mroberto@cpti.cetuc.puc-rio.br&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>RTC: Properly handle rtc_read_alarm error propagation and fix bug</title>
<updated>2011-01-21T16:38:19Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-01-20T23:26:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d5553a556165535337ece8592f066407c62eec2e'/>
<id>urn:sha1:d5553a556165535337ece8592f066407c62eec2e</id>
<content type='text'>
In reviewing cases where the virtualized interfaces didn't propagate
errors properly, I noticed rtc_read_alarm needed fixing. In doing
so I noticed my RTC rework dropped a memset and that the behavior
of rtc_read_alarm shouldn't be conditionalized on the alarm.enabled
flag (as the alarm may be set, but the irqs may be disabled). So
those were corrected as well.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
LKML-Reference: &lt;1295565973-14358-2-git-send-email-john.stultz@linaro.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>RTC: Propagate error handling via rtc_timer_enqueue properly</title>
<updated>2011-01-21T16:38:19Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-01-20T23:26:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa0be0f4659f91f31e45adc422b1788cb36ffddc'/>
<id>urn:sha1:aa0be0f4659f91f31e45adc422b1788cb36ffddc</id>
<content type='text'>
In cases where RTC hardware does not support alarms, the virtualized
RTC interfaces did not have a way to propagate the error up to userland.

This patch extends rtc_timer_enqueue so it catches errors from the hardware
and returns them upwards to the virtualized interfaces. To simplify error
handling, it also internalizes the management of the timer-&gt;enabled bit
into rtc_timer_enqueue and rtc_timer_remove.

Also makes rtc_timer_enqueue and rtc_timer_remove static.

Reported-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Reported-by: Andreas Schwab &lt;schwab@linux-m68k.org&gt;
Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Diagnosed-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Tested-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
LKML-Reference: &lt;1295565973-14358-1-git-send-email-john.stultz@linaro.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>rtc: Namespace fixup</title>
<updated>2010-12-13T21:48:21Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2010-12-13T21:45:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96c8f06a0fb359a9a89701a7afab6d837e466ab0'/>
<id>urn:sha1:96c8f06a0fb359a9a89701a7afab6d837e466ab0</id>
<content type='text'>
rtctimer_* is already occupied by sound/core/rtctimer.c. Instead of
fiddling with that, rename the new functions to rtc_timer_* which
reads nicer anyway.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: John Stultz &lt;johnstul@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>RTC: Rework RTC code to use timerqueue for events</title>
<updated>2010-12-11T06:24:24Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2010-09-23T22:07:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6610e0893b8bc6f59b14fed7f089c5997f035f88'/>
<id>urn:sha1:6610e0893b8bc6f59b14fed7f089c5997f035f88</id>
<content type='text'>
This patch reworks a large portion of the generic RTC code
to in-effect virtualize the rtc interrupt code.

The current RTC interface is very much a raw hardware interface.
Via the proc, /dev/, or sysfs interfaces, applciations can set
the hardware to trigger interrupts in one of three modes:

AIE: Alarm interrupt
UIE: Update interrupt (ie: once per second)
PIE: Periodic interrupt (sub-second irqs)

The problem with this interface is that it limits the RTC hardware
so it can only be used by one application at a time.

The purpose of this patch is to extend the RTC code so that we can
multiplex multiple applications event needs onto a single RTC device.
This is done by utilizing the timerqueue infrastructure to manage
a list of events, which cause the RTC hardware to be programmed
to fire an interrupt for the next event in the list.

In order to preserve the functionality of the exsting proc,/dev/ and
sysfs interfaces, we emulate the different interrupt modes as follows:

AIE: We create a rtc_timer dedicated to AIE mode interrupts. There is
only one per device, so we don't change existing interface semantics.

UIE: Again, a dedicated rtc_timer, set for periodic mode, is used
to emulate UIE interrupts. Again, only one per device.

PIE: Since PIE mode interrupts fire faster then the RTC's clock read
granularity, we emulate PIE mode interrupts using a hrtimer. Again,
one per device.

With this patch, the rtctest.c application in Documentation/rtc.txt
passes fine on x86 hardware. However, there may very well still be
bugs, so greatly I'd appreciate any feedback or testing!

Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
LKML Reference: &lt;1290136329-18291-4-git-send-email-john.stultz@linaro.org&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Richard Cochran &lt;richardcochran@gmail.com&gt;
</content>
</entry>
<entry>
<title>headers: remove sched.h from interrupt.h</title>
<updated>2009-10-11T18:20:58Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2009-10-07T13:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d43c36dc6b357fa1806800f18aa30123c747a6d1'/>
<id>urn:sha1:d43c36dc6b357fa1806800f18aa30123c747a6d1</id>
<content type='text'>
After m68k's task_thread_info() doesn't refer to current,
it's possible to remove sched.h from interrupt.h and not break m68k!
Many thanks to Heiko Carstens for allowing this.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
</content>
</entry>
<entry>
<title>rtc: make rtc_update_irq callable with irqs enabled</title>
<updated>2009-06-19T23:46:05Z</updated>
<author>
<name>Atsushi Nemoto</name>
<email>anemo@mba.ocn.ne.jp</email>
</author>
<published>2009-06-18T23:49:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e6229bec25be4ba00f31dd26e25721cc96c22262'/>
<id>urn:sha1:e6229bec25be4ba00f31dd26e25721cc96c22262</id>
<content type='text'>
The rtc_update_irq() might be called with irqs enabled, if a interrupt
handler was registered without IRQF_DISABLED.  Use
spin_lock_irqsave/spin_unlock_irqrestore instead of spin_lock/spin_unlock.

Also update kerneldoc and drivers which do extra work to follow the
current interface spec, as suggestted by David Brownell.

Signed-off-by: Atsushi Nemoto &lt;anemo@mba.ocn.ne.jp&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: David Brownell &lt;david-b@pacbell.net&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>rtc: use set_mmss when set_time is not available</title>
<updated>2009-01-06T23:59:25Z</updated>
<author>
<name>Alessandro Zummo</name>
<email>a.zummo@towertech.it</email>
</author>
<published>2009-01-06T22:42:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bbccf83f6c4e1a0de5bdf51ec9ec708d3a1ce933'/>
<id>urn:sha1:bbccf83f6c4e1a0de5bdf51ec9ec708d3a1ce933</id>
<content type='text'>
Drivers should only need to implement either set_mmss (counter based RTCs)
or set_time (most RTCs).  The RTC subsystem will handle them
appropriately.

Signed-off-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: Lennert Buytenhek &lt;buytenh@wantstofly.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>
</feed>
