<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/rtc, branch v5.17</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.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-01-16T22:50:34Z</updated>
<entry>
<title>rtc: sunplus: fix return value in sp_rtc_probe()</title>
<updated>2022-01-16T22:50:34Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-01-06T07:57:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ceee540fdc7f1d65ca6e2b1b193ce5aa95ab99c'/>
<id>urn:sha1:5ceee540fdc7f1d65ca6e2b1b193ce5aa95ab99c</id>
<content type='text'>
If devm_ioremap_resource() fails, it should return error
code from sp_rtc-&gt;reg_base in sp_rtc_probe().

Fixes: fad6cbe9b2b4 ("rtc: Add driver for RTC in Sunplus SP7021")
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20220106075711.3216468-1-yangyingliang@huawei.com
</content>
</entry>
<entry>
<title>rtc: cmos: Evaluate century appropriate</title>
<updated>2022-01-16T22:50:26Z</updated>
<author>
<name>Riwen Lu</name>
<email>luriwen@kylinos.cn</email>
</author>
<published>2022-01-06T08:46:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ff164ae39b82ee483b24579c8e22a13a8ce5bd04'/>
<id>urn:sha1:ff164ae39b82ee483b24579c8e22a13a8ce5bd04</id>
<content type='text'>
There's limiting the year to 2069. When setting the rtc year to 2070,
reading it returns 1970. Evaluate century starting from 19 to count the
correct year.

$ sudo date -s 20700106
Mon 06 Jan 2070 12:00:00 AM CST
$ sudo hwclock -w
$ sudo hwclock -r
1970-01-06 12:00:49.604968+08:00

Fixes: 2a4daadd4d3e5071 ("rtc: cmos: ignore bogus century byte")

Signed-off-by: Riwen Lu &lt;luriwen@kylinos.cn&gt;
Acked-by: Eric Wong &lt;e@80x24.org&gt;
Reviewed-by: Mateusz Jończyk &lt;mat.jonczyk@o2.pl&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20220106084609.1223688-1-luriwen@kylinos.cn
</content>
</entry>
<entry>
<title>rtc: gamecube: Fix an IS_ERR() vs NULL check</title>
<updated>2022-01-16T22:36:09Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-01-07T07:33:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=900ed72c8a190e8c0b87cb17abc645b8ec713011'/>
<id>urn:sha1:900ed72c8a190e8c0b87cb17abc645b8ec713011</id>
<content type='text'>
The devm_kzalloc() function returns NULL on error, it doesn't return
error pointers.

Fixes: 86559400b3ef ("rtc: gamecube: Add a RTC driver for the GameCube, Wii and Wii U")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Emmanuel Gil Peyrot &lt;linkmauve@linkmauve.fr&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20220107073340.GF22086@kili
</content>
</entry>
<entry>
<title>rtc: mc146818-lib: fix signedness bug in mc146818_get_time()</title>
<updated>2022-01-16T22:34:43Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-01-11T07:19:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7372971c1be5b7d4fdd8ad237798bdc1d1d54162'/>
<id>urn:sha1:7372971c1be5b7d4fdd8ad237798bdc1d1d54162</id>
<content type='text'>
The mc146818_get_time() function returns zero on success or negative
a error code on failure.  It needs to be type int.

Fixes: d35786b3a28d ("rtc: mc146818-lib: change return values of mc146818_get_time()")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Mateusz Jończyk &lt;mat.jonczyk@o2.pl&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20220111071922.GE11243@kili
</content>
</entry>
<entry>
<title>rtc: pxa: fix null pointer dereference</title>
<updated>2022-01-05T00:05:17Z</updated>
<author>
<name>Laurence de Bruxelles</name>
<email>lfdebrux@gmail.com</email>
</author>
<published>2022-01-01T15:41:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34127b3632b21e5c391756e724b1198eb9917981'/>
<id>urn:sha1:34127b3632b21e5c391756e724b1198eb9917981</id>
<content type='text'>
With the latest stable kernel versions the rtc on the PXA based
Zaurus does not work, when booting I see the following kernel messages:

pxa-rtc pxa-rtc: failed to find rtc clock source
pxa-rtc pxa-rtc: Unable to init SA1100 RTC sub-device
pxa-rtc: probe of pxa-rtc failed with error -2
hctosys: unable to open rtc device (rtc0)

