<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/rtc, branch v4.14.249</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>rtc: tps65910: Correct driver module alias</title>
<updated>2021-09-22T09:45:23+00:00</updated>
<author>
<name>Dmitry Osipenko</name>
<email>digetx@gmail.com</email>
</author>
<published>2021-08-08T16:00:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=fe6cdaa9ad3c8bae5829bbc52aa1b0871d91b0fd'/>
<id>fe6cdaa9ad3c8bae5829bbc52aa1b0871d91b0fd</id>
<content type='text'>
commit 8d448fa0a8bb1c8d94eef7647edffe9ac81a281e upstream.

The TPS65910 RTC driver module doesn't auto-load because of the wrong
module alias that doesn't match the device name, fix it.

Cc: stable@vger.kernel.org
Reported-by: Anton Bambura &lt;jenneron@protonmail.com&gt;
Tested-by: Anton Bambura &lt;jenneron@protonmail.com&gt;
Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210808160030.8556-1-digetx@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 8d448fa0a8bb1c8d94eef7647edffe9ac81a281e upstream.

The TPS65910 RTC driver module doesn't auto-load because of the wrong
module alias that doesn't match the device name, fix it.

Cc: stable@vger.kernel.org
Reported-by: Anton Bambura &lt;jenneron@protonmail.com&gt;
Tested-by: Anton Bambura &lt;jenneron@protonmail.com&gt;
Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210808160030.8556-1-digetx@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: max77686: Do not enforce (incorrect) interrupt trigger type</title>
<updated>2021-07-28T09:12:15+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2021-05-26T17:20:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=f1dc036af172b536147115e59163e6be90ff8c95'/>
<id>f1dc036af172b536147115e59163e6be90ff8c95</id>
<content type='text'>
[ Upstream commit 742b0d7e15c333303daad4856de0764f4bc83601 ]

Interrupt line can be configured on different hardware in different way,
even inverted.  Therefore driver should not enforce specific trigger
type - edge falling - but instead rely on Devicetree to configure it.

The Maxim 77686 datasheet describes the interrupt line as active low
with a requirement of acknowledge from the CPU therefore the edge
falling is not correct.

The interrupt line is shared between PMIC and RTC driver, so using level
sensitive interrupt is here especially important to avoid races.  With
an edge configuration in case if first PMIC signals interrupt followed
shortly after by the RTC, the interrupt might not be yet cleared/acked
thus the second one would not be noticed.

Signed-off-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/20210526172036.183223-6-krzysztof.kozlowski@canonical.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 742b0d7e15c333303daad4856de0764f4bc83601 ]

Interrupt line can be configured on different hardware in different way,
even inverted.  Therefore driver should not enforce specific trigger
type - edge falling - but instead rely on Devicetree to configure it.

The Maxim 77686 datasheet describes the interrupt line as active low
with a requirement of acknowledge from the CPU therefore the edge
falling is not correct.

The interrupt line is shared between PMIC and RTC driver, so using level
sensitive interrupt is here especially important to avoid races.  With
an edge configuration in case if first PMIC signals interrupt followed
shortly after by the RTC, the interrupt might not be yet cleared/acked
thus the second one would not be noticed.

Signed-off-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/20210526172036.183223-6-krzysztof.kozlowski@canonical.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: fix snprintf() checking in is_rtc_hctosys()</title>
<updated>2021-07-20T14:17:54+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2021-05-11T07:19:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=8f256b32b5c2d6350634f37e1f8a0692002734a4'/>
<id>8f256b32b5c2d6350634f37e1f8a0692002734a4</id>
<content type='text'>
[ Upstream commit 54b909436ede47e0ee07f1765da27ec2efa41e84 ]

The scnprintf() function silently truncates the printf() and returns
the number bytes that it was able to copy (not counting the NUL
terminator).  Thus, the highest value it can return here is
"NAME_SIZE - 1" and the overflow check is dead code.  Fix this by
using the snprintf() function which returns the number of bytes that
would have been copied if there was enough space and changing the
condition from "&gt; NAME_SIZE" to "&gt;= NAME_SIZE".

Fixes: 92589c986b33 ("rtc-proc: permit the /proc/driver/rtc device to use other devices")
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/YJov/pcGmhLi2pEl@mwanda
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 54b909436ede47e0ee07f1765da27ec2efa41e84 ]

