<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/rtc/rtc-twl.c, branch linux-3.4.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>drivers/rtc/rtc-twl.c: fix missing device_init_wakeup() when booted with device tree</title>
<updated>2013-06-20T18:58:43+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2013-06-12T21:04:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e053ee3fe9c40827f2a3fce73b36f2f892a43292'/>
<id>e053ee3fe9c40827f2a3fce73b36f2f892a43292</id>
<content type='text'>
commit 24b8256a1fb28d357bc6fa09184ba29b4255ba5c upstream.

When booted in legacy mode device_init_wakeup() gets called by
drivers/mfd/twl-core.c when the children are initialized.  However, when
booted using device tree, the children are created with
of_platform_populate() instead add_children().

This means that the RTC driver will not have device_init_wakeup() set,
and we need to call it from the driver probe like RTC drivers typically
do.

Without this we cannot test PM wake-up events on omaps for cases where
there may not be any physical wake-up event.

Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Reported-by: Kevin Hilman &lt;khilman@linaro.org&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Jingoo Han &lt;jg1.han@samsung.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@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 24b8256a1fb28d357bc6fa09184ba29b4255ba5c upstream.

When booted in legacy mode device_init_wakeup() gets called by
drivers/mfd/twl-core.c when the children are initialized.  However, when
booted using device tree, the children are created with
of_platform_populate() instead add_children().

This means that the RTC driver will not have device_init_wakeup() set,
and we need to call it from the driver probe like RTC drivers typically
do.

Without this we cannot test PM wake-up events on omaps for cases where
there may not be any physical wake-up event.

Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Reported-by: Kevin Hilman &lt;khilman@linaro.org&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Jingoo Han &lt;jg1.han@samsung.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@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/rtc/rtc-twl.c: ensure all interrupts are disabled during probe</title>
<updated>2012-10-02T17:30:05+00:00</updated>
<author>
<name>Kevin Hilman</name>
<email>khilman@ti.com</email>
</author>
<published>2012-09-17T21:09:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6093dd2f5a10b5a071aa623be7927a6421762adb'/>
<id>6093dd2f5a10b5a071aa623be7927a6421762adb</id>
<content type='text'>
commit 8dcebaa9a0ae8a0487f4342f3d56d2cb1c980860 upstream.

On some platforms, bootloaders are known to do some interesting RTC
programming.  Without going into the obscurities as to why this may be
the case, suffice it to say the the driver should not make any
assumptions about the state of the RTC when the driver loads.  In
particular, the driver probe should be sure that all interrupts are
disabled until otherwise programmed.

This was discovered when finding bursty I2C traffic every second on
Overo platforms.  This I2C overhead was keeping the SoC from hitting
deep power states.  The cause was found to be the RTC firing every
second on the I2C-connected TWL PMIC.

Special thanks to Felipe Balbi for suggesting to look for a rogue driver
as the source of the I2C traffic rather than the I2C driver itself.

Special thanks to Steve Sakoman for helping track down the source of the
continuous RTC interrups on the Overo boards.

Signed-off-by: Kevin Hilman &lt;khilman@ti.com&gt;
Cc: Felipe Balbi &lt;balbi@ti.com&gt;
Tested-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Tested-by: Shubhrajyoti Datta &lt;omaplinuxkernel@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@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 8dcebaa9a0ae8a0487f4342f3d56d2cb1c980860 upstream.

On some platforms, bootloaders are known to do some interesting RTC
programming.  Without going into the obscurities as to why this may be
the case, suffice it to say the the driver should not make any
assumptions about the state of the RTC when the driver loads.  In
particular, the driver probe should be sure that all interrupts are
disabled until otherwise programmed.

This was discovered when finding bursty I2C traffic every second on
Overo platforms.  This I2C overhead was keeping the SoC from hitting
deep power states.  The cause was found to be the RTC firing every
second on the I2C-connected TWL PMIC.

Special thanks to Felipe Balbi for suggesting to look for a rogue driver
as the source of the I2C traffic rather than the I2C driver itself.

Special thanks to Steve Sakoman for helping track down the source of the
continuous RTC interrups on the Overo boards.

Signed-off-by: Kevin Hilman &lt;khilman@ti.com&gt;
Cc: Felipe Balbi &lt;balbi@ti.com&gt;
Tested-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Tested-by: Shubhrajyoti Datta &lt;omaplinuxkernel@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@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/rtc/rtc-twl.c: use static register while reading time</title>
<updated>2012-04-12T20:12:12+00:00</updated>
<author>
<name>Konstantin Shlyakhovoy</name>
<email>x0155534@ti.com</email>
</author>
<published>2012-04-12T19:49:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f3ec434c69ac7f447ff6e6389c19727c9f002087'/>
<id>f3ec434c69ac7f447ff6e6389c19727c9f002087</id>
<content type='text'>
RTC stores time and date in several registers.  Due to the fact that
these registers can't be read instantaneously, there is a chance that
reading from counting registers gives an error of one minute, one hour,
one day, etc.

