<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/rtc/rtc-ds3232.c, branch v4.17</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: stop validating rtc_time in .read_time</title>
<updated>2018-03-02T09:09:58+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-02-19T15:23:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=22652ba72453d35c8a637d5c0f06b3dc29ff9eb0'/>
<id>22652ba72453d35c8a637d5c0f06b3dc29ff9eb0</id>
<content type='text'>
The RTC core is always calling rtc_valid_tm after the read_time callback.
It is not necessary to call it just before returning from the callback.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The RTC core is always calling rtc_valid_tm after the read_time callback.
It is not necessary to call it just before returning from the callback.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds3232: add temperature support</title>
<updated>2017-07-06T20:37:16+00:00</updated>
<author>
<name>Kirill Esipov</name>
<email>yesipov@gmail.com</email>
</author>
<published>2017-06-28T11:29:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c35c4195f919a077ce106ec84cfcecbb0b67db30'/>
<id>c35c4195f919a077ce106ec84cfcecbb0b67db30</id>
<content type='text'>
DS3232/DS3234 has the temperature registers with a resolution of 0.25
degree celsius. This enables to get the value through hwmon.

	# cat /sys/class/hwmon/hwmon0/temp1_input
	37250

Signed-off-by: Kirill Esipov &lt;yesipov@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>
DS3232/DS3234 has the temperature registers with a resolution of 0.25
degree celsius. This enables to get the value through hwmon.

	# cat /sys/class/hwmon/hwmon0/temp1_input
	37250

Signed-off-by: Kirill Esipov &lt;yesipov@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds3232: Add OF device ID table</title>
<updated>2017-03-09T00:29:23+00:00</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier@osg.samsung.com</email>
</author>
<published>2017-03-03T14:29:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4dfbd1378dceaa418ec1634428ffe038e0870b66'/>
<id>4dfbd1378dceaa418ec1634428ffe038e0870b66</id>
<content type='text'>
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:&lt;device&gt;.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.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 driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:&lt;device&gt;.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds3232: Call device_init_wakeup before device_register</title>
<updated>2017-02-24T10:14:53+00:00</updated>
<author>
<name>Phil Reid</name>
<email>preid@electromag.com.au</email>
</author>
<published>2017-02-24T03:12:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d4f6c6f15a1f57e10374cf1a457f4eab5933bd0c'/>
<id>d4f6c6f15a1f57e10374cf1a457f4eab5933bd0c</id>
<content type='text'>
The wakealarm attribute is currently not exposed in the sysfs interface
as the device has not been set as doing wakealarm when device_register
is called. Changing the order of the calls fixes that problem. Interrupts
are cleared in check_rtc_status prior to requesting the interrupt.

This is only set if an irq is defined. If irq registration fails then
set wakeup_capable to false. With this change the sysfs wakealarm
attribute will be left visible but it is non functional. rtcwake
still returns that the device is not enabled for wakeup.

Signed-off-by: Phil Reid &lt;preid@electromag.com.au&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 wakealarm attribute is currently not exposed in the sysfs interface
as the device has not been set as doing wakealarm when device_register
is called. Changing the order of the calls fixes that problem. Interrupts
are cleared in check_rtc_status prior to requesting the interrupt.

This is only set if an irq is defined. If irq registration fails then
set wakeup_capable to false. With this change the sysfs wakealarm
attribute will be left visible but it is non functional. rtcwake
still returns that the device is not enabled for wakeup.

Signed-off-by: Phil Reid &lt;preid@electromag.com.au&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds3232: Add regmap max_register definition.</title>
<updated>2017-02-21T20:34:00+00:00</updated>
<author>
<name>Phil Reid</name>
<email>preid@electromag.com.au</email>
</author>
<published>2017-02-17T01:44:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=082edf0ab1e83fe42d98ea7b6c1a64a896efce70'/>
<id>082edf0ab1e83fe42d98ea7b6c1a64a896efce70</id>
<content type='text'>
Add the max_register  to the regmap_config definition. This allows
dumping of the device's registers via the regmap debugfs interface.

Signed-off-by: Phil Reid &lt;preid@electromag.com.au&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 the max_register  to the regmap_config definition. This allows
dumping of the device's registers via the regmap debugfs interface.

