<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/rtc/rtc-cmos.c, branch v2.6.38</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>rtc-cmos: fix suspend/resume</title>
<updated>2011-01-13T16:03:12+00:00</updated>
<author>
<name>Paul Fox</name>
<email>pgf@laptop.org</email>
</author>
<published>2011-01-13T01:00:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2fb08e6ca9f00d1aedb3964983e9c8f84b36b807'/>
<id>2fb08e6ca9f00d1aedb3964983e9c8f84b36b807</id>
<content type='text'>
rtc-cmos was setting suspend/resume hooks at the device_driver level.
However, the platform bus code (drivers/base/platform.c) only looks for
resume hooks at the dev_pm_ops level, or within the platform_driver.

Switch rtc_cmos to use dev_pm_ops so that suspend/resume code is executed
again.

Paul said:

: The user visible symptom in our (XO laptop) case was that rtcwake would
: fail to wake the laptop.  The RTC alarm would expire, but the wakeup
: wasn't unmasked.
:
: As for severity, the impact may have been reduced because if I recall
: correctly, the bug only affected platforms with CONFIG_PNP disabled.

Signed-off-by: Paul Fox &lt;pgf@laptop.org&gt;
Signed-off-by: Daniel Drake &lt;dsd@laptop.org&gt;
Acked-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.37.x]
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-cmos was setting suspend/resume hooks at the device_driver level.
However, the platform bus code (drivers/base/platform.c) only looks for
resume hooks at the dev_pm_ops level, or within the platform_driver.

Switch rtc_cmos to use dev_pm_ops so that suspend/resume code is executed
again.

Paul said:

: The user visible symptom in our (XO laptop) case was that rtcwake would
: fail to wake the laptop.  The RTC alarm would expire, but the wakeup
: wasn't unmasked.
:
: As for severity, the impact may have been reduced because if I recall
: correctly, the bug only affected platforms with CONFIG_PNP disabled.

Signed-off-by: Paul Fox &lt;pgf@laptop.org&gt;
Signed-off-by: Daniel Drake &lt;dsd@laptop.org&gt;
Acked-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.37.x]
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-cmos.c : Fix warning on PowerPC</title>
<updated>2010-11-29T04:48:19+00:00</updated>
<author>
<name>Srikanth Krishnakar</name>
<email>skrishna@mvista.com</email>
</author>
<published>2010-10-14T04:03:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8cb7c71bda16e2d67a332642661e0b4219641a23'/>
<id>8cb7c71bda16e2d67a332642661e0b4219641a23</id>
<content type='text'>
The following warning is seen while compilation of PowerPC kernel:

 CC      drivers/rtc/rtc-cmos.o
drivers/rtc/rtc-cmos.c:697:2: warning: #warning Assuming 128 bytes
of RTC+NVRAM address space, not 64 bytes.

Fix it by adding defined(__powerpc__).

Signed-off-by: Srikanth Krishnakar &lt;skrishna@mvista.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following warning is seen while compilation of PowerPC kernel:

 CC      drivers/rtc/rtc-cmos.o
drivers/rtc/rtc-cmos.c:697:2: warning: #warning Assuming 128 bytes
of RTC+NVRAM address space, not 64 bytes.

Fix it by adding defined(__powerpc__).

Signed-off-by: Srikanth Krishnakar &lt;skrishna@mvista.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/rtc: remove unneeded ifdef CONFIG_PM</title>
<updated>2010-08-11T15:59:08+00:00</updated>
<author>
<name>Christian Dietrich</name>
<email>qy03fugy@stud.informatik.uni-erlangen.de</email>
</author>
<published>2010-08-11T01:02:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=de639c311689f4dbf3f9df734a8243e7e44b79da'/>
<id>de639c311689f4dbf3f9df734a8243e7e44b79da</id>
<content type='text'>
Because CONFIG_PM is a precondition to CONFIG_ACPI, the ifdef CONFIG_PM
within ifdef CONFIG_ACPI is redundant.

Signed-off-by: Christian Dietrich &lt;qy03fugy@stud.informatik.uni-erlangen.de&gt;
Acked-by: 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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because CONFIG_PM is a precondition to CONFIG_ACPI, the ifdef CONFIG_PM
within ifdef CONFIG_ACPI is redundant.

Signed-off-by: Christian Dietrich &lt;qy03fugy@stud.informatik.uni-erlangen.de&gt;
Acked-by: 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;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc-cmos: do dev_set_drvdata() earlier in the initialization</title>
<updated>2010-05-25T15:07:08+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-05-24T21:33:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6ba8bcd457d9fc793ac9435aa2e4138f571d4ec5'/>
<id>6ba8bcd457d9fc793ac9435aa2e4138f571d4ec5</id>
<content type='text'>
The bug is an oops when dev_get_drvdata() returned null in
cmos_update_irq_enable().  The call tree looks like this:
  rtc_dev_ioctl()
    =&gt; rtc_update_irq_enable()
      =&gt; cmos_update_irq_enable()

