<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/rtc/interface.c, branch v2.6.28</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.28</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.28'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-11-06T23:41:17Z</updated>
<entry>
<title>rtc: fix handling of missing tm_year data when reading alarms</title>
<updated>2008-11-06T23:41:17Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2008-11-06T20:53:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9e3a4afd5a66f9047e30ba225525e6ff01612dc4'/>
<id>urn:sha1:9e3a4afd5a66f9047e30ba225525e6ff01612dc4</id>
<content type='text'>
When fixing up invalid years rtc_read_alarm() was calling rtc_valid_tm()
as a boolean but rtc_valid_tm() returns zero on success or a negative
number if the time is not valid so the test was inverted.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: 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: don't return -EBUSY when mutex_lock_interruptible() fails</title>
<updated>2008-07-30T16:41:45Z</updated>
<author>
<name>David Brownell</name>
<email>dbrownell@users.sourceforge.net</email>
</author>
<published>2008-07-30T05:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b68bb2632453a9ca7d10a00d79adf60968cb4c05'/>
<id>urn:sha1:b68bb2632453a9ca7d10a00d79adf60968cb4c05</id>
<content type='text'>
It was pointed out that the RTC framework handles its mutex locks oddly
...  returning -EBUSY when interrupted.  This fixes that by returning the
value of mutex_lock_interruptible() (i.e.  -EINTR).

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&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>Driver Core: add ability for class_find_device to start in middle of list</title>
<updated>2008-07-22T04:54:47Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2008-05-22T21:21:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=695794ae0c5bdd9bd06e35b118801e2e9be04f9e'/>
<id>urn:sha1:695794ae0c5bdd9bd06e35b118801e2e9be04f9e</id>
<content type='text'>
This mirrors the functionality that driver_find_device has as well.

We add a start variable, and all callers of the function are fixed up at
the same time.

The block layer will be using this new functionality in a follow-on
patch.


Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>rtc: rtc_read_alarm() handles wraparound</title>
<updated>2008-07-04T17:40:04Z</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2008-07-04T16:59:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a01cc6570326c01e70619bf6540fb32139947c33'/>
<id>urn:sha1:a01cc6570326c01e70619bf6540fb32139947c33</id>
<content type='text'>
While 0e36a9a4a788e4e92407774df76c545910810d35 ("rtc: fix readback from
/sys/class/rtc/rtc?/wakealarm") made sure that active alarms were never
returned with invalid "wildcard" fields (negative), it can still report
(wrongly) that the alarm triggers in the past.

Example, if it's now 10am, an alarm firing at 5am will be triggered
TOMORROW not today.  (Which may also be next month or next year...)

This updates that alarm handling in three ways:

  * Handle alarm rollover in the common cases of RTCs that don't
    support matching on all date fields.

  * Skip the invalid-field logic when it's not needed.

  * Minor bugfix ... tm_isdst should be ignored, it's one of the
    fields Linux doesn't maintain.

A warning is emitted for some of the unhandled rollover cases, but the
possible combinations are a bit too numerous to handle every bit of
potential hardware and firmware braindamage.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Mark Lord &lt;lkml@rtr.ca&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>rtc: use class iteration api</title>
<updated>2008-01-25T04:40:44Z</updated>
<author>
<name>Dave Young</name>
<email>hidave.darkstar@gmail.com</email>
</author>
<published>2008-01-22T06:00:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=71da890509fec13d54329485bf5e4ac16b992bb6'/>
<id>urn:sha1:71da890509fec13d54329485bf5e4ac16b992bb6</id>
<content type='text'>
Convert to use the class iteration api.

Signed-off-by: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>RTC: assure proper memory ordering with respect to RTC_DEV_BUSY flag</title>
<updated>2007-12-05T17:21:18Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2007-12-05T07:45:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=372a302e9a892229206aafca0352584a745bc5f3'/>
<id>urn:sha1:372a302e9a892229206aafca0352584a745bc5f3</id>
<content type='text'>
We must make sure that the RTC_DEV_BUSY flag has proper lock semantics,
i.e.  that the RTC_DEV_BUSY stores clearing the flag don't get reordered
before the preceeding stores and loads and vice versa.

Spotted by Nick Piggin.

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Cc: David Brownell &lt;david-b@pacbell.net&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>RTC: convert mutex to bitfield</title>
<updated>2007-11-29T17:24:54Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2007-11-29T00:22:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8853c202b4a91713dbfb4d9b6e1c87cc2aa12392'/>
<id>urn:sha1:8853c202b4a91713dbfb4d9b6e1c87cc2aa12392</id>
<content type='text'>
RTC code is using mutex to assure exclusive access to /dev/rtc.  This is
however wrong usage, as it leaves the mutex locked when returning into
userspace, which is unacceptable.

Convert rtc-&gt;char_lock into bit operation.

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Acked-by: 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: fix readback from /sys/class/rtc/rtc?/wakealarm</title>
<updated>2007-10-16T16:43:13Z</updated>
<author>
<name>Mark Lord</name>
<email>lkml@rtr.ca</email>
</author>
<published>2007-10-16T08:28:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e36a9a4a788e4e92407774df76c545910810d35'/>
<id>urn:sha1:0e36a9a4a788e4e92407774df76c545910810d35</id>
<content type='text'>
Fix readback of RTC alarms on platforms which return -1 in
non-hardware-supported RTC alarm fields.

To fill in the missing (-1) values, we grab an RTC timestamp along with the
RTC alarm value, and use the timestamp fields to populate the missing alarm
fields.

To counter field-wrap races (since the timestamp and alarm are not read
together atomically), we read the RTC timestamp both before and after
reading the RTC alarm value, and then check for wrapped fields --&gt; if any
have wrapped, we know we have a possible inconsistency, so we loop and
reread the timestamp and alarm again.

Wrapped fields in the RTC timestamps are an issue because rtc-cmos.c, for
example, also gets/uses an RTC timestamp internally while fetching the RTC
alarm.  If our timestamp here wasn't the same (minutes and higher) as what
was used internally there, then we might end up populating the -1 fields
with inconsistent values.

This fixes readbacks from /sys/class/rtc/rtc?/wakealarm, as well as other
code paths which call rtc_read_alarm().

Signed-off-by: Mark Lord &lt;mlord@pobox.com&gt;
Cc: David Brownell &lt;david-b@pacbell.net&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>rtc_irq_set_freq() requires power-of-two and associated kerneldoc</title>
<updated>2007-10-16T16:43:13Z</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2007-10-16T08:28:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=97144c67566241db46633727f2860e6428373fe4'/>
<id>urn:sha1:97144c67566241db46633727f2860e6428373fe4</id>
<content type='text'>
RTC periodic IRQs are only defined to work for 2^N Hz values.  This patch
moves that validity check into the infrastructure, so drivers don't need to
check it; and adds kerneldoc for the two interface functions related to
periodic IRQs.  (One of which was quite mysterious until its first use was
recently checked in!)

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&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>RTC: periodic irq fix</title>
<updated>2007-10-16T16:43:13Z</updated>
<author>
<name>Alessandro Zummo</name>
<email>alessandro.zummo@towertech.it</email>
</author>
<published>2007-10-16T08:28:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d691eb901e044065de10756ea78a5758d457c7fd'/>
<id>urn:sha1:d691eb901e044065de10756ea78a5758d457c7fd</id>
<content type='text'>
Add kernel/kernel and kernel/user locking for the periodic irq feature of
the rtc class.

PIE ioctls are also supported.

Signed-off-by: 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>
</feed>