I think this is because commit f2997775b111 ("rtc: sa1100: fix possible
race condition") moved the allocation of the rtc_device struct out of
sa1100_rtc_init and into sa1100_rtc_probe. This means that pxa_rtc_probe
also needs to do allocation for the rtc_device struct, otherwise
sa1100_rtc_init will try to dereference a null pointer. This patch adds
that allocation by copying how sa1100_rtc_probe in
drivers/rtc/rtc-sa1100.c does it; after the IRQs are set up a managed
rtc_device is allocated.

I've tested this patch with `qemu-system-arm -machine akita` and with a
real Zaurus SL-C1000 applied to 4.19, 5.4, and 5.10.

Signed-off-by: Laurence de Bruxelles &lt;lfdebrux@gmail.com&gt;
Fixes: f2997775b111 ("rtc: sa1100: fix possible race condition")
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20220101154149.12026-1-lfdebrux@gmail.com
</content>
</entry>
<entry>
<title>rtc: ftrtc010: Use platform_get_irq() to get the interrupt</title>
<updated>2022-01-05T00:04:11Z</updated>
<author>
<name>Lad Prabhakar</name>
<email>prabhakar.mahadev-lad.rj@bp.renesas.com</email>
</author>
<published>2021-12-20T01:15:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=05020a733b02cf7a474305e620fb306cd3abfe84'/>
<id>urn:sha1:05020a733b02cf7a474305e620fb306cd3abfe84</id>
<content type='text'>
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar &lt;prabhakar.mahadev-lad.rj@bp.renesas.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20211220011524.17206-1-prabhakar.mahadev-lad.rj@bp.renesas.com
</content>
</entry>
<entry>
<title>rtc: Move variable into switch case statement</title>
<updated>2022-01-05T00:03:09Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2021-12-09T04:39:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba52eac083e1598e748811ff58d259f77e4c5c4d'/>
<id>urn:sha1:ba52eac083e1598e748811ff58d259f77e4c5c4d</id>
<content type='text'>
When building with automatic stack variable initialization, GCC 12
complains about variables defined outside of switch case statements.
Move the variable into the case that uses it, which silences the warning:

drivers/rtc/dev.c: In function 'rtc_dev_ioctl':
drivers/rtc/dev.c:394:30: warning: statement will never be executed [-Wswitch-unreachable]
  394 |                         long offset;
      |                              ^~~~~~

Fixes: 6a8af1b6568a ("rtc: add parameter ioctl")
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20211209043915.1378393-1-keescook@chromium.org
</content>
</entry>
<entry>
<title>rtc: pcf2127: Fix typo in comment</title>
<updated>2022-01-05T00:02:00Z</updated>
<author>
<name>Hugo Villeneuve</name>
<email>hvilleneuve@dimonoff.com</email>
</author>
<published>2021-12-07T21:56:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b69b54aaa48979f5e3cebb7225e11cbbdc9f5fb'/>
<id>urn:sha1:7b69b54aaa48979f5e3cebb7225e11cbbdc9f5fb</id>
<content type='text'>
Replace TFS2 with TSF2.

Signed-off-by: Hugo Villeneuve &lt;hvilleneuve@dimonoff.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20211207215626.2619819-1-hugo@hugovil.com
</content>
</entry>
<entry>
<title>rtc: Add driver for RTC in Sunplus SP7021</title>
<updated>2022-01-05T00:00:29Z</updated>
<author>
<name>Vincent Shih</name>
<email>vincent.sunplus@gmail.com</email>
</author>
<published>2021-12-03T07:46:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fad6cbe9b2b4137f5af5355d4ee7e4eb38221e7e'/>
<id>urn:sha1:fad6cbe9b2b4137f5af5355d4ee7e4eb38221e7e</id>
<content type='text'>
Add driver for RTC in Sunplus SP7021

Signed-off-by: Vincent Shih &lt;vincent.sunplus@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/1638517579-10316-2-git-send-email-vincent.sunplus@gamil.com
</content>
</entry>
<entry>
<title>rtc: rs5c372: fix incorrect oscillation value on r2221tl</title>
<updated>2022-01-04T23:52:10Z</updated>
<author>
<name>Camel Guo</name>
<email>camelg@axis.com</email>
</author>
<published>2021-12-06T12:58:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ed06106614341301b3c4b84b6c0b497a72caec7d'/>
<id>urn:sha1:ed06106614341301b3c4b84b6c0b497a72caec7d</id>
<content type='text'>
The XSL bit only exists in RS5C372A/B. On other Ricoh RTC chips
supported in rs5c372, this bit has different meaning. For example, on
R2221x and R2223x, this bit of oscillation adjustment register
determines the operation frequency of oscillation adjustment circuit and
the oscillation is always 32768HZ. But rs5c372_get_trim gives 32000HZ to
osc when DEV is 1.

Signed-off-by: Camel Guo &lt;camelg@axis.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20211206125832.6461-1-camel.guo@axis.com
</content>
</entry>
</feed>
