<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/rtc/rtc-ds1307.c, branch v4.10</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: ds1307: Add ACPI support</title>
<updated>2016-12-18T23:59:07+00:00</updated>
<author>
<name>Tin Huynh</name>
<email>tnhuynh@apm.com</email>
</author>
<published>2016-11-30T02:57:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9c19b8930d2cf95f5dc5ec11610400a7c61845d1'/>
<id>9c19b8930d2cf95f5dc5ec11610400a7c61845d1</id>
<content type='text'>
This patch enables ACPI support for rtc-ds1307 driver.

Signed-off-by: Tin Huynh &lt;tnhuynh@apm.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch enables ACPI support for rtc-ds1307 driver.

Signed-off-by: Tin Huynh &lt;tnhuynh@apm.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1307: add Intersil ISL12057 support</title>
<updated>2016-08-31T16:21:34+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@free-electrons.com</email>
</author>
<published>2016-07-13T00:36:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=78aaa06d7956dc4cd42fff5033f4bf6fafcbc79f'/>
<id>78aaa06d7956dc4cd42fff5033f4bf6fafcbc79f</id>
<content type='text'>
Intersil ISL12057 is a drop-in replacement for DS1337. It can be supported
by the ds1307 driver.

Acked-by: Arnaud Ebalard &lt;arno@natisbad.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Intersil ISL12057 is a drop-in replacement for DS1337. It can be supported
by the ds1307 driver.

Acked-by: Arnaud Ebalard &lt;arno@natisbad.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1307: fix century bit support</title>
<updated>2016-08-31T16:21:34+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@free-electrons.com</email>
</author>
<published>2016-07-13T00:26:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=50d6c0ea8111100a102c03b4410ba1e45fa8b771'/>
<id>50d6c0ea8111100a102c03b4410ba1e45fa8b771</id>
<content type='text'>
Add an option to properly support the century bit of ds1337 and compatibles
and ds1340.
Because the driver had a bug until now, it is not possible to switch users
to the fixed code directly as RTCs in the field will wrongly have the
century bit set.

Acked-by: Arnaud Ebalard &lt;arno@natisbad.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an option to properly support the century bit of ds1337 and compatibles
and ds1340.
Because the driver had a bug until now, it is not possible to switch users
to the fixed code directly as RTCs in the field will wrongly have the
century bit set.

