<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/rtc/class.c, branch v5.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-12-18T21:53:32Z</updated>
<entry>
<title>rtc: class: reimplement devm_rtc_device_register</title>
<updated>2018-12-18T21:53:32Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-12-18T21:15:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a26944149374c19d92f785108b6980f2e54bb517'/>
<id>urn:sha1:a26944149374c19d92f785108b6980f2e54bb517</id>
<content type='text'>
Implement devm_rtc_device_register using devm_rtc_allocate_device and
__rtc_register_device so there is only one path left to register rtc
devices.

Also mark it as deprecated so new drivers will hopefully use
devm_rtc_allocate_device and rtc_register_device that are less race prone
and allow avoiding the 2038, 2070, 2100 and 2106 bugs properly.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: enforce rtc_timer_init private_data type</title>
<updated>2018-12-18T21:53:29Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-12-18T21:11:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9a03201170d3de1da47c1b7e2d514e0b15477881'/>
<id>urn:sha1:9a03201170d3de1da47c1b7e2d514e0b15477881</id>
<content type='text'>
All the remaining users of rtc_timers are passing the rtc_device as private
data. Enforce that and rename private_data to rtc.

Suggested-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: class: remove devm_rtc_device_unregister</title>
<updated>2018-11-12T22:14:10Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-11-10T20:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=03f39f47dc86fc4defbf9b97f8417f192d1ccba6'/>
<id>urn:sha1:03f39f47dc86fc4defbf9b97f8417f192d1ccba6</id>
<content type='text'>
devm_rtc_device_unregister is not used by any driver and should not be used
by any new driver.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: unexport non devm managed registration</title>
<updated>2018-09-13T13:43:05Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-09-12T20:22:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1e479c619b2ac983fdea1a8212c7b822b5098da0'/>
<id>urn:sha1:1e479c619b2ac983fdea1a8212c7b822b5098da0</id>
<content type='text'>
Ensure the non managed version of the un/registration functions is not used
anymore. No driver is using it anymore and they should not be necessary.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: remove irq_task and irq_task_lock</title>
<updated>2018-07-26T13:08:53Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-07-25T12:58:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=acecb3ad8b21a519ce4ad728106d45d4e978bb56'/>
<id>urn:sha1:acecb3ad8b21a519ce4ad728106d45d4e978bb56</id>
<content type='text'>
There is no way to set a periodic task anymore, remove task pointer and
lock.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: use ktime_get_real_ts64() instead of getnstimeofday64()</title>
<updated>2018-07-13T08:47:18Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-07-11T12:47:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5089ea15baa9e7b0cb49f36881f2cb27bf281789'/>
<id>urn:sha1:5089ea15baa9e7b0cb49f36881f2cb27bf281789</id>
<content type='text'>
getnstimeofday64() is just a wrapper around the ktime accessor, so
we should use that directly.

I considered using ktime_get_boottime_ts64() (to avoid leap second
problems) or ktime_get_real_seconds() (to simplify the calculation,
but in the end concluded that the existing interface is probably
the most appropriate in this case.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: Add one offset seconds to expand RTC range</title>
<updated>2018-03-17T13:20:55Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-01-08T06:04:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=989515647e783221f9737ed1cf519573d26ce99b'/>
<id>urn:sha1:989515647e783221f9737ed1cf519573d26ce99b</id>
<content type='text'>
From our investigation for all RTC drivers, 1 driver will be expired before
year 2017, 7 drivers will be expired before year 2038, 23 drivers will be
expired before year 2069, 72 drivers will be expired before 2100 and 104
drivers will be expired before 2106. Especially for these early expired
drivers, we need to expand the RTC range to make the RTC can still work
after the expired year.

So we can expand the RTC range by adding one offset to the time when reading
from hardware, and subtracting it when writing back. For example, if you have
an RTC that can do 100 years, and currently is configured to be based in
Jan 1 1970, so it can represents times from 1970 to 2069. Then if you change
the start year from 1970 to 2000, which means it can represents times from
2000 to 2099. By adding or subtracting the offset produced by moving the wrap
point, all times between 1970 and 1999 from RTC hardware could get interpreted
as times from 2070 to 2099, but the interpretation of dates between 2000 and
2069 would not change.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: remove nvmem_config</title>
<updated>2018-03-01T09:49:23Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-02-12T22:47:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0391df74a608e4e65c29ddf80e704edfa8f8ef25'/>
<id>urn:sha1:0391df74a608e4e65c29ddf80e704edfa8f8ef25</id>
<content type='text'>
Because nvmem_config is only used and copied at nvmem registration, remove
it from struct rtc_device.

All the rtc drivers using nvmem are now calling rtc_nvmem_register
directly.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: nvmem: allow registering the nvmem device before the rtc</title>
<updated>2018-03-01T09:49:14Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-02-28T20:58:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac75779b72fd52741d7446ad27cf6d58c006c643'/>
<id>urn:sha1:ac75779b72fd52741d7446ad27cf6d58c006c643</id>
<content type='text'>
Switch the parent of the nvmem device to the parent of the rtc device so it
can be registered before the RTC.

This is a small change in the ABI as the nvmem moves out of the
/sys/class/rtc/rtcX folder to be under the parent device folder (that is
where the previous nvram files where registered).

However, it is still available under its correct location,
/sys/bus/nvmem/devices which is the one that should be used by userspace
applications.

The other benefit is that the nvmem device can stay registered even if the
rtc registration fails. Or it is possible to not register the rtc if the
nvmem registration failed.

Finally, it makes a lot of sense for devices that actually have different
i2c or spi addresses for the RTC and the EEPROM. That is basically how it
would end up when using MFD or even completely separate devices.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: nvmem: pass nvmem_config to rtc_nvmem_register()</title>
<updated>2018-02-14T19:58:11Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-02-12T22:47:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4cce9d3988ae33eb53742d9648ecc59046196e6f'/>
<id>urn:sha1:4cce9d3988ae33eb53742d9648ecc59046196e6f</id>
<content type='text'>
To be able to remove nvmem_config from struct rtc_device, pass it as a
parameter to rtc_nvmem_register.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
</feed>
