<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/rtc, branch v6.14</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=v6.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-01-31T01:50:02Z</updated>
<entry>
<title>Merge tag 'rtc-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux</title>
<updated>2025-01-31T01:50:02Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-01-31T01:50:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2a9f04bde07a35530d53b71628cdc950dac86eab'/>
<id>urn:sha1:2a9f04bde07a35530d53b71628cdc950dac86eab</id>
<content type='text'>
Pull RTC updates from Alexandre Belloni:
 "Not much this cycle, there are multiple small fixes.

  Core:
   - use boolean values with device_init_wakeup()

  Drivers:
   - pcf2127: add BSM support
   - pcf85063: fix possible out of bounds write"

* tag 'rtc-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  rtc: pcf2127: add BSM support
  rtc: Remove hpet_rtc_dropped_irq()
  dt-bindings: rtc: mxc: Document fsl,imx31-rtc
  rtc: stm32: Use syscon_regmap_lookup_by_phandle_args
  rtc: zynqmp: Fix optional clock name property
  rtc: loongson: clear TOY_MATCH0_REG in loongson_rtc_isr()
  rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read
  rtc: tps6594: Fix integer overflow on 32bit systems
  rtc: use boolean values with device_init_wakeup()
  rtc: RTC_DRV_SPEAR should not default to y when compile-testing
</content>
</entry>
<entry>
<title>rtc: pcf2127: add BSM support</title>
<updated>2025-01-28T23:42:29Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2025-01-27T16:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=97274527e8dc709bbb4c7cb44279a12d085da9ef'/>
<id>urn:sha1:97274527e8dc709bbb4c7cb44279a12d085da9ef</id>
<content type='text'>
The pcf2127 encodes BSM, BLD and power fail detection in the same set of
bits so it is necessary to do some calculation when changing BSM to keep
the rest of the configuration as-is. However, when BSM is disabled, there
is no configuration with BLD enabled so this will be lost when coming back
to a mode with BSM enabled.

Link: https://lore.kernel.org/r/20250127162728.86234-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: Remove hpet_rtc_dropped_irq()</title>
<updated>2025-01-13T22:07:18Z</updated>
<author>
<name>Dr. David Alan Gilbert</name>
<email>linux@treblig.org</email>
</author>
<published>2024-12-15T02:23:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=58589c6a6e9ed8781eb8876ece5f4ef4c8dc3eed'/>
<id>urn:sha1:58589c6a6e9ed8781eb8876ece5f4ef4c8dc3eed</id>
<content type='text'>
hpet_rtc_dropped_irq() has been unused since
commit f52ef24be21a ("rtc/alpha: remove legacy rtc driver")

Remove it in rtc, and x86 hpet code.

Signed-off-by: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Acked-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://lore.kernel.org/r/20241215022356.181625-1-linux@treblig.org
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: stm32: Use syscon_regmap_lookup_by_phandle_args</title>
<updated>2025-01-13T08:33:39Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2025-01-11T18:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3f76ba88c3fda18dd71296aa87e775e56c29a3d5'/>
<id>urn:sha1:3f76ba88c3fda18dd71296aa87e775e56c29a3d5</id>
<content type='text'>
Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over
syscon_regmap_lookup_by_phandle() combined with getting the syscon
argument.  Except simpler code this annotates within one line that given
phandle has arguments, so grepping for code would be easier.

There is also no real benefit in printing errors on missing syscon
argument, because this is done just too late: runtime check on
static/build-time data.  Dtschema and Devicetree bindings offer the
static/build-time check for this already.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20250111185405.183824-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: zynqmp: Fix optional clock name property</title>
<updated>2025-01-12T23:41:24Z</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@amd.com</email>
</author>
<published>2024-11-27T16:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2a388ff22d2cbfc5cbd628ef085bdcd3b7dc64f5'/>
<id>urn:sha1:2a388ff22d2cbfc5cbd628ef085bdcd3b7dc64f5</id>
<content type='text'>
Clock description in DT binding introduced by commit f69060c14431
("dt-bindings: rtc: zynqmp: Add clock information") is talking about "rtc"
clock name but driver is checking "rtc_clk" name instead.
Because clock is optional property likely in was never handled properly by
the driver.

