<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/rtc.h, branch v2.6.34-rc3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>rtc/hctosys: only claim the RTC provided the system time if it did</title>
<updated>2010-03-12T23:52:28+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2010-03-10T23:20:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d0ab4a4d5094e5d17b103dc5073529a04f00a469'/>
<id>d0ab4a4d5094e5d17b103dc5073529a04f00a469</id>
<content type='text'>
Without this patch /sys/class/rtc/$CONFIG_RTC_HCTOSYS_DEVICE/hctosys
contains a 1 (meaning "This rtc was used to initialize the system clock")
even if reading the time at bootup failed.

Moreover change error handling in rtc_hctosys() to use goto and so reduce
the indention level.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without this patch /sys/class/rtc/$CONFIG_RTC_HCTOSYS_DEVICE/hctosys
contains a 1 (meaning "This rtc was used to initialize the system clock")
even if reading the time at bootup failed.

Moreover change error handling in rtc_hctosys() to use goto and so reduce
the indention level.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.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;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: convert LEAP_YEAR into an inline</title>
<updated>2009-04-01T15:59:24+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2009-03-31T22:24:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=78d89ef40c2ff7265df077e20c4d76be7d415204'/>
<id>78d89ef40c2ff7265df077e20c4d76be7d415204</id>
<content type='text'>
- the LEAP_YEAR macro is buggy - it references its arg multiple times.
  Fix this by turning it into a C function.

- give it a more approriate name

- Move it to rtc.h so that other .c files can use it, instead of copying it.

Cc: dann frazier &lt;dannf@hp.com&gt;
Acked-by: Alessandro Zummo &lt;alessandro.zummo@towertech.it&gt;
Cc: stephane eranian &lt;eranian@googlemail.com&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- the LEAP_YEAR macro is buggy - it references its arg multiple times.
  Fix this by turning it into a C function.

- give it a more approriate name

- Move it to rtc.h so that other .c files can use it, instead of copying it.

Cc: dann frazier &lt;dannf@hp.com&gt;
Acked-by: Alessandro Zummo &lt;alessandro.zummo@towertech.it&gt;
Cc: stephane eranian &lt;eranian@googlemail.com&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&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;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: add alarm/update irq interfaces</title>
<updated>2009-01-04T21:33:20+00:00</updated>
<author>
<name>Alessandro Zummo</name>
<email>a.zummo@towertech.it</email>
</author>
<published>2009-01-04T20:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=099e657625e801adf82054c8050dde5aceb68452'/>
<id>099e657625e801adf82054c8050dde5aceb68452</id>
<content type='text'>
Add standard interfaces for alarm/update irqs enabling.  Drivers are no
more required to implement equivalent ioctl code as rtc-dev will provide
it.

UIE emulation should now be handled correctly and will work even for those
RTC drivers who cannot be configured to do both UIE and AIE.

Signed-off-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: Atsushi Nemoto &lt;anemo@mba.ocn.ne.jp&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add standard interfaces for alarm/update irqs enabling.  Drivers are no
more required to implement equivalent ioctl code as rtc-dev will provide
it.

UIE emulation should now be handled correctly and will work even for those
RTC drivers who cannot be configured to do both UIE and AIE.

Signed-off-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: Atsushi Nemoto &lt;anemo@mba.ocn.ne.jp&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/char/rtc.c: make 2 functions static</title>
<updated>2008-07-26T19:00:12+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-07-26T02:46:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9580d85f9cdb076c4bfb467bc6c0d3c5e499957a'/>
<id>9580d85f9cdb076c4bfb467bc6c0d3c5e499957a</id>
<content type='text'>
The following functions can now become static:
 - rtc_interrupt()
 - rtc_get_rtc_time()

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Acked-by: Bernhard Walle &lt;bwalle@suse.de&gt;
Acked-by: Paul Gortmaker &lt;p_gortmaker@yahoo.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following functions can now become static:
 - rtc_interrupt()
 - rtc_get_rtc_time()

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Acked-by: Bernhard Walle &lt;bwalle@suse.de&gt;
Acked-by: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: remove BKL for ioctl()</title>
<updated>2008-07-24T17:47:33+00:00</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2008-07-24T04:30:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5ad31a575157147b43fa84ef1e21471661653878'/>
<id>5ad31a575157147b43fa84ef1e21471661653878</id>
<content type='text'>
Remove implicit use of BKL in ioctl() from the RTC framework.

