<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/rtc/rtc-pcf8563.c, branch linux-3.19.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>rtc: pcf8563: clear expired alarm at boot time</title>
<updated>2014-12-11T01:41:15+00:00</updated>
<author>
<name>Jan Kardell</name>
<email>jan.kardell@telliq.com</email>
</author>
<published>2014-12-10T23:53:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a45d528aab8bcde68476b99403311422c91dc20a'/>
<id>a45d528aab8bcde68476b99403311422c91dc20a</id>
<content type='text'>
In case the card is woken up of the rtc alarm, the
devm_rtc_device_register function detects it as a pending alarm about a
month in the future.  Fix this by clearing the alarm in module probe.

Signed-off-by: Jan Kardell &lt;jan.kardell@telliq.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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>
In case the card is woken up of the rtc alarm, the
devm_rtc_device_register function detects it as a pending alarm about a
month in the future.  Fix this by clearing the alarm in module probe.

Signed-off-by: Jan Kardell &lt;jan.kardell@telliq.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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: pcf8563: save battery power</title>
<updated>2014-12-11T01:41:15+00:00</updated>
<author>
<name>Jan Kardell</name>
<email>jan.kardell@telliq.com</email>
</author>
<published>2014-12-10T23:53:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ff0bc5013aca55004034bb366232f8d2b5c6763c'/>
<id>ff0bc5013aca55004034bb366232f8d2b5c6763c</id>
<content type='text'>
According to Haoyu hym8563 datasheet this saves som power.  Might be
importat to battery life.  And maybe it works for the NXP part as well.

Signed-off-by: Jan Kardell &lt;jan.kardell@telliq.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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>
According to Haoyu hym8563 datasheet this saves som power.  Might be
importat to battery life.  And maybe it works for the NXP part as well.

Signed-off-by: Jan Kardell &lt;jan.kardell@telliq.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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: pcf8563: handle consequeces of lacking second alarm reg</title>
<updated>2014-12-11T01:41:15+00:00</updated>
<author>
<name>Jan Kardell</name>
<email>jan.kardell@telliq.com</email>
</author>
<published>2014-12-10T23:53:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=599cda555c1bf6ba9b98e28f707f7b27c8276796'/>
<id>599cda555c1bf6ba9b98e28f707f7b27c8276796</id>
<content type='text'>
To guarantee that a set alarm occurs in the future, the set alarm time
is rounded up to the nearest minute.  Also we cannot handle UIE as it
requires second precision.

Signed-off-by: Jan Kardell &lt;jan.kardell@telliq.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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>
To guarantee that a set alarm occurs in the future, the set alarm time
is rounded up to the nearest minute.  Also we cannot handle UIE as it
requires second precision.

Signed-off-by: Jan Kardell &lt;jan.kardell@telliq.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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: pcf8563: fix wrong time from read_alarm</title>
<updated>2014-12-11T01:41:15+00:00</updated>
<author>
<name>Jan Kardell</name>
<email>jan.kardell@telliq.com</email>
</author>
<published>2014-12-10T23:53:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c7aef4f88629dcd6efbf9c80c9805625e149c868'/>
<id>c7aef4f88629dcd6efbf9c80c9805625e149c868</id>
<content type='text'>
Incorrect mask was used for hour and monthday fields.

Signed-off-by: Jan Kardell &lt;jan.kardell@telliq.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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>
Incorrect mask was used for hour and monthday fields.

Signed-off-by: Jan Kardell &lt;jan.kardell@telliq.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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: pcf8563: fix write of invalid bits to ST2 reg</title>
<updated>2014-12-11T01:41:15+00:00</updated>
<author>
<name>Jan Kardell</name>
<email>jan.kardell@telliq.com</email>
</author>
<published>2014-12-10T23:53:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=45ef0458fb2b931962f8558e1fd145e63ea990ab'/>
<id>45ef0458fb2b931962f8558e1fd145e63ea990ab</id>
<content type='text'>
The NXP datasheet says:
 "Bits labeled as N should always be written with logic 0."

At least one of those bits is sometime read as a 1, therfore violating
this rule.  To fix this we mask away those bits.

Signed-off-by: Jan Kardell &lt;jan.kardell@telliq.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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 NXP datasheet says:
 "Bits labeled as N should always be written with logic 0."

At least one of those bits is sometime read as a 1, therfore violating
this rule.  To fix this we mask away those bits.

