<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/rtc/rtc-stm32.c, branch v6.18.22</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-06-18T11:26:37+00:00</updated>
<entry>
<title>rtc: stm32: Constify static 'pinctrl_desc'</title>
<updated>2025-06-18T11:26:37+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2025-06-11T06:13:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5409d619f127cf121e572046aa6e2ed81c98d9bb'/>
<id>urn:sha1:5409d619f127cf121e572046aa6e2ed81c98d9bb</id>
<content type='text'>
The local static 'struct pinctrl_desc' is not modified, so can be made
const for code safety.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/20250611-pinctrl-const-desc-v2-17-b11c1d650384@linaro.org
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>rtc: stm32: drop unused module alias</title>
<updated>2025-05-24T21:58:24+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan+linaro@kernel.org</email>
</author>
<published>2025-04-23T13:03:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3639b35857e2cc5a75de6f2bb10a1cc3f949193f'/>
<id>urn:sha1:3639b35857e2cc5a75de6f2bb10a1cc3f949193f</id>
<content type='text'>
The driver only support OF probe so drop the unused platform module
alias.

Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver")
Signed-off-by: Johan Hovold &lt;johan+linaro@kernel.org&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20250423130318.31244-8-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: stm32: Use resource managed API to simplify code</title>
<updated>2025-03-03T21:52:29+00:00</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2025-02-05T00:58:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=04572d18921d47939465d2cba32c19d05f27cda9'/>
<id>urn:sha1:04572d18921d47939465d2cba32c19d05f27cda9</id>
<content type='text'>
Use devm_pm_set_wake_irq and devm_device_init_wakeup to cleanup the
error handling code and 'driver.remove()' hook.

Reviewed-by: Antonio Borneo &lt;antonio.borneo@foss.st.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Link: https://lore.kernel.org/r/20250205-rtc-cleanup-v1-1-66165678e089@nxp.com
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:39+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2025-01-11T18:54:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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: Switch back to struct platform_driver::remove()</title>
<updated>2024-11-10T21:58:28+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-10-07T20:58:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5eab1aeae765c30bd2ef50156dc9698c239ad31'/>
<id>urn:sha1:e5eab1aeae765c30bd2ef50156dc9698c239ad31</id>
<content type='text'>
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/rtc to use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Link: https://lore.kernel.org/r/20241007205803.444994-6-u.kleine-koenig@baylibre.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: stm32: add alarm A out feature</title>
<updated>2024-08-14T09:37:07+00:00</updated>
<author>
<name>Valentin Caron</name>
<email>valentin.caron@foss.st.com</email>
</author>
<published>2024-07-22T16:00:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=04dcadb87da68d1349b658b1fef04f077b78c13c'/>
<id>urn:sha1:04dcadb87da68d1349b658b1fef04f077b78c13c</id>
<content type='text'>
STM32 RTC can pulse some SOC pins when an RTC alarm expires.
This patch adds this functionality for alarm A. The pulse can out on three
pins RTC_OUT1, RTC_OUT2, RTC_OUT2_RMP (PC13, PB2, PI8 on stm32mp15)
(PC13, PB2, PI1 on stm32mp13) (PC13, PF4/PF6, PI8 on stm32mp25).

This patch only adds the functionality for devices which are using
st,stm32mp1-rtc and st,stm32mp25-rtc compatible.

Add "alarm-a" in pinmux functions.

Signed-off-by: Valentin Caron &lt;valentin.caron@foss.st.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20240722160022.454226-5-valentin.caron@foss.st.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: stm32: add Low Speed Clock Output (LSCO) support</title>
<updated>2024-08-14T09:37:07+00:00</updated>
<author>
<name>Valentin Caron</name>
<email>valentin.caron@foss.st.com</email>
</author>
<published>2024-07-22T16:00:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb7b0df2be5c6b7bfe0cf9c93067c5b1489566ca'/>
<id>urn:sha1:bb7b0df2be5c6b7bfe0cf9c93067c5b1489566ca</id>
<content type='text'>
RTC is able to output on a pin the "LSE" internal clock.

STM32 RTC is now registered as a clock provider.
It provides rtc_lsco clock, that means RTC_LSCO is output on either
RTC_OUT1 or RTC_OUT2_RMP, depending on pinmux DT property.
The clock is marked as CLK_IGNORE_UNUSED and CLK_IS_CRITICAL because
RTC_LSCO can be early required by devices needed it to init.