Fixes: 07dcc6f9c762 ("rtc: zynqmp: Add calibration set and get support")
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
Cc: stable@kernel.org
Reviewed-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
Link: https://lore.kernel.org/r/cd5f0c9d01ec1f5a240e37a7e0d85b8dacb3a869.1732723280.git.michal.simek@amd.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: loongson: clear TOY_MATCH0_REG in loongson_rtc_isr()</title>
<updated>2025-01-12T23:39:36Z</updated>
<author>
<name>Ming Wang</name>
<email>wangming01@loongson.cn</email>
</author>
<published>2024-12-05T11:43:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=09471d8f5b390883eaf21b917c4bf3ced1b8a1df'/>
<id>urn:sha1:09471d8f5b390883eaf21b917c4bf3ced1b8a1df</id>
<content type='text'>
The TOY_MATCH0_REG should be cleared to 0 in the RTC interrupt handler,
otherwise the interrupt cannot be cleared, which will cause the
loongson_rtc_isr() to be triggered multiple times.

The previous code cleared TOY_MATCH0_REG in the loongson_rtc_handler(),
which is an ACPI interrupt. This did not prevent loongson_rtc_isr()
from being triggered multiple times.

This commit moves the clearing of TOY_MATCH0_REG to the
loongson_rtc_isr() to ensure that the interrupt is properly cleared.

Fixes: 1b733a9ebc3d ("rtc: Add rtc driver for the Loongson family chips")
Signed-off-by: Ming Wang &lt;wangming01@loongson.cn&gt;
Reviewed-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
Reviewed-by: Keguang Zhang &lt;keguang.zhang@gmail.com&gt; # on LS1B
Tested-by: Keguang Zhang &lt;keguang.zhang@gmail.com&gt;
Link: https://lore.kernel.org/r/20241205114307.1891418-1-wangming01@loongson.cn
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read</title>
<updated>2025-01-12T23:26:54Z</updated>
<author>
<name>Oleksij Rempel</name>
<email>o.rempel@pengutronix.de</email>
</author>
<published>2024-12-18T19:34:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3ab8c5ed4f84fa20cd16794fe8dc31f633fbc70c'/>
<id>urn:sha1:3ab8c5ed4f84fa20cd16794fe8dc31f633fbc70c</id>
<content type='text'>
The nvmem interface supports variable buffer sizes, while the regmap
interface operates with fixed-size storage. If an nvmem client uses a
buffer size less than 4 bytes, regmap_read will write out of bounds
as it expects the buffer to point at an unsigned int.

Fix this by using an intermediary unsigned int to hold the value.

Fixes: fadfd092ee91 ("rtc: pcf85063: add nvram support")
Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20241218-rtc-pcf85063-stack-corruption-v1-1-12fd0ee0f046@pengutronix.de
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: tps6594: Fix integer overflow on 32bit systems</title>
<updated>2025-01-12T23:20:55Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@linaro.org</email>
</author>
<published>2024-12-11T09:32:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=09c4a610153286cef54d4f0c85398f4e32fc227e'/>
<id>urn:sha1:09c4a610153286cef54d4f0c85398f4e32fc227e</id>
<content type='text'>
The problem is this multiply in tps6594_rtc_set_offset()

	tmp = offset * TICKS_PER_HOUR;

The "tmp" variable is an s64 but "offset" is a long in the
(-277774)-277774 range.  On 32bit systems a long can hold numbers up to
approximately two billion.  The number of TICKS_PER_HOUR is really large,
(32768 * 3600) or roughly a hundred million.  When you start multiplying
by a hundred million it doesn't take long to overflow the two billion
mark.

Probably the safest way to fix this is to change the type of
TICKS_PER_HOUR to long long because it's such a large number.

Fixes: 9f67c1e63976 ("rtc: tps6594: Add driver for TPS6594 RTC")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Link: https://lore.kernel.org/r/1074175e-5ecb-4e3d-b721-347d794caa90@stanley.mountain
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: use boolean values with device_init_wakeup()</title>
<updated>2025-01-09T17:29:24Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2024-12-17T07:13:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c28c4993f117e03130a51160229bde7ad388240'/>
<id>urn:sha1:8c28c4993f117e03130a51160229bde7ad388240</id>
<content type='text'>
device_init_wakeup() second argument is a bool type. Use proper boolean
values when calling it to match the type and to produce unambiguous code
which is easier to understand.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Reviewed-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Reviewed-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Link: https://lore.kernel.org/r/20241217071331.3607-2-wsa+renesas@sang-engineering.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: RTC_DRV_SPEAR should not default to y when compile-testing</title>
<updated>2025-01-09T17:14:30Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2024-12-03T16:25:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7158c61afdcff436d087a093b45f599bb8805434'/>
<id>urn:sha1:7158c61afdcff436d087a093b45f599bb8805434</id>
<content type='text'>
Merely enabling compile-testing should not enable additional
functionality.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Link: https://lore.kernel.org/r/7b8eefe3b0150101ba01c3ea55e45aa3134059ba.1733243007.git.geert+renesas@glider.be
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
</feed>