To address this issue, the RTC has hardware support to copy the RTC
counting registers to static shadowed registers.  The current
implementation does not use this feature, and in a stress test, we can
reproduce this error at a rate of around two times per 300000 readings.

Fix the implementation to ensure that the right snapshot of time is
captured.

Signed-off-by: Konstantin Shlyakhovoy &lt;x0155534@ti.com&gt;
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Benoit Cousson &lt;b-cousson@ti.com&gt;
Cc: linux-omap &lt;linux-omap@vger.kernel.org&gt;
Acked-by: Mykola Oleksiienko &lt;x0174904@ti.com&gt;
Acked-by: Oleksandr Dmytryshyn &lt;oleksandr.dmytryshyn@ti.com&gt;
Acked-by: Graeme Gregory &lt;gg@slimlogic.co.uk&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 stores time and date in several registers.  Due to the fact that
these registers can't be read instantaneously, there is a chance that
reading from counting registers gives an error of one minute, one hour,
one day, etc.

To address this issue, the RTC has hardware support to copy the RTC
counting registers to static shadowed registers.  The current
implementation does not use this feature, and in a stress test, we can
reproduce this error at a rate of around two times per 300000 readings.

Fix the implementation to ensure that the right snapshot of time is
captured.

Signed-off-by: Konstantin Shlyakhovoy &lt;x0155534@ti.com&gt;
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Benoit Cousson &lt;b-cousson@ti.com&gt;
Cc: linux-omap &lt;linux-omap@vger.kernel.org&gt;
Acked-by: Mykola Oleksiienko &lt;x0174904@ti.com&gt;
Acked-by: Oleksandr Dmytryshyn &lt;oleksandr.dmytryshyn@ti.com&gt;
Acked-by: Graeme Gregory &lt;gg@slimlogic.co.uk&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/rtc/rtc-twl.c: return correct RTC event from ISR</title>
<updated>2012-03-23T23:58:39+00:00</updated>
<author>
<name>Venu Byravarasu</name>
<email>vbyravarasu@nvidia.com</email>
</author>
<published>2012-03-23T22:02:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2778ebcc09c002cccdbd6b5509b5cbf4161b486d'/>
<id>2778ebcc09c002cccdbd6b5509b5cbf4161b486d</id>
<content type='text'>
Following changes are made as part of this change:

1. As TWL RTC supports periodic interrupt, the correct event should be
   RTC_PF instead of RTC_UF.

2. No need to initialize variable "events" to 0 &amp; then OR it with the
   event values.  Hence fixing it.

Signed-off-by: Venu Byravarasu &lt;vbyravarasu@nvidia.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>
Following changes are made as part of this change:

1. As TWL RTC supports periodic interrupt, the correct event should be
   RTC_PF instead of RTC_UF.

2. No need to initialize variable "events" to 0 &amp; then OR it with the
   event values.  Hence fixing it.

Signed-off-by: Venu Byravarasu &lt;vbyravarasu@nvidia.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>drivers/rtc/rtc-twl.c: simplify RTC interrupt clearing</title>
<updated>2012-03-23T23:58:39+00:00</updated>
<author>
<name>Venu Byravarasu</name>
<email>vbyravarasu@nvidia.com</email>
</author>
<published>2012-03-23T22:02:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=94a339d016e26f96a1bd9e08306c857825c91a66'/>
<id>94a339d016e26f96a1bd9e08306c857825c91a66</id>
<content type='text'>
For clearing RTC interrupt, programming ALARM bit only is sufficient, as
all other bits are any way not affected by writing 0 to them.

Hence removed unwanted OR operation.

Signed-off-by: Venu Byravarasu &lt;vbyravarasu@nvidia.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>
For clearing RTC interrupt, programming ALARM bit only is sufficient, as
all other bits are any way not affected by writing 0 to them.

Hence removed unwanted OR operation.

Signed-off-by: Venu Byravarasu &lt;vbyravarasu@nvidia.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>drivers/rtc/rtc-twl.c: enable RTC irrespective of its prior state</title>
<updated>2012-03-23T23:58:39+00:00</updated>
<author>
<name>Venu Byravarasu</name>
<email>vbyravarasu@nvidia.com</email>
</author>
<published>2012-03-23T22:02:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f7439bcb74aca4234fedc336a21e169e6e33bb2e'/>
<id>f7439bcb74aca4234fedc336a21e169e6e33bb2e</id>
<content type='text'>
As part of probe, before enabling RTC, RTC_CTRL register is read to check
if it is already running.  If RTC is used by kernel alone, then this read
is not required.  Even if RTC was enabled already by boot loader, setting
STOP_RTC bit again should not harm.  Hence removed unwanted read
operation.

