<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/rtc/rtc-da9063.c, branch v5.15.208</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.208</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.208'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-11-19T11:50:12+00:00</updated>
<entry>
<title>rtc: rework rtc_register_device() resource management</title>
<updated>2020-11-19T11:50:12+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2020-11-09T16:34:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fdcfd854333be5b30377dc5daa9cd0fa1643a979'/>
<id>urn:sha1:fdcfd854333be5b30377dc5daa9cd0fa1643a979</id>
<content type='text'>
rtc_register_device() is a managed interface but it doesn't use devres
by itself - instead it marks an rtc_device as "registered" and the devres
callback for devm_rtc_allocate_device() takes care of resource release.

This doesn't correspond with the design behind devres where managed
structures should not be aware of being managed. The correct solution
here is to register a separate devres callback for unregistering the
device.

While at it: rename rtc_register_device() to devm_rtc_register_device()
and add it to the list of managed interfaces in devres.rst. This way we
can avoid any potential confusion of driver developers who may expect
there to exist a corresponding unregister function.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201109163409.24301-8-brgl@bgdev.pl
</content>
</entry>
<entry>
<title>rtc: da9063: Simplify bool comparison</title>
<updated>2020-11-14T22:31:33+00:00</updated>
<author>
<name>Kaixu Xia</name>
<email>kaixuxia@tencent.com</email>
</author>
<published>2020-11-06T08:00:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a48c6224ae07bed02893c58073ca2942acb5c3d5'/>
<id>urn:sha1:a48c6224ae07bed02893c58073ca2942acb5c3d5</id>
<content type='text'>
Fix the following coccicheck warning:

./drivers/rtc/rtc-da9063.c:246:5-18: WARNING: Comparison to bool

Reported-by: Tosk Robot &lt;tencent_os_robot@tencent.com&gt;
Signed-off-by: Kaixu Xia &lt;kaixuxia@tencent.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/1604649637-1014-1-git-send-email-kaixuxia@tencent.com
</content>
</entry>
<entry>
<title>rtc: da9063: Handle invalid IRQ from platform_get_irq_byname()</title>
<updated>2019-10-07T13:49:18+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2019-10-04T15:05:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7da83f1bba0e4b70af2d292e099bec6092b37217'/>
<id>urn:sha1:7da83f1bba0e4b70af2d292e099bec6092b37217</id>
<content type='text'>
platform_get_irq_byname() might return -errno which later would be
cast to an unsigned int and used in request_irq().

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Tested-by: Adam Thomson &lt;Adam.Thomson.Opensource@diasemi.com&gt;
Link: https://lore.kernel.org/r/20191004150510.6278-1-krzk@kernel.org
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'rtc-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux</title>
<updated>2019-05-09T21:46:33+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-05-09T21:46:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e4ff713ce313dcabbb60e6ede1ffc193e67631f'/>
<id>urn:sha1:8e4ff713ce313dcabbb60e6ede1ffc193e67631f</id>
<content type='text'>
Pull RTC updates from Alexandre Belloni:
 "A huge series from me this cycle. I went through many drivers to set
  the date and time range supported by the RTC which helps solving HW
  limitation when the time comes (as early as next year for some). This
  time, I focused on drivers using .set_mms and .set_mmss64, allowing me
  to remove those callbacks. About a third of the patches got reviews, I
  actually own the RTCs and I tested another third and the remaining one
  are unlikely to cause any issues.

  Other than that, a single new driver and the usual fixes here and there.

  Summary:

  Subsystem:

   - set_mmss and set_mmss64 rtc_ops removal

   - Fix timestamp value for RTC_TIMESTAMP_BEGIN_1900

   - Use SPDX identifier for the core

   - validate upper bound of tm-&gt;tm_year

  New driver:

   - Aspeed BMC SoC RTC

  Drivers:

   - abx80x: use rtc_add_group

   - ds3232: nvram support

   - pcf85063: add alarm, nvram, offset correction and microcrystal
     rv8263 support

   - x1205: add of_match_table

   - Use set_time instead of set_mms/set_mmss64 for: ab3100, coh901331,
     digicolor, ds1672, ds2404, ep93xx, imxdi, jz4740, lpc32xx, mc13xxx,
     mxc, pcap, stmp3xxx, test, wm831x, xgene.

   - Set RTC range for: ab3100, at91sam9, coh901331, da9063, digicolor,
     dm355evm, ds1672, ds2404, ep39xx, goldfish, imxdi, jz4740, lpc32xx,
     mc13xxx, mv, mxc, omap, pcap, pcf85063, pcf85363, ps3, sh,
     stmp3xxx, sun4v, tegra, wm831x, xgene.

   - Switch to rtc_time64_to_tm/rtc_tm_to_time64 for the driver that
     properly set the RTC range.

   - Use dev_get_drvdata instead of multiple indirections"