The scnprintf() function silently truncates the printf() and returns
the number bytes that it was able to copy (not counting the NUL
terminator).  Thus, the highest value it can return here is
"NAME_SIZE - 1" and the overflow check is dead code.  Fix this by
using the snprintf() function which returns the number of bytes that
would have been copied if there was enough space and changing the
condition from "&gt; NAME_SIZE" to "&gt;= NAME_SIZE".

Fixes: 92589c986b33 ("rtc-proc: permit the /proc/driver/rtc device to use other devices")
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/YJov/pcGmhLi2pEl@mwanda
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: stm32: Fix unbalanced clk_disable_unprepare() on probe error path</title>
<updated>2021-07-20T14:17:29+00:00</updated>
<author>
<name>Martin Fuzzey</name>
<email>martin.fuzzey@flowbird.group</email>
</author>
<published>2021-06-07T17:36:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=e73dcdf669fb0951c9e2c160f9e9da8c522b0a09'/>
<id>e73dcdf669fb0951c9e2c160f9e9da8c522b0a09</id>
<content type='text'>
commit 950ac33dbe6ff656a623d862022f0762ec061ba7 upstream.

The STM32MP1 RTC may have 2 clocks, the pclk and the rtc_ck.

If clk_prepare_enable() fails for the second clock (rtc_ck) we must only
call clk_disable_unprepare() for the first clock (pclk) but currently we
call it on both leading to a WARN:

[   15.629568] WARNING: CPU: 0 PID: 146 at drivers/clk/clk.c:958 clk_core_disable+0xb0/0xc8
[   15.637620] ck_rtc already disabled
[   15.663322] CPU: 0 PID: 146 Comm: systemd-udevd Not tainted 5.4.77-pknbsp-svn5759-atag-v5.4.77-204-gea4235203137-dirty #2413
[   15.674510] Hardware name: STM32 (Device Tree Support)
[   15.679658] [&lt;c0111148&gt;] (unwind_backtrace) from [&lt;c010c0b8&gt;] (show_stack+0x10/0x14)
[   15.687371] [&lt;c010c0b8&gt;] (show_stack) from [&lt;c0ab3d28&gt;] (dump_stack+0xc0/0xe0)
[   15.694574] [&lt;c0ab3d28&gt;] (dump_stack) from [&lt;c012360c&gt;] (__warn+0xc8/0xf0)
[   15.701428] [&lt;c012360c&gt;] (__warn) from [&lt;c0123694&gt;] (warn_slowpath_fmt+0x60/0x94)
[   15.708894] [&lt;c0123694&gt;] (warn_slowpath_fmt) from [&lt;c053b518&gt;] (clk_core_disable+0xb0/0xc8)
[   15.717230] [&lt;c053b518&gt;] (clk_core_disable) from [&lt;c053c190&gt;] (clk_core_disable_lock+0x18/0x24)
[   15.725924] [&lt;c053c190&gt;] (clk_core_disable_lock) from [&lt;bf0adc44&gt;] (stm32_rtc_probe+0x124/0x5e4 [rtc_stm32])
[   15.735739] [&lt;bf0adc44&gt;] (stm32_rtc_probe [rtc_stm32]) from [&lt;c05f7d4c&gt;] (platform_drv_probe+0x48/0x98)
[   15.745095] [&lt;c05f7d4c&gt;] (platform_drv_probe) from [&lt;c05f5cec&gt;] (really_probe+0x1f0/0x458)
[   15.753338] [&lt;c05f5cec&gt;] (really_probe) from [&lt;c05f61c4&gt;] (driver_probe_device+0x70/0x1c4)
[   15.761584] [&lt;c05f61c4&gt;] (driver_probe_device) from [&lt;c05f6580&gt;] (device_driver_attach+0x58/0x60)
[   15.770439] [&lt;c05f6580&gt;] (device_driver_attach) from [&lt;c05f6654&gt;] (__driver_attach+0xcc/0x170)
[   15.779032] [&lt;c05f6654&gt;] (__driver_attach) from [&lt;c05f40d8&gt;] (bus_for_each_dev+0x58/0x7c)
[   15.787191] [&lt;c05f40d8&gt;] (bus_for_each_dev) from [&lt;c05f4ffc&gt;] (bus_add_driver+0xdc/0x1f8)
[   15.795352] [&lt;c05f4ffc&gt;] (bus_add_driver) from [&lt;c05f6ed8&gt;] (driver_register+0x7c/0x110)
[   15.803425] [&lt;c05f6ed8&gt;] (driver_register) from [&lt;c01027bc&gt;] (do_one_initcall+0x70/0x1b8)
[   15.811588] [&lt;c01027bc&gt;] (do_one_initcall) from [&lt;c01a1094&gt;] (do_init_module+0x58/0x1f8)
[   15.819660] [&lt;c01a1094&gt;] (do_init_module) from [&lt;c01a0074&gt;] (load_module+0x1e58/0x23c8)
[   15.827646] [&lt;c01a0074&gt;] (load_module) from [&lt;c01a0860&gt;] (sys_finit_module+0xa0/0xd4)
[   15.835459] [&lt;c01a0860&gt;] (sys_finit_module) from [&lt;c01011e0&gt;] (__sys_trace_return+0x0/0x20)