Add LSCO in pinmux functions.

Add "stm32_rtc_clean_outs" to disable LSCO. As RTC is part of "backup"
power domain, it is not reset during shutdown or reboot. So force LSCO
disable at probe.

Co-developed-by: Amelie Delaunay &lt;amelie.delaunay@foss.st.com&gt;
Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@foss.st.com&gt;
Signed-off-by: Valentin Caron &lt;valentin.caron@foss.st.com&gt;
Link: https://lore.kernel.org/r/20240722160022.454226-4-valentin.caron@foss.st.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: stm32: add pinctrl and pinmux interfaces</title>
<updated>2024-08-14T09:37:07+00:00</updated>
<author>
<name>Valentin Caron</name>
<email>valentin.caron@foss.st.com</email>
</author>
<published>2024-07-22T16:00:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=16ad2bc09efbcb9cb24f8d879ac218421cbef690'/>
<id>urn:sha1:16ad2bc09efbcb9cb24f8d879ac218421cbef690</id>
<content type='text'>
STM32 RTC is capable to handle 3 specific pins of the soc.
"out1, out2 and out2_rmp". To handle this, we use pinctrl framework.
There is a single pin per group.

Signed-off-by: Valentin Caron &lt;valentin.caron@foss.st.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20240722160022.454226-3-valentin.caron@foss.st.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: stm32: add new st,stm32mp25-rtc compatible and check RIF configuration</title>
<updated>2024-07-10T15:15:33+00:00</updated>
<author>
<name>Valentin Caron</name>
<email>valentin.caron@foss.st.com</email>
</author>
<published>2024-07-08T15:34:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=efa9c5be2caecae7dfa4f29c6ab3d4a2f341eb15'/>
<id>urn:sha1:efa9c5be2caecae7dfa4f29c6ab3d4a2f341eb15</id>
<content type='text'>
Introduce new st,stm32mp25-rtc compatible. It is based on st,stm32mp1-rtc.

Difference is that stm32mp25 soc implements a triple protection on RTC
registers:
- Secure bit based protection
- Privileged context based protection
- Compartment ID filtering based protection
This driver will now check theses configurations before probing to avoid
exceptions and fake reads on register.

At this time, driver needs only to check two resources: INIT and ALARM_A.
Other resources are not used.

Resource isolation framework (RIF) is a comprehensive set of hardware
blocks designed to enforce and manage isolation of STM32 hardware
resources, like memory and peripherals.

Link: https://www.st.com/resource/en/reference_manual/rm0457-stm32mp25xx-advanced-armbased-3264bit-mpus-stmicroelectronics.pdf#page=4081
Signed-off-by: Valentin Caron &lt;valentin.caron@foss.st.com&gt;
Link: https://lore.kernel.org/r/20240708153434.416287-3-valentin.caron@foss.st.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: stm32: Use NOIRQ_SYSTEM_SLEEP_PM_OPS()</title>
<updated>2023-08-16T22:53:00+00:00</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2023-08-15T22:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2cf2a1acc6ebdffc6363de9156db8737f33c1803'/>
<id>urn:sha1:2cf2a1acc6ebdffc6363de9156db8737f33c1803</id>
<content type='text'>
After the switch to SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() and a subsequent
fix, stm32_rtc_{suspend,resume}() are unused when CONFIG_PM_SLEEP is not
set because SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() is a no-op in that
configuration:

  drivers/rtc/rtc-stm32.c:904:12: error: 'stm32_rtc_resume' defined but not used [-Werror=unused-function]
    904 | static int stm32_rtc_resume(struct device *dev)
        |            ^~~~~~~~~~~~~~~~
  drivers/rtc/rtc-stm32.c:894:12: error: 'stm32_rtc_suspend' defined but not used [-Werror=unused-function]
    894 | static int stm32_rtc_suspend(struct device *dev)
        |            ^~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

The non-"SET_" version of this macro, NOIRQ_SYSTEM_SLEEP_PM_OPS(), is
designed to handle this situation by only assigning the callbacks when
CONFIG_PM_SLEEP is set while allowing the functions to appear used to
the compiler. Switch to that macro to resolve the warnings. There is no
functional change with this, as SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() is
defined using NOIRQ_SYSTEM_SLEEP_PM_OPS() when CONFIG_PM_SLEEP is set.

Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20230815-rtc-stm32-unused-pm-funcs-v1-1-82eb8e02d903@kernel.org
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
</feed>