Signed-off-by: Phil Reid &lt;preid@electromag.com.au&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds3232: Cleanup whitespace around register and bit definitions.</title>
<updated>2017-02-21T20:33:58+00:00</updated>
<author>
<name>Phil Reid</name>
<email>preid@electromag.com.au</email>
</author>
<published>2017-02-17T01:44:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ca4b0a6de8a8ed9834942a5ba0c6a7cd80877320'/>
<id>ca4b0a6de8a8ed9834942a5ba0c6a7cd80877320</id>
<content type='text'>
Whitespace was a combination of spaces and tabs.
Use spaces and align register / bit definitions.

Signed-off-by: Phil Reid &lt;preid@electromag.com.au&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>
Whitespace was a combination of spaces and tabs.
Use spaces and align register / bit definitions.

Signed-off-by: Phil Reid &lt;preid@electromag.com.au&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: ds3232: fix call trace when rtc-&gt;ops_lock is used as NULL</title>
<updated>2016-05-20T10:33:51+00:00</updated>
<author>
<name>Qianyu Gong</name>
<email>qianyu.gong@nxp.com</email>
</author>
<published>2016-04-21T06:55:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b4b77f3c280e38cec178f81d7a4d7e65f4045913'/>
<id>b4b77f3c280e38cec178f81d7a4d7e65f4045913</id>
<content type='text'>
The rtc-&gt;ops_lock would be accessed in ds3232_irq() without being
initialized as rtc_device_register() is called too late.

So move devm_rtc_device_register() just before registering irq handler
to initialize rtc-&gt;ops_lock earlier.

Signed-off-by: Gong Qianyu &lt;Qianyu.Gong@nxp.com&gt;
Reviewed-by: Akinobu Mita &lt;akinobu.mita@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>
The rtc-&gt;ops_lock would be accessed in ds3232_irq() without being
initialized as rtc_device_register() is called too late.

So move devm_rtc_device_register() just before registering irq handler
to initialize rtc-&gt;ops_lock earlier.

Signed-off-by: Gong Qianyu &lt;Qianyu.Gong@nxp.com&gt;
Reviewed-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds3232: use rtc-&gt;ops_lock to protect alarm operations</title>
<updated>2016-03-14T16:08:38+00:00</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2016-03-06T15:27:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fc1dcb0b39dbb10d3290f2fcd6e154670f699166'/>
<id>fc1dcb0b39dbb10d3290f2fcd6e154670f699166</id>
<content type='text'>
ds3232-&gt;mutex is used to protect for alarm operations which
need to access status and control registers.

But we can use rtc-&gt;ops_lock instead.  rtc-&gt;ops_lock is held when most
of rtc_class_ops methods are called, so we only need to explicitly
acquire it from irq handler in order to protect form concurrent
accesses.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@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>
ds3232-&gt;mutex is used to protect for alarm operations which
need to access status and control registers.

But we can use rtc-&gt;ops_lock instead.  rtc-&gt;ops_lock is held when most
of rtc_class_ops methods are called, so we only need to explicitly
acquire it from irq handler in order to protect form concurrent
accesses.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds3232: fix issue when irq is shared several devices</title>
<updated>2016-03-14T16:08:37+00:00</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2016-03-06T15:27:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=95c60c1c8f51521e7f2174fd0fff4dae6d522b83'/>
<id>95c60c1c8f51521e7f2174fd0fff4dae6d522b83</id>
<content type='text'>
ds3232-core requests irq with IRQF_SHARED, so irq can be shared by
several devices.  But the irq handler for ds3232 unconditionally
disables the irq at first and the irq is re-enabled only when the
interrupt source was the ds3232's alarm.  This behaviour breaks the
devices sharing the same irq in the various scenarios.

This converts to use threaded irq and remove outdated code in
suspend/resume paths.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Suggested-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.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>
ds3232-core requests irq with IRQF_SHARED, so irq can be shared by
several devices.  But the irq handler for ds3232 unconditionally
disables the irq at first and the irq is re-enabled only when the
interrupt source was the ds3232's alarm.  This behaviour breaks the
devices sharing the same irq in the various scenarios.

This converts to use threaded irq and remove outdated code in
suspend/resume paths.

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