Signed-off-by: Martin Fuzzey &lt;martin.fuzzey@flowbird.group&gt;
Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver")
Cc: stable@vger.kernel.org
Reviewed-by: Nobuhiro Iwamatsu &lt;iwamatsu@nigauri.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/1623087421-19722-1-git-send-email-martin.fuzzey@flowbird.group
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 950ac33dbe6ff656a623d862022f0762ec061ba7 upstream.

The STM32MP1 RTC may have 2 clocks, the pclk and the rtc_ck.

If clk_prepare_enable() fails for the second clock (rtc_ck) we must only
call clk_disable_unprepare() for the first clock (pclk) but currently we
call it on both leading to a WARN:

[   15.629568] WARNING: CPU: 0 PID: 146 at drivers/clk/clk.c:958 clk_core_disable+0xb0/0xc8
[   15.637620] ck_rtc already disabled
[   15.663322] CPU: 0 PID: 146 Comm: systemd-udevd Not tainted 5.4.77-pknbsp-svn5759-atag-v5.4.77-204-gea4235203137-dirty #2413
[   15.674510] Hardware name: STM32 (Device Tree Support)
[   15.679658] [&lt;c0111148&gt;] (unwind_backtrace) from [&lt;c010c0b8&gt;] (show_stack+0x10/0x14)
[   15.687371] [&lt;c010c0b8&gt;] (show_stack) from [&lt;c0ab3d28&gt;] (dump_stack+0xc0/0xe0)
[   15.694574] [&lt;c0ab3d28&gt;] (dump_stack) from [&lt;c012360c&gt;] (__warn+0xc8/0xf0)
[   15.701428] [&lt;c012360c&gt;] (__warn) from [&lt;c0123694&gt;] (warn_slowpath_fmt+0x60/0x94)
[   15.708894] [&lt;c0123694&gt;] (warn_slowpath_fmt) from [&lt;c053b518&gt;] (clk_core_disable+0xb0/0xc8)
[   15.717230] [&lt;c053b518&gt;] (clk_core_disable) from [&lt;c053c190&gt;] (clk_core_disable_lock+0x18/0x24)
[   15.725924] [&lt;c053c190&gt;] (clk_core_disable_lock) from [&lt;bf0adc44&gt;] (stm32_rtc_probe+0x124/0x5e4 [rtc_stm32])
[   15.735739] [&lt;bf0adc44&gt;] (stm32_rtc_probe [rtc_stm32]) from [&lt;c05f7d4c&gt;] (platform_drv_probe+0x48/0x98)
[   15.745095] [&lt;c05f7d4c&gt;] (platform_drv_probe) from [&lt;c05f5cec&gt;] (really_probe+0x1f0/0x458)
[   15.753338] [&lt;c05f5cec&gt;] (really_probe) from [&lt;c05f61c4&gt;] (driver_probe_device+0x70/0x1c4)
[   15.761584] [&lt;c05f61c4&gt;] (driver_probe_device) from [&lt;c05f6580&gt;] (device_driver_attach+0x58/0x60)
[   15.770439] [&lt;c05f6580&gt;] (device_driver_attach) from [&lt;c05f6654&gt;] (__driver_attach+0xcc/0x170)
[   15.779032] [&lt;c05f6654&gt;] (__driver_attach) from [&lt;c05f40d8&gt;] (bus_for_each_dev+0x58/0x7c)
[   15.787191] [&lt;c05f40d8&gt;] (bus_for_each_dev) from [&lt;c05f4ffc&gt;] (bus_add_driver+0xdc/0x1f8)
[   15.795352] [&lt;c05f4ffc&gt;] (bus_add_driver) from [&lt;c05f6ed8&gt;] (driver_register+0x7c/0x110)
[   15.803425] [&lt;c05f6ed8&gt;] (driver_register) from [&lt;c01027bc&gt;] (do_one_initcall+0x70/0x1b8)
[   15.811588] [&lt;c01027bc&gt;] (do_one_initcall) from [&lt;c01a1094&gt;] (do_init_module+0x58/0x1f8)
[   15.819660] [&lt;c01a1094&gt;] (do_init_module) from [&lt;c01a0074&gt;] (load_module+0x1e58/0x23c8)
[   15.827646] [&lt;c01a0074&gt;] (load_module) from [&lt;c01a0860&gt;] (sys_finit_module+0xa0/0xd4)
[   15.835459] [&lt;c01a0860&gt;] (sys_finit_module) from [&lt;c01011e0&gt;] (__sys_trace_return+0x0/0x20)