Signed-off-by: Venu Byravarasu &lt;vbyravarasu@nvidia.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>
As part of probe, before enabling RTC, RTC_CTRL register is read to check
if it is already running.  If RTC is used by kernel alone, then this read
is not required.  Even if RTC was enabled already by boot loader, setting
STOP_RTC bit again should not harm.  Hence removed unwanted read
operation.

Signed-off-by: Venu Byravarasu &lt;vbyravarasu@nvidia.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>drivers/rtc/rtc-twl.c: optimize IRQ bit access</title>
<updated>2012-03-23T23:58:39+00:00</updated>
<author>
<name>Venu Byravarasu</name>
<email>vbyravarasu@nvidia.com</email>
</author>
<published>2012-03-23T22:02:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ce9f650636d310e4c8febc821b0038e9918a12db'/>
<id>ce9f650636d310e4c8febc821b0038e9918a12db</id>
<content type='text'>
As the TWL RTC driver has a cached copy of enabled RTC interrupt bits in
variable rtc_irq_bits, that can be checked before really setting or
masking any of the interrupt bits.

Signed-off-by: Venu Byravarasu &lt;vbyravarasu@nvidia.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>
As the TWL RTC driver has a cached copy of enabled RTC interrupt bits in
variable rtc_irq_bits, that can be checked before really setting or
masking any of the interrupt bits.

Signed-off-by: Venu Byravarasu &lt;vbyravarasu@nvidia.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>drivers/rtc/rtc-twl.c: add DT support for RTC inside twl4030/twl6030</title>
<updated>2012-01-11T00:30:53+00:00</updated>
<author>
<name>Benoit Cousson</name>
<email>b-cousson@ti.com</email>
</author>
<published>2012-01-10T23:10:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=948170f8944dfd29d13612fff48110a9814daeb1'/>
<id>948170f8944dfd29d13612fff48110a9814daeb1</id>
<content type='text'>
Add the DT support for the TI rtc-twl present in the twl4030 and twl6030
devices.

Signed-off-by: Benoit Cousson &lt;b-cousson@ti.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>
Add the DT support for the TI rtc-twl present in the twl4030 and twl6030
devices.

Signed-off-by: Benoit Cousson &lt;b-cousson@ti.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: twl: Fix registration vs. init order</title>
<updated>2011-08-27T00:26:54+00:00</updated>
<author>
<name>Todd Poynor</name>
<email>toddpoynor@google.com</email>
</author>
<published>2011-08-11T03:20:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7e72c686347562b4a275c97b4bdd7a79c1f23c65'/>
<id>7e72c686347562b4a275c97b4bdd7a79c1f23c65</id>
<content type='text'>
Only register as an RTC device after the hardware has been
successfully initialized.  The RTC class driver will call
back to this driver to read a pending alarm, and other
drivers watching for new devices on the RTC class may
read the RTC time upon registration.  Such access might
occur while the RTC is stopped, prior to clearing
pending alarms, etc.

The new ordering also avoids leaving the platform
device drvdata set to an unregistered struct rtc_device *
on probe errors.

Signed-off-by: Todd Poynor &lt;toddpoynor@google.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only register as an RTC device after the hardware has been
successfully initialized.  The RTC class driver will call
back to this driver to read a pending alarm, and other
drivers watching for new devices on the RTC class may
read the RTC time upon registration.  Such access might
occur while the RTC is stopped, prior to clearing
pending alarms, etc.

The new ordering also avoids leaving the platform
device drvdata set to an unregistered struct rtc_device *
on probe errors.

Signed-off-by: Todd Poynor &lt;toddpoynor@google.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: rtc-twl: Remove lockdep related local_irq_enable()</title>
<updated>2011-08-10T22:54:26+00:00</updated>
<author>
<name>Sebastian Reichel</name>
<email>sre@debian.org</email>
</author>
<published>2011-05-31T08:51:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=34d623d11316cb69f9e8cc5eb50d3792b5c302b6'/>
<id>34d623d11316cb69f9e8cc5eb50d3792b5c302b6</id>
<content type='text'>
Now that the irq is properly threaded (due to it needing i2c access)
we should also remove the local_irq_enable() call in twl_rtc_interrupt.
Testing this with Pandaboard, the RTC is still working.

[Reworked commit message -jstultz]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the irq is properly threaded (due to it needing i2c access)
we should also remove the local_irq_enable() call in twl_rtc_interrupt.
Testing this with Pandaboard, the RTC is still working.

[Reworked commit message -jstultz]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
