<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/rtc, branch v5.4.108</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.108</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.108'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2021-03-04T09:26:29Z</updated>
<entry>
<title>rtc: s5m: select REGMAP_I2C</title>
<updated>2021-03-04T09:26:29Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2021-01-14T10:22:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d8a9db6dfa23d8523a70cac09c673a40f09437b1'/>
<id>urn:sha1:d8a9db6dfa23d8523a70cac09c673a40f09437b1</id>
<content type='text'>
[ Upstream commit 1f0cbda3b452b520c5f3794f8f0e410e8bc7386a ]

The rtc-s5m uses the I2C regmap but doesn't select it in Kconfig so
depending on the configuration the build may fail. Fix it.

Fixes: 959df7778bbd ("rtc: Enable compile testing for Maxim and Samsung drivers")
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210114102219.23682-2-brgl@bgdev.pl
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtc: pl031: fix resource leak in pl031_probe</title>
<updated>2021-01-06T13:48:39Z</updated>
<author>
<name>Zheng Liang</name>
<email>zhengliang6@huawei.com</email>
</author>
<published>2020-11-12T09:31:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a95049c51417522b466ce4fcdfd6668afe226938'/>
<id>urn:sha1:a95049c51417522b466ce4fcdfd6668afe226938</id>
<content type='text'>
[ Upstream commit 1eab0fea2514b269e384c117f5b5772b882761f0 ]

When devm_rtc_allocate_device is failed in pl031_probe, it should release
mem regions with device.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Zheng Liang &lt;zhengliang6@huawei.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20201112093139.32566-1-zhengliang6@huawei.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtc: sun6i: Fix memleak in sun6i_rtc_clk_init</title>
<updated>2021-01-06T13:48:39Z</updated>
<author>
<name>Dinghao Liu</name>
<email>dinghao.liu@zju.edu.cn</email>
</author>
<published>2020-10-20T06:12:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=569da7c3d9a31522433ad71c9d204b1df89bff90'/>
<id>urn:sha1:569da7c3d9a31522433ad71c9d204b1df89bff90</id>
<content type='text'>
[ Upstream commit 28d211919e422f58c1e6c900e5810eee4f1ce4c8 ]

When clk_hw_register_fixed_rate_with_accuracy() fails,
clk_data should be freed. It's the same for the subsequent
two error paths, but we should also unregister the already
registered clocks in them.

Signed-off-by: Dinghao Liu &lt;dinghao.liu@zju.edu.cn&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201020061226.6572-1-dinghao.liu@zju.edu.cn
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtc: ep93xx: Fix NULL pointer dereference in ep93xx_rtc_read_time</title>
<updated>2020-12-30T10:51:47Z</updated>
<author>
<name>Nikita Shubin</name>
<email>nikita.shubin@maquefel.me</email>
</author>
<published>2020-12-01T09:55:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=33afcf723a0e655d35a60afe451bba47c9045ed3'/>
<id>urn:sha1:33afcf723a0e655d35a60afe451bba47c9045ed3</id>
<content type='text'>
commit 00c33482bb6110bce8110daa351f9b3baf4df7dc upstream.

Mismatch in probe platform_set_drvdata set's and method's that call
dev_get_platdata will result in "Unable to handle kernel NULL pointer
dereference", let's use according method for getting driver data after
platform_set_drvdata.

