<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/rtc, branch v2.6.33.8</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/rtc?h=v2.6.33.8</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/rtc?h=v2.6.33.8'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-03-21T19:44:53Z</updated>
<entry>
<title>rtc-cmos: fix suspend/resume</title>
<updated>2011-03-21T19:44:53Z</updated>
<author>
<name>Paul Fox</name>
<email>pgf@laptop.org</email>
</author>
<published>2011-01-13T01:00:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5daa2a8aec9f4f2ad3cdb8a0ba9a61597aa5f898'/>
<id>urn:sha1:5daa2a8aec9f4f2ad3cdb8a0ba9a61597aa5f898</id>
<content type='text'>
commit 2fb08e6ca9f00d1aedb3964983e9c8f84b36b807 upstream.

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;
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 ds1388 time corruption</title>
<updated>2010-08-02T17:26:38Z</updated>
<author>
<name>Joakim Tjernlund</name>
<email>Joakim.Tjernlund@transmode.se</email>
</author>
<published>2010-06-29T22:05:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5699b0883450cf40ea96ec7d471e1a38b16e9ed7'/>
<id>urn:sha1:5699b0883450cf40ea96ec7d471e1a38b16e9ed7</id>
<content type='text'>
commit 96fc3a45ea073136566f3c2676cad52f8b39a7df upstream.

The ds1307 driver misreads the ds1388 registers when checking for 12 or 24
hour mode.  Instead of checking the hour register it reads the minute
register.  Therefore the driver thinks minutes &gt;= 40 has the 12HR bit set
and resets the minute register by zeroing the high bits.  This results in
minutes are reset to 0-9, jumping back in time 40 or 50 minutes.  The time
jump is also written back to the RTC.

Signed-off-by: Joakim Tjernlund &lt;Joakim.Tjernlund@transmode.se&gt;
Cc: Wan ZongShun &lt;mcuos.com@gmail.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: 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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>rtc: s3c: initialize driver data before using it</title>
<updated>2010-07-05T18:15:52Z</updated>
<author>
<name>Maurus Cuelenaere</name>
<email>mcuelenaere@gmail.com</email>
</author>
<published>2010-06-04T21:14:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c6ce79a12ca1f207fa485f0ad535e21338dc9c6d'/>
<id>urn:sha1:c6ce79a12ca1f207fa485f0ad535e21338dc9c6d</id>
<content type='text'>
commit e893de59a4982791368b3ce412bc67dd601a88a0 upstream.

s3c_rtc_setfreq() uses the platform driver data to derive struct rtc_device,
so make sure drvdata is set _before_ s3c_rtc_setfreq() is called.

Signed-off-by: Maurus Cuelenaere &lt;mcuelenaere@gmail.com&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Maurus Cuelenaere &lt;mcuelenaere@gmail.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-cmos: do dev_set_drvdata() earlier in the initialization</title>
<updated>2010-07-05T18:15:51Z</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-05-24T21:33:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b21fd1baa423415ee806fee4cdfe473c020522d4'/>
<id>urn:sha1:b21fd1baa423415ee806fee4cdfe473c020522d4</id>
<content type='text'>
commit 6ba8bcd457d9fc793ac9435aa2e4138f571d4ec5 upstream.

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;
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-coh901331: fix braces in resume code</title>
<updated>2010-03-15T16:07:05Z</updated>
<author>
<name>James Hogan</name>
<email>james@albanarts.com</email>
</author>
<published>2010-03-05T21:44:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1f2ba616b4a048ce7c4151fad1dbb92a8c93ac38'/>
<id>urn:sha1:1f2ba616b4a048ce7c4151fad1dbb92a8c93ac38</id>
<content type='text'>
commit 5a98c04d78c896d52baef20ffc11f6d1ba6eb786 upstream.

The else part of the if statement is indented but does not have braces
around it. It clearly should since it uses clk_enable and clk_disable
which are supposed to balance.

Signed-off-by: James Hogan &lt;james@albanarts.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@stericsson.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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>rtc-core: fix memory leak</title>
<updated>2010-03-15T16:05:58Z</updated>
<author>
<name>Aaro Koskinen</name>
<email>aaro.koskinen@nokia.com</email>
</author>
<published>2010-03-05T21:44:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4d57ebd581a5dc9e1fdb6b59c34ddec72013f5b8'/>
<id>urn:sha1:4d57ebd581a5dc9e1fdb6b59c34ddec72013f5b8</id>
<content type='text'>
commit 2a7a06a0cdd86d572e91657603180da5992be6d3 upstream.

The idr should be destroyed when the module is unloaded. Found with
kmemleak.