Signed-off-by: Martin Fuzzey &lt;martin.fuzzey@flowbird.group&gt;
Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver")
Cc: stable@vger.kernel.org
Reviewed-by: Nobuhiro Iwamatsu &lt;iwamatsu@nigauri.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/1623087421-19722-1-git-send-email-martin.fuzzey@flowbird.group
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1307: Fix wday settings for rx8130</title>
<updated>2021-05-22T08:57:38+00:00</updated>
<author>
<name>Nobuhiro Iwamatsu</name>
<email>nobuhiro1.iwamatsu@toshiba.co.jp</email>
</author>
<published>2021-04-20T02:39:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=2e6bd9b0fd38feff1d0944a517656528803e0116'/>
<id>2e6bd9b0fd38feff1d0944a517656528803e0116</id>
<content type='text'>
[ Upstream commit 204756f016726a380bafe619438ed979088bd04a ]

rx8130 wday specifies the bit position, not BCD.

Fixes: ee0981be7704 ("rtc: ds1307: Add support for Epson RX8130CE")
Signed-off-by: Nobuhiro Iwamatsu &lt;nobuhiro1.iwamatsu@toshiba.co.jp&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210420023917.1949066-1-nobuhiro1.iwamatsu@toshiba.co.jp
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 204756f016726a380bafe619438ed979088bd04a ]

rx8130 wday specifies the bit position, not BCD.

Fixes: ee0981be7704 ("rtc: ds1307: Add support for Epson RX8130CE")
Signed-off-by: Nobuhiro Iwamatsu &lt;nobuhiro1.iwamatsu@toshiba.co.jp&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210420023917.1949066-1-nobuhiro1.iwamatsu@toshiba.co.jp
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: s5m: select REGMAP_I2C</title>
<updated>2021-03-03T17:22:45+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2021-01-14T10:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=64a33289241f1475fd9a9fd87dd6ba88dfe05fcc'/>
<id>64a33289241f1475fd9a9fd87dd6ba88dfe05fcc</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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ 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;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: sun6i: Fix memleak in sun6i_rtc_clk_init</title>
<updated>2021-01-09T12:37:38+00:00</updated>
<author>
<name>Dinghao Liu</name>
<email>dinghao.liu@zju.edu.cn</email>
</author>
<published>2020-10-20T06:12:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=3ce2fd56bb342f15cc2184ec321610546bfe6f26'/>
<id>3ce2fd56bb342f15cc2184ec321610546bfe6f26</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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ 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;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: rx8010: don't modify the global rtc ops</title>
<updated>2020-11-05T10:07:04+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2020-09-14T15:45:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=5f8788b5e9edd11e0d66d4f8557d7a0aae4bfe73'/>
<id>5f8788b5e9edd11e0d66d4f8557d7a0aae4bfe73</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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;


</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1374: fix possible race condition</title>
<updated>2020-10-01T11:12:38+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2020-03-06T07:34:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=e309db54d9e8ba0fb793536f97c062f88c963f4a'/>
<id>e309db54d9e8ba0fb793536f97c062f88c963f4a</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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ 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;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: goldfish: Enable interrupt in set_alarm() when necessary</title>
<updated>2020-08-26T08:29:55+00:00</updated>
<author>
<name>Huacai Chen</name>
<email>chenhc@lemote.com</email>
</author>
<published>2020-06-20T12:04:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=59e8bcc1f6fa6512786c6b703496bc6d3446f5c2'/>
<id>59e8bcc1f6fa6512786c6b703496bc6d3446f5c2</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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ 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;
</pre>
</div>
</content>
</entry>
</feed>