* tag 'rtc-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (177 commits)
  rtc: snvs: Use __maybe_unused instead of #if CONFIG_PM_SLEEP
  rtc: imxdi: remove unused variable
  rtc: drop set_mms and set_mmss64
  rtc: pcap: convert to SPDX identifier
  rtc: pcap: use .set_time
  rtc: pcap: switch to rtc_time64_to_tm/rtc_tm_to_time64
  rtc: pcap: set range
  rtc: digicolor: convert to SPDX identifier
  rtc: digicolor: use .set_time
  rtc: digicolor: set range
  rtc: digicolor: fix possible race condition
  rtc: jz4740: convert to SPDX identifier
  rtc: jz4740: rework invalid time detection
  rtc: jz4740: use dev_pm_set_wake_irq() to simplify code
  rtc: jz4740: use .set_time
  rtc: jz4740: remove useless check
  rtc: jz4740: switch to rtc_time64_to_tm/rtc_tm_to_time64
  rtc: jz4740: set range
  rtc: 88pm860x: prevent use-after-free on device remove
  rtc: Use dev_get_drvdata()
  ...
</content>
</entry>
<entry>
<title>rtc: da9063: switch to rtc_time64_to_tm/rtc_tm_to_time64</title>
<updated>2019-04-04T08:07:10+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2019-03-21T10:15:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b599db3a9f40582d0a3aad6ec16ba1c3712d57c2'/>
<id>urn:sha1:b599db3a9f40582d0a3aad6ec16ba1c3712d57c2</id>
<content type='text'>
Call the 64bit versions of rtc_tm time conversion now that the range is
enforced by the core.

Acked-by: Steve Twiss &lt;stwiss.opensource@diasemi.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: da9063: set range</title>
<updated>2019-04-04T08:07:10+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2019-03-21T10:15:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5ff404d1496e131f2fccc100cfc153ee2b34b4d3'/>
<id>urn:sha1:5ff404d1496e131f2fccc100cfc153ee2b34b4d3</id>
<content type='text'>
The DA9062 and DA9063 have a year register that can go up to 0x3F.

Acked-by: Steve Twiss &lt;stwiss.opensource@diasemi.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: da9063: convert header to SPDX</title>
<updated>2019-04-04T08:07:07+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2019-03-18T15:57:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=737842e575570d1a025068c22d82af68f8fb8532'/>
<id>urn:sha1:737842e575570d1a025068c22d82af68f8fb8532</id>
<content type='text'>
Covnert the header of the source file to SPDX.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Reviewed-by: Simon Horman &lt;horms+renesas@verge.net.au&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: da9063: set uie_unsupported when relevant</title>
<updated>2019-04-02T21:33:09+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2019-04-02T10:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=882c5e552ffd06856de42261460f46e18319d259'/>
<id>urn:sha1:882c5e552ffd06856de42261460f46e18319d259</id>
<content type='text'>
The DA9063AD doesn't support alarms on any seconds and its granularity is
the minute. Set uie_unsupported in that case.

Reported-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Reported-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Tested-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Acked-by: Steve Twiss &lt;stwiss.opensource@diasemi.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: diasemi: stop validating rtc_time in .read_time</title>
<updated>2018-03-02T09:11:02+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-03-02T09:08:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb54be134a363f57d698b0c2887df36e468f3077'/>
<id>urn:sha1:bb54be134a363f57d698b0c2887df36e468f3077</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 before returning from the callback.

Acked-by: Steve Twiss &lt;stwiss.opensource@diasemi.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: da9063: avoid writing undefined data to rtc</title>
<updated>2016-01-11T19:19:57+00:00</updated>
<author>
<name>Enrico Scholz</name>
<email>enrico.scholz@sigma-chemnitz.de</email>
</author>
<published>2015-11-27T12:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2ad2c17480b6208a35a4ffb937effe0ba1ed39de'/>
<id>urn:sha1:2ad2c17480b6208a35a4ffb937effe0ba1ed39de</id>
<content type='text'>
driver did

| static void da9063_tm_to_data(struct rtc_time *tm, u8 *data,
| {
|  	const struct da9063_compatible_rtc_regmap *config = rtc-&gt;config;
|
| 	data[RTC_SEC] &amp;= ~config-&gt;rtc_count_sec_mask;
| 	data[RTC_SEC] |= tm-&gt;tm_sec &amp; config-&gt;rtc_count_sec_mask;
| ...
| }
| ...
| static int da9063_rtc_set_time(struct device *dev, struct rtc_time *tm)
| {
|       ...
|	u8 data[RTC_DATA_LEN];
|	int ret;
|
|	da9063_tm_to_data(tm, data, rtc);

which means that some bits of stack content (in 'data[]') was masked out
and written to the RTC.

Because da9063_tm_to_data() is used only by da9063_rtc_set_time() and
da9063_rtc_set_alarm(), we can write fields directly.

Signed-off-by: Enrico Scholz &lt;enrico.scholz@sigma-chemnitz.de&gt;
Acked-by: Steve Twiss &lt;stwiss.opensource@diasemi.com&gt;
Tested-by: Steve Twiss &lt;stwiss.opensource@diasemi.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
</feed>