Signed-off-by: Jan Kardell &lt;jan.kardell@telliq.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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: pcf8563: remove leftover code</title>
<updated>2014-12-11T01:41:14+00:00</updated>
<author>
<name>Jan Kardell</name>
<email>jan.kardell@telliq.com</email>
</author>
<published>2014-12-10T23:53:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=17a1e5e830723f18eeb4ec00fa5a1032e378f06e'/>
<id>17a1e5e830723f18eeb4ec00fa5a1032e378f06e</id>
<content type='text'>
Remove some code that was left from before block read/write was used.

Signed-off-by: Jan Kardell &lt;jan.kardell@telliq.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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>
Remove some code that was left from before block read/write was used.

Signed-off-by: Jan Kardell &lt;jan.kardell@telliq.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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>drivers/rtc/rtc-pcf8563.c: fix pcf8563_irq() error return value</title>
<updated>2014-10-14T00:18:19+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2014-10-13T22:53:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3ff38237f183ecd8a190318e0046138b92ee5e35'/>
<id>3ff38237f183ecd8a190318e0046138b92ee5e35</id>
<content type='text'>
As pointed out by Sergei Shtylyov, the pcf8563_irq function contains a
bug in the error handling: an interrupt handler is not supposed to
return an errno value but an 'enum irqreturn'.

Let's fix this by returning IRQ_NONE in case of a communication error.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.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 pointed out by Sergei Shtylyov, the pcf8563_irq function contains a
bug in the error handling: an interrupt handler is not supposed to
return an errno value but an 'enum irqreturn'.

Let's fix this by returning IRQ_NONE in case of a communication error.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.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-pcf8563.c: fix uninitialized use warning</title>
<updated>2014-10-14T00:18:19+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2014-10-13T22:53:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e698a51239f26c370247d759da9ea016f5841fc3'/>
<id>e698a51239f26c370247d759da9ea016f5841fc3</id>
<content type='text'>
gcc-4.9 found a potential condition under which the 'pending' variable
may be used uninitialized:

  drivers/rtc/rtc-pcf8563.c: In function 'pcf8563_irq':
  drivers/rtc/rtc-pcf8563.c:173:5: warning: 'pending' may be used uninitialized in this function [-Wmaybe-uninitialized]

This is because in the pcf8563_get_alarm_mode() function, we check any
nonzero return of pcf8563_read_block_data, but in the irq function we
only check for negative values, so a possible positive value does not
get detected if the compiler chooses not to inline the entire call
chain.

Checking for any non-zero value in the interrupt handler as well is just
as correct and lets the compiler know what we are doing, without needing
a bogus initialization.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.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>
gcc-4.9 found a potential condition under which the 'pending' variable
may be used uninitialized:

  drivers/rtc/rtc-pcf8563.c: In function 'pcf8563_irq':
  drivers/rtc/rtc-pcf8563.c:173:5: warning: 'pending' may be used uninitialized in this function [-Wmaybe-uninitialized]

This is because in the pcf8563_get_alarm_mode() function, we check any
nonzero return of pcf8563_read_block_data, but in the irq function we
only check for negative values, so a possible positive value does not
get detected if the compiler chooses not to inline the entire call
chain.

Checking for any non-zero value in the interrupt handler as well is just
as correct and lets the compiler know what we are doing, without needing
a bogus initialization.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.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-pcf8563.c: add alarm support</title>
<updated>2014-08-08T22:57:20+00:00</updated>
<author>
<name>Vincent Donnefort</name>
<email>vdonnefort@gmail.com</email>
</author>
<published>2014-08-08T21:20:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ede3e9d47cca565d96613bea9213eccf91c7a2a7'/>
<id>ede3e9d47cca565d96613bea9213eccf91c7a2a7</id>
<content type='text'>
This patch adds alarm support for the NXP PCF8563 chip.

Signed-off-by: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Simon Guinot &lt;simon.guinot@sequanux.org&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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>
This patch adds alarm support for the NXP PCF8563 chip.

Signed-off-by: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Simon Guinot &lt;simon.guinot@sequanux.org&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.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>drivers/rtc/rtc-pcf8563.c: introduce read|write_block_data</title>
<updated>2014-08-08T22:57:19+00:00</updated>
<author>
<name>Vincent Donnefort</name>
<email>vdonnefort@gmail.com</email>
</author>
<published>2014-08-08T21:20:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2784366c6797e6a3078abca2f303ebf7a36290be'/>
<id>2784366c6797e6a3078abca2f303ebf7a36290be</id>
<content type='text'>
This functions allow to factorize I2C I/O operations.

Signed-off-by: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Simon Guinot &lt;simon.guinot@sequanux.org&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&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>
This functions allow to factorize I2C I/O operations.

Signed-off-by: Vincent Donnefort &lt;vdonnefort@gmail.com&gt;
Cc: Simon Guinot &lt;simon.guinot@sequanux.org&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&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>
</feed>