It's caused by a race condition in the module initialization.  It is
rtc_device_register() which makes the ioctl operations live so I moved
the call to dev_set_drvdata() before the call to rtc_device_register().

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=15963

Reported-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Tested-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Cc: Malte Schroder &lt;maltesch@gmx.de&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Herton Ronaldo Krzesinski &lt;herton@mandriva.com.br&gt;
Cc: &lt;stable@kernel.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>
The bug is an oops when dev_get_drvdata() returned null in
cmos_update_irq_enable().  The call tree looks like this:
  rtc_dev_ioctl()
    =&gt; rtc_update_irq_enable()
      =&gt; cmos_update_irq_enable()

It's caused by a race condition in the module initialization.  It is
rtc_device_register() which makes the ioctl operations live so I moved
the call to dev_set_drvdata() before the call to rtc_device_register().

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=15963

Reported-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Tested-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Cc: Malte Schroder &lt;maltesch@gmx.de&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Herton Ronaldo Krzesinski &lt;herton@mandriva.com.br&gt;
Cc: &lt;stable@kernel.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>RTC: rtc-cmos: Fix binary mode support</title>
<updated>2010-05-21T20:31:19+00:00</updated>
<author>
<name>Arnaud Patard</name>
<email>apatard@mandriva.com</email>
</author>
<published>2010-04-29T09:58:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3804a89bfb84fb8849c72e3bbafddaee539b3430'/>
<id>3804a89bfb84fb8849c72e3bbafddaee539b3430</id>
<content type='text'>
As a follow-up to the thread about RTC support for some Loongson 2E/2F
boards, this patch tries to address the "REVISIT"/"FIXME" comments about
rtc binary mode handling and allow rtc to work with rtc in binary mode.
I've also raised the message about 24-h mode not supported to warning
otherwise, one may end up with no rtc without any message in the kernel
log.

Signed-off-by: Arnaud Patard &lt;apatard@mandriva.com&gt;
To: linux-mips@linux-mips.org
To: rtc-linux@googlegroups.com
Cc: david-b@pacbell.net
Cc: a.zummo@towertech.it
Cc: akpm@linux-foundation.org
Patchwork: http://patchwork.linux-mips.org/patch/1158/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As a follow-up to the thread about RTC support for some Loongson 2E/2F
boards, this patch tries to address the "REVISIT"/"FIXME" comments about
rtc binary mode handling and allow rtc to work with rtc in binary mode.
I've also raised the message about 24-h mode not supported to warning
otherwise, one may end up with no rtc without any message in the kernel
log.

Signed-off-by: Arnaud Patard &lt;apatard@mandriva.com&gt;
To: linux-mips@linux-mips.org
To: rtc-linux@googlegroups.com
Cc: david-b@pacbell.net
Cc: a.zummo@towertech.it
Cc: akpm@linux-foundation.org
Patchwork: http://patchwork.linux-mips.org/patch/1158/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: add struct file* to bin_attr callbacks</title>
<updated>2010-05-21T16:37:31+00:00</updated>
<author>
<name>Chris Wright</name>
<email>chrisw@sous-sol.org</email>
</author>
<published>2010-05-13T01:28:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2c3c8bea608866d8bd9dcf92657d57fdcac011c5'/>
<id>2c3c8bea608866d8bd9dcf92657d57fdcac011c5</id>
<content type='text'>
This allows bin_attr-&gt;read,write,mmap callbacks to check file specific data
(such as inode owner) as part of any privilege validation.

Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows bin_attr-&gt;read,write,mmap callbacks to check file specific data
(such as inode owner) as part of any privilege validation.

Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>rtc_cmos: convert shutdown to new pnp_driver-&gt;shutdown</title>
<updated>2010-01-11T17:34:07+00:00</updated>
<author>
<name>OGAWA Hirofumi</name>
<email>hirofumi@mail.parknet.co.jp</email>
</author>
<published>2010-01-08T22:43:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=004731b2c7c658d36bee167cb1e1a399c2cbccc9'/>
<id>004731b2c7c658d36bee167cb1e1a399c2cbccc9</id>
<content type='text'>
commit abd6633c67925f90775bb74755f9c547e30f1f20 ("pnp: add a shutdown
method to pnp drivers") adds shutdown method to bus driver blindly.  With
it, driver-&gt;shutdown is no longer valid.

Use pnp_driver-&gt;shutdown instead.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14889

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Reported-by: Malte Schröder &lt;maltesch@gmx.de&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Cc: David Hardeman &lt;david@hardeman.nu&gt;
Cc: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.32.x]
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>
commit abd6633c67925f90775bb74755f9c547e30f1f20 ("pnp: add a shutdown
method to pnp drivers") adds shutdown method to bus driver blindly.  With
it, driver-&gt;shutdown is no longer valid.

Use pnp_driver-&gt;shutdown instead.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14889

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Reported-by: Malte Schröder &lt;maltesch@gmx.de&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Cc: David Hardeman &lt;david@hardeman.nu&gt;
Cc: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.32.x]
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-cmos.c: Fix warning on MIPS</title>
<updated>2009-12-17T01:57:37+00:00</updated>
<author>
<name>Wu Zhangjin</name>
<email>wuzhangjin@gmail.com</email>
</author>
<published>2009-11-05T01:21:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=95abd0dfaf5d2741dc9ebe733c9d609629a92b77'/>
<id>95abd0dfaf5d2741dc9ebe733c9d609629a92b77</id>
<content type='text'>
This patch fixes the following warning with RTC_LIB on MIPS:

drivers/rtc/rtc-cmos.c:697:2: warning: #warning Assuming 128 bytes of
RTC+NVRAM address space, not 64 bytes.

Signed-off-by: Wu Zhangjin &lt;wuzhangjin@gmail.com&gt;
Cc: Arnaud Patard &lt;apatard@mandriva.com&gt;
Cc: linux-mips@linux-mips.org
Cc: rtc-linux@googlegroups.com
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Patchwork: http://patchwork.linux-mips.org/patch/570/
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the following warning with RTC_LIB on MIPS:

drivers/rtc/rtc-cmos.c:697:2: warning: #warning Assuming 128 bytes of
RTC+NVRAM address space, not 64 bytes.

Signed-off-by: Wu Zhangjin &lt;wuzhangjin@gmail.com&gt;
Cc: Arnaud Patard &lt;apatard@mandriva.com&gt;
Cc: linux-mips@linux-mips.org
Cc: rtc-linux@googlegroups.com
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Patchwork: http://patchwork.linux-mips.org/patch/570/
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc-cmos: convert RTC_AIE/RTC_UIE to rtc irq API</title>
<updated>2009-12-16T15:19:58+00:00</updated>
<author>
<name>Herton Ronaldo Krzesinski</name>
<email>herton@mandriva.com.br</email>
</author>
<published>2009-12-16T00:45:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a8462ef63c961639a743f9fcddf408da46641281'/>
<id>a8462ef63c961639a743f9fcddf408da46641281</id>
<content type='text'>
Drop ioctl function that handles RTC_AIE/RTC_UIE, and use instead the
rtc subsystem API (alarm_irq_enable/update_irq_enable callbacks).

Signed-off-by: Herton Ronaldo Krzesinski &lt;herton@mandriva.com.br&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>
Drop ioctl function that handles RTC_AIE/RTC_UIE, and use instead the
rtc subsystem API (alarm_irq_enable/update_irq_enable callbacks).

Signed-off-by: Herton Ronaldo Krzesinski &lt;herton@mandriva.com.br&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: disable hpet emulation on suspend</title>
<updated>2009-12-16T15:19:58+00:00</updated>
<author>
<name>Maxim Levitsky</name>
<email>maximlevitsky@gmail.com</email>
</author>
<published>2009-12-16T00:45:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d1b2efa83fbf7b33919238fa29ef6ab935820103'/>
<id>d1b2efa83fbf7b33919238fa29ef6ab935820103</id>
<content type='text'>
I noticed that rtc wont generate interrupts after a resume from disk.
Here hpet rtc emulation is used.

Problem is that rtc hpet comparator, isn't reinitialized after resume.
Easiest way to solve this, is always mask all hpet interrupts on suspend
This is triggered, when suspending with alarm set.

Otherwise, hpet driver will think it doesn't need to reinitialize
the rtc comparator, thus rtc interrupts won't work.

This emulation isn't need for wakealarm.

Signed-off-by: Maxim Levitsky &lt;maximlevitsky@gmail.com&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&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>
I noticed that rtc wont generate interrupts after a resume from disk.
Here hpet rtc emulation is used.

Problem is that rtc hpet comparator, isn't reinitialized after resume.
Easiest way to solve this, is always mask all hpet interrupts on suspend
This is triggered, when suspending with alarm set.

Otherwise, hpet driver will think it doesn't need to reinitialize
the rtc comparator, thus rtc interrupts won't work.

This emulation isn't need for wakealarm.

Signed-off-by: Maxim Levitsky &lt;maximlevitsky@gmail.com&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&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>