8&lt;--- cut here ---
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = (ptrval)
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1] ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 5.9.10-00003-g723e101e0037-dirty #4
Hardware name: Technologic Systems TS-72xx SBC
PC is at ep93xx_rtc_read_time+0xc/0x2c
LR is at __rtc_read_time+0x4c/0x8c
[...]
[&lt;c02b01c8&gt;] (ep93xx_rtc_read_time) from [&lt;c02ac38c&gt;] (__rtc_read_time+0x4c/0x8c)
[&lt;c02ac38c&gt;] (__rtc_read_time) from [&lt;c02ac3f8&gt;] (rtc_read_time+0x2c/0x4c)
[&lt;c02ac3f8&gt;] (rtc_read_time) from [&lt;c02acc54&gt;] (__rtc_read_alarm+0x28/0x358)
[&lt;c02acc54&gt;] (__rtc_read_alarm) from [&lt;c02abd80&gt;] (__rtc_register_device+0x124/0x2ec)
[&lt;c02abd80&gt;] (__rtc_register_device) from [&lt;c02b028c&gt;] (ep93xx_rtc_probe+0xa4/0xac)
[&lt;c02b028c&gt;] (ep93xx_rtc_probe) from [&lt;c026424c&gt;] (platform_drv_probe+0x24/0x5c)
[&lt;c026424c&gt;] (platform_drv_probe) from [&lt;c0262918&gt;] (really_probe+0x218/0x374)
[&lt;c0262918&gt;] (really_probe) from [&lt;c0262da0&gt;] (device_driver_attach+0x44/0x60)
[&lt;c0262da0&gt;] (device_driver_attach) from [&lt;c0262e70&gt;] (__driver_attach+0xb4/0xc0)
[&lt;c0262e70&gt;] (__driver_attach) from [&lt;c0260d44&gt;] (bus_for_each_dev+0x68/0xac)
[&lt;c0260d44&gt;] (bus_for_each_dev) from [&lt;c026223c&gt;] (driver_attach+0x18/0x24)
[&lt;c026223c&gt;] (driver_attach) from [&lt;c0261dd8&gt;] (bus_add_driver+0x150/0x1b4)
[&lt;c0261dd8&gt;] (bus_add_driver) from [&lt;c026342c&gt;] (driver_register+0xb0/0xf4)
[&lt;c026342c&gt;] (driver_register) from [&lt;c0264210&gt;] (__platform_driver_register+0x30/0x48)
[&lt;c0264210&gt;] (__platform_driver_register) from [&lt;c04cb9ac&gt;] (ep93xx_rtc_driver_init+0x10/0x1c)
[&lt;c04cb9ac&gt;] (ep93xx_rtc_driver_init) from [&lt;c000973c&gt;] (do_one_initcall+0x7c/0x1c0)
[&lt;c000973c&gt;] (do_one_initcall) from [&lt;c04b9ecc&gt;] (kernel_init_freeable+0x168/0x1ac)
[&lt;c04b9ecc&gt;] (kernel_init_freeable) from [&lt;c03b2228&gt;] (kernel_init+0x8/0xf4)
[&lt;c03b2228&gt;] (kernel_init) from [&lt;c00082c0&gt;] (ret_from_fork+0x14/0x34)
Exception stack(0xc441dfb0 to 0xc441dff8)
dfa0:                                     00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
Code: e12fff1e e92d4010 e590303c e1a02001 (e5933000)
---[ end trace c914d6030eaa95c8 ]---

Fixes: b809d192eb98 ("rtc: ep93xx: stop setting platform_data")
Signed-off-by: Nikita Shubin &lt;nikita.shubin@maquefel.me&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201201095507.10317-1-nikita.shubin@maquefel.me
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rtc: pcf2127: fix pcf2127_nvmem_read/write() returns</title>
<updated>2020-12-30T10:51:02Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-10-22T07:04:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=de49a51e7938b77a4bc2e79733f57ecd15f75b50'/>
<id>urn:sha1:de49a51e7938b77a4bc2e79733f57ecd15f75b50</id>
<content type='text'>
[ Upstream commit ba1c30bf3f2536f248d262c6f257b5a787305991 ]

These functions should return zero on success.  Non-zero returns are
treated as error.  On some paths, this doesn't matter but in
nvmem_cell_read() a non-zero return would be passed to ERR_PTR() and
lead to an Oops.

Fixes: d6c3029f32f7 ("rtc: pcf2127: add support for accessing internal static RAM")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201022070451.GA2817669@mwanda
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtc: rx8010: don't modify the global rtc ops</title>
<updated>2020-11-05T10:43:33Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2020-09-14T15:45:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=da3ccf5b20458d1ceafc399130cb47aaac56428b'/>
<id>urn:sha1:da3ccf5b20458d1ceafc399130cb47aaac56428b</id>
<content type='text'>
commit d3b14296da69adb7825022f3224ac6137eb30abf upstream.

