<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/drivers/rtc/rtc-ds1307.c, branch dev-4.6</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.6</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2016-04-21T21:21:00+00:00</updated>
<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.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=38a7a73e8ed0fa9e8cd99bb62463afbdcd23429b'/>
<id>urn:sha1: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>
</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.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=9a3dce62cc5640d7ea17733a2bd1b57665c232b0'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>rtc: ds1307: add clock provider support for DS3231</title>
<updated>2016-03-14T16:08:13+00:00</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2016-01-31T14:10:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=6c6ff145b3346b071e7d80f9bd33aa7de0e438bc'/>
<id>urn:sha1:6c6ff145b3346b071e7d80f9bd33aa7de0e438bc</id>
<content type='text'>
DS3231 has programmable square-wave output signal.
This enables to use this feature as a clock provider of
common clock framework.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Reviewed-by: Michael Turquette &lt;mturquette@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: add temperature sensor support for ds3231</title>
<updated>2016-02-04T22:44:17+00:00</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2016-01-24T15:22:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=445c02076f1e60d2ee51503bf1288ef9f3bc8809'/>
<id>urn:sha1:445c02076f1e60d2ee51503bf1288ef9f3bc8809</id>
<content type='text'>
DS3231 has the temperature registers with a resolution of 0.25
degree celsius.  This enables to get the value through hwmon.

	# cat /sys/class/i2c-adapter/i2c-2/2-0068/hwmon/hwmon0/temp1_input
	21000

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Acked-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: add support for the DT property 'wakeup-source'</title>
<updated>2016-02-04T22:44:17+00:00</updated>
<author>
<name>Michael Lange</name>
<email>linuxstuff@milaw.biz</email>
</author>
<published>2016-01-21T17:10:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=8bc2a40730ec74271a0573a6882871308d069f5d'/>
<id>urn:sha1:8bc2a40730ec74271a0573a6882871308d069f5d</id>
<content type='text'>
For RTC chips with no IRQ directly connected to the SoC, the RTC chip
can be forced as a wakeup source by stating that explicitly in
the device's .dts file using the "wakeup-source" boolean property.
This will guarantee the 'wakealarm' sysfs entry is available on the
device, if supported by the RTC.

With these changes to the driver rtc-ds1307 and the necessary entries
in the .dts file, I get an working ds1337 RTC on the Witty Pi extension
board by UUGear for the Raspberry Pi.

An example for the entry in the .dts file:

	rtc: ds1337@68 {
		compatible = "dallas,ds1337";
		reg = &lt;0x68&gt;;
		wakeup-source;

If the "wakeup-source" property is set, do not request an IRQ.
Set also UIE mode to unsupported, to get a working 'hwclock' binary.

Signed-off-by: Michael Lange &lt;linuxstuff@milaw.biz&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: use %ph for short hex dumps</title>
<updated>2016-01-11T19:19:58+00:00</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2015-11-24T13:51:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=ff67abd236ca7b65ea632f476f0f0cfc83aea711'/>
<id>urn:sha1:ff67abd236ca7b65ea632f476f0f0cfc83aea711</id>
<content type='text'>
This makes the generated code slightly smaller.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: fix alarm reading at probe time</title>
<updated>2015-11-26T17:11:26+00:00</updated>
<author>
<name>Simon Guinot</name>
<email>simon.guinot@sequanux.org</email>
</author>
<published>2015-11-26T14:37:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=3abb1ada21a4fb5b2920457a2e5c8483abb09a45'/>
<id>urn:sha1:3abb1ada21a4fb5b2920457a2e5c8483abb09a45</id>
<content type='text'>
With the actual code, read_alarm() always returns -EINVAL when called
during the RTC device registration. This prevents from retrieving an
already configured alarm in hardware.

This patch fixes the issue by moving the HAS_ALARM bit configuration
(if supported by the hardware) above the rtc_device_register() call.

Signed-off-by: Simon Guinot &lt;simon.guinot@sequanux.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: fix kernel splat due to wakeup irq handling</title>
<updated>2015-11-25T11:15:44+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2015-11-11T16:11:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=51c4cfef568fe8ebac06761ed7c754fac1f9b5a8'/>
<id>urn:sha1:51c4cfef568fe8ebac06761ed7c754fac1f9b5a8</id>
<content type='text'>
Since commit 3fffd1283927 ("i2c: allow specifying
separate wakeup interrupt in device tree") we have
automatic wakeup irq support for i2c devices. That
commit missed the fact that rtc-1307 had its own
wakeup irq handling and ended up introducing a
kernel splat for at least Beagle x15 boards.

Fix that by reverting original commit _and_ passing
correct interrupt names on DTS so i2c-core can
choose correct IRQ as wakeup.

Now that we have automatic wakeirq support, we can
revert the original commit which did it manually.

Fixes the following warning:

[   10.346582] WARNING: CPU: 1 PID: 263 at linux/drivers/base/power/wakeirq.c:43 dev_pm_attach_wake_irq+0xbc/0xd4()
[   10.359244] rtc-ds1307 2-006f: wake irq already initialized

Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Nishanth Menon &lt;nm@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: Fix alarm programming for mcp794xx</title>
<updated>2015-11-08T13:12:31+00:00</updated>
<author>
<name>Tero Kristo</name>
<email>t-kristo@ti.com</email>
</author>
<published>2015-10-23T06:29:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=62c8c20af92ea312ecb22cec4e83082e5843076b'/>
<id>urn:sha1:62c8c20af92ea312ecb22cec4e83082e5843076b</id>
<content type='text'>
mcp794xx alarm registers must be written in BCD format. However, the
alarm programming logic neglected this by adding one to the value
after bin2bcd conversion has been already done, writing bad values
to month register in case the alarm being set is in October. In this
case, the alarm month value becomes 0x0a instead of the expected 0x10.

Fix by moving the +1 addition within the bin2bcd call also.

Fixes: 1d1945d261a2 ("drivers/rtc/rtc-ds1307.c: add alarm support for mcp7941x chips")

Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Acked-by: Nishanth Menon &lt;nm@ti.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: clean up ds1307_nvram_read()/ds1307_nvram_write()</title>
<updated>2015-09-05T11:19:10+00:00</updated>
<author>
<name>Vladimir Zapolskiy</name>
<email>vz@mleia.com</email>
</author>
<published>2015-07-26T21:48:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=ca7c14d3a1ab1932732c506e32ab5b189b9c0a16'/>
<id>urn:sha1:ca7c14d3a1ab1932732c506e32ab5b189b9c0a16</id>
<content type='text'>
The change removes redundant sysfs binary file boundary checks, since
this task is already done on caller side in fs/sysfs/file.c

Signed-off-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
</feed>