Signed-off-by: Aaro Koskinen &lt;aaro.koskinen@nokia.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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>rtc-fm3130: add missing braces</title>
<updated>2010-02-03T02:11:21Z</updated>
<author>
<name>Sergey Matyukevich</name>
<email>geomatsi@gmail.com</email>
</author>
<published>2010-02-02T21:43:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f4b5162820de60204afa5c8639335f4931b7fb0c'/>
<id>urn:sha1:f4b5162820de60204afa5c8639335f4931b7fb0c</id>
<content type='text'>
Add missing braces for multiline 'if' statements in fm3130_probe.

Signed-off-by: Sergey Matyukevich &lt;geomatsi@gmail.com&gt;
Signed-off-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Sergey Lapin &lt;slapin@ossfans.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>
<entry>
<title>rtc_cmos: convert shutdown to new pnp_driver-&gt;shutdown</title>
<updated>2010-01-11T17:34:07Z</updated>
<author>
<name>OGAWA Hirofumi</name>
<email>hirofumi@mail.parknet.co.jp</email>
</author>
<published>2010-01-08T22:43:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=004731b2c7c658d36bee167cb1e1a399c2cbccc9'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus</title>
<updated>2009-12-18T00:38:06Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-12-18T00:38:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dbfc985195410dad803c845743c63cd73bd1fe32'/>
<id>urn:sha1:dbfc985195410dad803c845743c63cd73bd1fe32</id>
<content type='text'>
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (71 commits)
  MIPS: Lasat: Fix botched changes to sysctl code.
  RTC: rtc-cmos.c: Fix warning on MIPS
  MIPS: Cleanup random differences beween lmo and Linus' kernel.
  MIPS: No longer hardwire CONFIG_EMBEDDED to y
  MIPS: Fix and enhance built-in kernel command line
  MIPS: eXcite: Remove platform.
  MIPS: Loongson: Cleanups of serial port support
  MIPS: Lemote 2F: Suspend CS5536 MFGPT Timer
  MIPS: Excite: move iodev_remove to .devexit.text
  MIPS: Lasat: Convert to proc_fops / seq_file
  MIPS: Cleanup signal code initialization
  MIPS: Modularize COP2 handling
  MIPS: Move EARLY_PRINTK to Kconfig.debug
  MIPS: Yeeloong 2F: Cleanup reset logic using the new ec_write function
  MIPS: Yeeloong 2F: Add LID open event as the wakeup event
  MIPS: Yeeloong 2F: Add basic EC operations
  MIPS: Move several variables from .bss to .init.data
  MIPS: Tracing: Make function graph tracer work with -mmcount-ra-address
  MIPS: Tracing: Reserve $12(t0) for mcount-ra-address of gcc 4.5
  MIPS: Tracing: Make ftrace for MIPS work without -fno-omit-frame-pointer
  ...
</content>
</entry>
<entry>
<title>rtc: set wakeup capability for I2C and SPI RTC drivers</title>
<updated>2009-12-17T23:45:32Z</updated>
<author>
<name>Anton Vorontsov</name>
<email>avorontsov@ru.mvista.com</email>
</author>
<published>2009-12-17T23:27:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=26b3c01f7debc1bbc3117bc9c9e016ca6f2e41d5'/>
<id>urn:sha1:26b3c01f7debc1bbc3117bc9c9e016ca6f2e41d5</id>
<content type='text'>
RTC core won't allow wakeup alarms to be set if RTC devices' parent (i.e.
i2c_client or spi_device) isn't wakeup capable.

For I2C devices there is I2C_CLIENT_WAKE flag exists that we can pass via
board info, and if set, I2C core will initialize wakeup capability.  For
SPI devices there is no such flag at all.

I believe that it's not platform code responsibility to allow or disallow
wakeups, instead, drivers themselves should set the capability if a device
can trigger wakeups.

That's what drivers/base/power/sysfs.c says:

 * It is the responsibility of device drivers to enable (or disable)
 * wakeup signaling as part of changing device power states, respecting
 * the policy choices provided through the driver model.

I2C and SPI RTC devices send wakeup events via interrupt lines, so we
should set the wakeup capability if IRQ is routed.

Ideally we should also check irq for wakeup capability before setting
device's capability, i.e.

	if (can_irq_wake(irq))
		device_set_wakeup_capable(&amp;client-&gt;dev, 1);

But there is no can_irq_wake() call exist, and it is not that trivial to
implement it for all interrupts controllers and complex/cascaded setups.

drivers/base/power/sysfs.c also covers these cases:

 * Devices may not be able to generate wakeup events from all power
 * states.  Also, the events may be ignored in some configurations;
 * for example, they might need help from other devices that aren't
 * active

So there is no guarantee that wakeup will actually work, and so I think
there is no point in being pedantic wrt checking IRQ wakeup capability.

Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Ben Dooks &lt;ben-linux@fluff.org&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&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>
</feed>