The way the driver is implemented is buggy for the (admittedly unlikely)
use case where there are two RTCs with one having an interrupt configured
and the second not. This is caused by the fact that we use a global
rtc_class_ops struct which we modify depending on whether the irq number
is present or not.

Fix it by using two const ops structs with and without alarm operations.
While at it: not being able to request a configured interrupt is an error
so don't ignore it and bail out of probe().

Fixes: ed13d89b08e3 ("rtc: Add Epson RX8010SJ RTC driver")
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200914154601.32245-2-brgl@bgdev.pl
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rtc: ds1374: fix possible race condition</title>
<updated>2020-10-01T11:17:43Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2020-03-06T07:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cdb785710edd3a4d6897df9e933b0cf8289dd50e'/>
<id>urn:sha1:cdb785710edd3a4d6897df9e933b0cf8289dd50e</id>
<content type='text'>
[ Upstream commit c11af8131a4e7ba1960faed731ee7e84c2c13c94 ]

The RTC IRQ is requested before the struct rtc_device is allocated,
this may lead to a NULL pointer dereference in the IRQ handler.

To fix this issue, allocating the rtc_device struct before requesting
the RTC IRQ using devm_rtc_allocate_device, and use rtc_register_device
to register the RTC device.

Link: https://lore.kernel.org/r/20200306073404.56921-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtc: sa1100: fix possible race condition</title>
<updated>2020-10-01T11:17:43Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2020-03-06T01:01:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=45c1212d91f7e2b8ec6c3760e97eb971a2aa646f'/>
<id>urn:sha1:45c1212d91f7e2b8ec6c3760e97eb971a2aa646f</id>
<content type='text'>
[ Upstream commit f2997775b111c6d660c32a18d5d44d37cb7361b1 ]

Both RTC IRQs are requested before the struct rtc_device is allocated,
this may lead to a NULL pointer dereference in the IRQ handler.

To fix this issue, allocating the rtc_device struct before requesting
the IRQs using devm_rtc_allocate_device, and use rtc_register_device
to register the RTC device.

Link: https://lore.kernel.org/r/20200306010146.39762-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtc: goldfish: Enable interrupt in set_alarm() when necessary</title>
<updated>2020-08-26T08:40:54Z</updated>
<author>
<name>Huacai Chen</name>
<email>chenhc@lemote.com</email>
</author>
<published>2020-06-20T12:04:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f948f1d02237038c05a84249d6972aca351537c0'/>
<id>urn:sha1:f948f1d02237038c05a84249d6972aca351537c0</id>
<content type='text'>
[ Upstream commit 22f8d5a1bf230cf8567a4121fc3789babb46336d ]

When use goldfish rtc, the "hwclock" command fails with "select() to
/dev/rtc to wait for clock tick timed out". This is because "hwclock"
need the set_alarm() hook to enable interrupt when alrm-&gt;enabled is
true. This operation is missing in goldfish rtc (but other rtc drivers,
such as cmos rtc, enable interrupt here), so add it.

Signed-off-by: Huacai Chen &lt;chenhc@lemote.com&gt;
Signed-off-by: Jiaxun Yang &lt;jiaxun.yang@flygoat.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/1592654683-31314-1-git-send-email-chenhc@lemote.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtc: rv3028: Add missed check for devm_regmap_init_i2c()</title>
<updated>2020-06-24T15:50:36Z</updated>
<author>
<name>Chuhong Yuan</name>
<email>hslester96@gmail.com</email>
</author>
<published>2020-05-28T10:39:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2d9c7e0ff9f427f4e1bfdbfecb91d3e6e3fcce43'/>
<id>urn:sha1:2d9c7e0ff9f427f4e1bfdbfecb91d3e6e3fcce43</id>
<content type='text'>
[ Upstream commit c3b29bf6f166f6ed5f04f9c125477358e0e25df8 ]

rv3028_probe() misses a check for devm_regmap_init_i2c().
Add the missed check to fix it.

Fixes: e6e7376cfd7b ("rtc: rv3028: add new driver")
Signed-off-by: Chuhong Yuan &lt;hslester96@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20200528103950.912353-1-hslester96@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