Acked-by: Arnaud Ebalard &lt;arno@natisbad.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: simplify implementations of read_alarm</title>
<updated>2016-07-09T08:24:45+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>uwe@kleine-koenig.org</email>
</author>
<published>2016-06-28T08:43:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=56d86a7e799d3d893cb96f5b17b13de134af8de5'/>
<id>56d86a7e799d3d893cb96f5b17b13de134af8de5</id>
<content type='text'>
Since commit d68778b80dd7 ("rtc: initialize output parameter for read
alarm to "uninitialized"") there is no need to explicitly set
unsupported members to -1. So drop the respective assignments from
drivers.

Signed-off-by: Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit d68778b80dd7 ("rtc: initialize output parameter for read
alarm to "uninitialized"") there is no need to explicitly set
unsupported members to -1. So drop the respective assignments from
drivers.

Signed-off-by: Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1307: Fix relying on reset value for weekday</title>
<updated>2016-07-09T08:24:44+00:00</updated>
<author>
<name>Keerthy</name>
<email>j-keerthy@ti.com</email>
</author>
<published>2016-06-01T10:49:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e29385fab0bf94017fac130ee32f5bb2daf74417'/>
<id>e29385fab0bf94017fac130ee32f5bb2daf74417</id>
<content type='text'>
The reset value of weekday is 0x1. This is wrong since
the reset values of the day/month/year make up to Jan 1 2001.
When computed weekday comes out to be Monday. On a scale
of 1-7(Sunday - Saturday) it should be 0x2. So we should not
be relying on the reset value.

Hence compute the wday using the current date/month/year values.
Check if reset wday is any different from the computed wday,
If different then set the wday which we computed using
date/month/year values.

Document Referred:
http://ww1.microchip.com/downloads/en/DeviceDoc/20002266F.pdf

Fixes: 1d1945d261a2af "drivers/rtc/rtc-ds1307.c: add alarm support for mcp7941x chips"
Signed-off-by: Keerthy &lt;j-keerthy@ti.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The reset value of weekday is 0x1. This is wrong since
the reset values of the day/month/year make up to Jan 1 2001.
When computed weekday comes out to be Monday. On a scale
of 1-7(Sunday - Saturday) it should be 0x2. So we should not
be relying on the reset value.

Hence compute the wday using the current date/month/year values.
Check if reset wday is any different from the computed wday,
If different then set the wday which we computed using
date/month/year values.

Document Referred:
http://ww1.microchip.com/downloads/en/DeviceDoc/20002266F.pdf

Fixes: 1d1945d261a2af "drivers/rtc/rtc-ds1307.c: add alarm support for mcp7941x chips"
Signed-off-by: Keerthy &lt;j-keerthy@ti.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1307: Remove CLK_IS_ROOT</title>
<updated>2016-05-20T10:33:51+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2016-04-20T01:15:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7457d5f588dfc038cef66e4645abbe9c06481504'/>
<id>7457d5f588dfc038cef66e4645abbe9c06481504</id>
<content type='text'>
This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate
CLK_IS_ROOT", 2016-02-02) so remove it.

Cc: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: Michael Tatarinov &lt;kukabu@gmail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate
CLK_IS_ROOT", 2016-02-02) so remove it.

Cc: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: Michael Tatarinov &lt;kukabu@gmail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1307: ensure that any pending alarm is cleared before a new alarm is enabled</title>
<updated>2016-05-20T10:33:51+00:00</updated>
<author>
<name>Nicolas Boullis</name>
<email>nboullis@debian.org</email>
</author>
<published>2016-04-10T11:23:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5919fb97dd85e7ee200ab60151244cca62f61368'/>
<id>5919fb97dd85e7ee200ab60151244cca62f61368</id>
<content type='text'>
If a previously-set alarm was disabled and then triggered, it may still
be pending when a new alarm is configured.

Then, if the alarm is enabled before the pending alarm is cleared, then
an interrupt is immediately raised.

Unfortunately, when the alarm is cleared and enabled during the same I²C
block write, the chip (at least the DS1339 I have) considers that the
alarm is enabled before it is cleared, and raises an interrupt.

This patch ensures that the pending alarm is cleared before the alarm is
enabled.

Signed-off-by: Nicolas Boullis &lt;nboullis@debian.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a previously-set alarm was disabled and then triggered, it may still
be pending when a new alarm is configured.

Then, if the alarm is enabled before the pending alarm is cleared, then
an interrupt is immediately raised.

Unfortunately, when the alarm is cleared and enabled during the same I²C
block write, the chip (at least the DS1339 I have) considers that the
alarm is enabled before it is cleared, and raises an interrupt.

This patch ensures that the pending alarm is cleared before the alarm is
enabled.

Signed-off-by: Nicolas Boullis &lt;nboullis@debian.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1307: fix ds1307_native_smbus_read_block_data function</title>
<updated>2016-05-20T10:33:51+00:00</updated>
<author>
<name>Nicolas Boullis</name>
<email>nboullis@debian.org</email>
</author>
<published>2016-04-02T22:10:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1d87951c398e35118a0fb67b287022f008513f42'/>
<id>1d87951c398e35118a0fb67b287022f008513f42</id>
<content type='text'>
The i2c_smbus_read_i2c_block_data function returns 0 on success, not the
number of bytes written.

Hence, when there are 32 bytes or less to send, the
ds1307_native_smbus_write_block_data function returns 0 on success,
while it returns the number of bytes when there are more than 32.

The ds1307_write_block_data always returns the number of bytes on
success.

Signed-off-by: Nicolas Boullis &lt;nboullis@debian.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The i2c_smbus_read_i2c_block_data function returns 0 on success, not the
number of bytes written.

Hence, when there are 32 bytes or less to send, the
ds1307_native_smbus_write_block_data function returns 0 on success,
while it returns the number of bytes when there are more than 32.

The ds1307_write_block_data always returns the number of bytes on
success.

Signed-off-by: Nicolas Boullis &lt;nboullis@debian.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1307: Use irq when available for wakeup-source device</title>
<updated>2016-04-21T21:21:00+00:00</updated>
<author>
<name>Nishanth Menon</name>
<email>nm@ti.com</email>
</author>
<published>2016-04-19T16:23:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=38a7a73e8ed0fa9e8cd99bb62463afbdcd23429b'/>
<id>38a7a73e8ed0fa9e8cd99bb62463afbdcd23429b</id>
<content type='text'>
With commit 8bc2a40730ec ("rtc: ds1307: add support for the
DT property 'wakeup-source'") we lost the ability for rtc irq
functionality for devices that are actually hooked on a real IRQ
line and have capability to wakeup as well. This is not an expected
behavior. So, instead of just not requesting IRQ, skip the IRQ
requirement only if interrupts are not defined for the device.

Fixes: 8bc2a40730ec ("rtc: ds1307: add support for the DT property 'wakeup-source'")
Reported-by: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Michael Lange &lt;linuxstuff@milaw.biz&gt;
Cc: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With commit 8bc2a40730ec ("rtc: ds1307: add support for the
DT property 'wakeup-source'") we lost the ability for rtc irq
functionality for devices that are actually hooked on a real IRQ
line and have capability to wakeup as well. This is not an expected
behavior. So, instead of just not requesting IRQ, skip the IRQ
requirement only if interrupts are not defined for the device.

Fixes: 8bc2a40730ec ("rtc: ds1307: add support for the DT property 'wakeup-source'")
Reported-by: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Michael Lange &lt;linuxstuff@milaw.biz&gt;
Cc: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1307: ds3231 temperature s16 overflow</title>
<updated>2016-04-21T21:20:59+00:00</updated>
<author>
<name>Zhuang Yuyao</name>
<email>mlistz@gmail.com</email>
</author>
<published>2016-04-18T00:21:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9a3dce62cc5640d7ea17733a2bd1b57665c232b0'/>
<id>9a3dce62cc5640d7ea17733a2bd1b57665c232b0</id>
<content type='text'>
while retrieving temperature from ds3231, the result may be overflow
since s16 is too small for a multiplication with 250.

ie. if temp_buf[0] == 0x2d, the result (s16 temp) will be negative.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Tested-by: Michael Tatarinov &lt;kukabu@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
while retrieving temperature from ds3231, the result may be overflow
since s16 is too small for a multiplication with 250.

ie. if temp_buf[0] == 0x2d, the result (s16 temp) will be negative.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Tested-by: Michael Tatarinov &lt;kukabu@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