Instead, the rtc-&gt;ops_lock is used.  That's the same lock that already
protects the RTC operations when they're issued through the exported
rtc_*() calls in drivers/rtc/interface.c ...  making this a bugfix, not
just a cleanup, since both ioctl calls and set_alarm() need to update IRQ
enable flags and that implies a common lock (which RTC drivers as a rule
do not provide on their own).

A new comment at the declaration of "struct rtc_class_ops" summarizes
current locking rules.  It's not clear to me that the exceptions listed
there should exist ...  if not, those are pre-existing problems which can
be fixed in a patch that doesn't relate to BKL removal.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove implicit use of BKL in ioctl() from the RTC framework.

Instead, the rtc-&gt;ops_lock is used.  That's the same lock that already
protects the RTC operations when they're issued through the exported
rtc_*() calls in drivers/rtc/interface.c ...  making this a bugfix, not
just a cleanup, since both ioctl calls and set_alarm() need to update IRQ
enable flags and that implies a common lock (which RTC drivers as a rule
do not provide on their own).

A new comment at the declaration of "struct rtc_class_ops" summarizes
current locking rules.  It's not clear to me that the exceptions listed
there should exist ...  if not, those are pre-existing problems which can
be fixed in a patch that doesn't relate to BKL removal.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.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;
</pre>
</div>
</content>
</entry>
<entry>
<title>RTC: convert mutex to bitfield</title>
<updated>2007-11-29T17:24:54+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2007-11-29T00:22:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8853c202b4a91713dbfb4d9b6e1c87cc2aa12392'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>revert "rtc: Add rtc_merge_alarm()"</title>
<updated>2007-05-08T18:15:18+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2007-05-08T07:34:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=416ce32e704d778c283f2f86cadd836cd5d3696c'/>
<id>416ce32e704d778c283f2f86cadd836cd5d3696c</id>
<content type='text'>
David says "884b4aaaa242a2db8c8252796f0118164a680ab5 should be reverted.  It
added an rtc_merge_alarm() call to the 2.6.20 kernel, which hasn't yet been
used by any in-tree driver; this patch obviates the need for that call, and
uses a more robust approach."

Cc: Scott Wood &lt;scottwood@freescale.com&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
David says "884b4aaaa242a2db8c8252796f0118164a680ab5 should be reverted.  It
added an rtc_merge_alarm() call to the 2.6.20 kernel, which hasn't yet been
used by any in-tree driver; this patch obviates the need for that call, and
uses a more robust approach."

Cc: Scott Wood &lt;scottwood@freescale.com&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;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: remove rest of class_device</title>
<updated>2007-05-08T18:15:18+00:00</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2007-05-08T07:33:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cd9662094edf4173e87f0452e57e4eacc228f8ff'/>
<id>cd9662094edf4173e87f0452e57e4eacc228f8ff</id>
<content type='text'>
Finish converting the RTC framework so it no longer uses class_device.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Finish converting the RTC framework so it no longer uses class_device.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&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;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: rtc interfaces don't use class_device</title>
<updated>2007-05-08T18:15:18+00:00</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2007-05-08T07:33:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ab6a2d70d18edc7a716ef3127b9e13382faec98c'/>
<id>ab6a2d70d18edc7a716ef3127b9e13382faec98c</id>
<content type='text'>
This patch removes class_device from the programming interface that the RTC
framework exposes to the rest of the kernel.  Now an rtc_device is passed,
which is more type-safe and streamlines all the relevant code.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes class_device from the programming interface that the RTC
framework exposes to the rest of the kernel.  Now an rtc_device is passed,
which is more type-safe and streamlines all the relevant code.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&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;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: remove /sys/class/rtc-dev/*</title>
<updated>2007-05-08T18:15:18+00:00</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2007-05-08T07:33:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5726fb2012f0d96153113ddb7f988a0daea587ce'/>
<id>5726fb2012f0d96153113ddb7f988a0daea587ce</id>
<content type='text'>
This simplifies the /dev support by removing a superfluous class_device (the
/sys/class/rtc-dev stuff) and the class_interface that hooks it into the rtc
core.  Accordingly, if it's configured then /dev support is now part of the
RTC core, and is never a separate module.

It's another step towards being able to remove "struct class_device".

[bunk@stusta.de: drivers/rtc/rtc-dev.c should #include "rtc-core.h"]
Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Acked-By: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This simplifies the /dev support by removing a superfluous class_device (the
/sys/class/rtc-dev stuff) and the class_interface that hooks it into the rtc
core.  Accordingly, if it's configured then /dev support is now part of the
RTC core, and is never a separate module.

It's another step towards being able to remove "struct class_device".

[bunk@stusta.de: drivers/rtc/rtc-dev.c should #include "rtc-core.h"]
Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Acked-By: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
