Linux RTC
 help / color / mirror / Atom feed
* Re: [PATCH] rtc: interface: fix typos in rtc_handle_legacy_irq() documentation
From: Alexandre Belloni @ 2026-06-24 21:17 UTC (permalink / raw)
  To: Yahya Saqban; +Cc: linux-rtc, linux-kernel
In-Reply-To: <20260512210235.343070-1-yahyasaqban@gmail.com>

On Wed, 13 May 2026 00:02:35 +0300, Yahya Saqban wrote:
> Fix spelling of 'occurence' to 'occurrence' and 'of' to 'or' in the
> kernel-doc comment for rtc_handle_legacy_irq().

Applied, thanks!

[1/1] rtc: interface: fix typos in rtc_handle_legacy_irq() documentation
      https://git.kernel.org/abelloni/c/4202e4254403

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH v1] rtc: Use named initializers for arrays of i2c_device_data
From: Alexandre Belloni @ 2026-06-24 21:16 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub)
  Cc: Antoniu Miclaus, Andrew Jeffery, Avi Fishman, Tomer Maimon,
	Tali Perry, Patrick Venture, Nancy Yuen, Benjamin Fair,
	Tóth János, Dianlong Li, linux-rtc, linux-kernel,
	openbmc
In-Reply-To: <20260515154720.406128-2-u.kleine-koenig@baylibre.com>

On Fri, 15 May 2026 17:47:20 +0200, Uwe Kleine-König (The Capable Hub) wrote:
> While being less compact, using named initializers allows to more easily
> see which members of the structs are assigned which value without having
> to lookup the declaration of the struct. And it's also more robust
> against changes to the struct definition.
> 
> The mentioned robustness is relevant for a planned change to struct
> i2c_device_id that replaces .driver_data by an anonymous union.
> 
> [...]

Applied, thanks!

[1/1] rtc: Use named initializers for arrays of i2c_device_data
      https://git.kernel.org/abelloni/c/3eebec1cb5dc

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH] rtc: mv: add suspend/resume support for wakeup
From: Alexandre Belloni @ 2026-06-24 21:17 UTC (permalink / raw)
  To: Xue Lei; +Cc: linux-rtc, linux-kernel, xue.lei
In-Reply-To: <20260611023350.1370881-1-Xue.Lei@windriver.com>

On Thu, 11 Jun 2026 10:33:50 +0800, Xue Lei wrote:
> Add PM suspend/resume callbacks to enable/disable IRQ wake for the
> RTC alarm interrupt. This allows the RTC alarm to wake the system
> from STR (e.g. via rtcwake -m mem -s N).
> 
> Without this, the RTC IRQ is masked during suspend by the MPIC's
> IRQCHIP_MASK_ON_SUSPEND behavior, preventing alarm-based wakeup.
> 
> [...]

Applied, thanks!

[1/1] rtc: mv: add suspend/resume support for wakeup
      https://git.kernel.org/abelloni/c/851d961ff248

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH v1 0/3] rtc: Use named initializers for platform_device_id arrays
From: Alexandre Belloni @ 2026-06-24 21:16 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub)
  Cc: Benson Leung, Guenter Roeck, linux-rtc, chrome-platform,
	linux-kernel, Linus Walleij, linux-arm-kernel, Karel Balej,
	Matti Vaittinen, Chanwoo Choi, Krzysztof Kozlowski,
	André Draszik, linux-samsung-soc
In-Reply-To: <cover.1779950275.git.u.kleine-koenig@baylibre.com>

On Thu, 28 May 2026 08:48:09 +0200, Uwe Kleine-König (The Capable Hub) wrote:
> this series targets to use named initializers for platform_device_id
> arrays. In general these are better readable for humans and more robust
> to changes in the respective struct definition.
> 
> This robustness is needed as I want to do
> 
> 	diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> 	--- a/include/linux/mod_devicetable.h
> 	+++ b/include/linux/mod_devicetable.h
> 	@@ -610,4 +610,7 @@ struct dmi_system_id {
> 	 struct platform_device_id {
> 		char name[PLATFORM_NAME_SIZE];
> 	-	kernel_ulong_t driver_data;
> 	+	union {
> 	+		kernel_ulong_t driver_data;
> 	+		const void *driver_data_ptr;
> 	+	};
> 	 };
> 
> [...]

Applied, thanks!

[1/3] rtc: Drop unused assignment of platform_device_id driver data
      https://git.kernel.org/abelloni/c/ba5dca876b54
[2/3] rtc: ab8500: Simplify driver_data handling
      https://git.kernel.org/abelloni/c/6e2f1f0184da
[3/3] rtc: Use named initializers for platform_device_id arrays
      https://git.kernel.org/abelloni/c/041ca8884410

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH 0/2] rtc: aspeed: Add AST2700 RTC support
From: Alexandre Belloni @ 2026-06-24 21:16 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Joel Stanley,
	Andrew Jeffery, Tommy Huang
  Cc: linux-rtc, devicetree, linux-kernel, linux-arm-kernel,
	linux-aspeed
In-Reply-To: <20260601-ast2700-rtc-v1-0-15d4ca46500a@aspeedtech.com>

On Mon, 01 Jun 2026 17:14:05 +0800, Tommy Huang wrote:
> This patch series adds support for the ASPEED AST2700 RTC define,
> includeing dt-binding in the Document and rtc-aspeed.c

Applied, thanks!

[1/2] dt-bindings: rtc: add ASPEED AST2700 compatible
      https://git.kernel.org/abelloni/c/5e7f746bc106
[2/2] rtc: aspeed: add AST2700 compatible
      https://git.kernel.org/abelloni/c/3319cfeeb8c4

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH] rtc: msc313: fix NULL deref in shared IRQ handler at probe
From: Alexandre Belloni @ 2026-06-24 21:16 UTC (permalink / raw)
  To: Stepan Ionichev
  Cc: daniel, romain.perier, linux-arm-kernel, linux-rtc, linux-kernel
In-Reply-To: <20260511032703.48262-1-sozdayvek@gmail.com>

On Mon, 11 May 2026 08:27:03 +0500, Stepan Ionichev wrote:
> msc313_rtc_probe() calls devm_request_irq() with IRQF_SHARED and
> &pdev->dev as the cookie, but platform_set_drvdata() is only called
> later after the clock setup. With a shared IRQ line, another device
> on the same line can trigger the handler in that window. The
> handler does dev_get_drvdata() on the cookie, gets NULL, and
> dereferences priv->rtc_base in interrupt context.
> 
> [...]

Applied, thanks!

[1/1] rtc: msc313: fix NULL deref in shared IRQ handler at probe
      https://git.kernel.org/abelloni/c/a369f48be8de

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH v3] rtc: ds1307: handle oscillator stop flag for ds1337/ds1339/ds3231
From: Alexandre Belloni @ 2026-06-24 21:16 UTC (permalink / raw)
  To: Ronan Dalton
  Cc: linux-rtc, linux-kernel, Tyler Hicks, Sasha Levin, Meagan Lloyd,
	Rodolfo Giometti, Chris Packham
In-Reply-To: <20260508032518.3696705-2-ronan.dalton@alliedtelesis.co.nz>

On Fri, 08 May 2026 15:24:49 +1200, Ronan Dalton wrote:
> Prior to commit 48458654659c ("rtc: ds1307: remove clear of oscillator
> stop flag (OSF) in probe"), the oscillator stop flag (OSF) bit was
> checked during device probe for the ds1337, ds1339, ds1341, and ds3231
> chips; if it was set, it would be cleared and a warning would be logged
> saying "SET TIME!". Since that commit, the OSF bit is no longer cleared,
> but the warning is still printed.
> 
> [...]

Applied, thanks!

[1/1] rtc: ds1307: handle oscillator stop flag for ds1337/ds1339/ds3231
      https://git.kernel.org/abelloni/c/a091e1ba3b68

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH v2 0/5] rtc: renesas-rtca3: Various fixes and improvements
From: Alexandre Belloni @ 2026-06-24 21:16 UTC (permalink / raw)
  To: Claudiu Beznea, Geert Uytterhoeven, linux-rtc, Prabhakar
  Cc: linux-renesas-soc, linux-kernel, Biju Das, Fabrizio Castro,
	Lad Prabhakar
In-Reply-To: <20260602192559.1791344-1-prabhakar.mahadev-lad.rj@bp.renesas.com>

On Tue, 02 Jun 2026 20:25:54 +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> Hi all,
> 
> This patch series includes various fixes and improvements for the
> Renesas RTCA-3 RTC driver, including:
> - Fixing the polling condition when clearing the PIE bit during alarm
>   setup error handling.
> - Checking the result of the RADJ polling during initial setup and
>   propagating errors.
> - Correcting an error message related to reset control.
> - Fixing a typo in the documentation for the rtca3_ppb_per_cycle struct.
> - Refactoring year decoding logic into a helper function for better
>   readability.
> 
> [...]

Applied, thanks!

[1/5] rtc: renesas-rtca3: Fix PIE clear polling condition in alarm setup error path
      https://git.kernel.org/abelloni/c/7e342d87aa8e
[2/5] rtc: renesas-rtca3: Check RADJ poll result during initial setup
      https://git.kernel.org/abelloni/c/fafb016d0812
[3/5] rtc: renesas-rtca3: Fix incorrect error message for reset assert
      https://git.kernel.org/abelloni/c/09939630aad9
[4/5] rtc: renesas-rtca3: Fix typo in rtca3_ppb_per_cycle documentation
      https://git.kernel.org/abelloni/c/9fb12656a7a5
[5/5] rtc: renesas-rtca3: Factor out year decoding helper
      https://git.kernel.org/abelloni/c/2098bb8ac5f5

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: (subset) [PATCH v2 1/2] rtc: Add rtc_read_next_alarm() to read next expiring timer
From: Alexandre Belloni @ 2026-06-24 21:15 UTC (permalink / raw)
  To: Shyam Sundar S K, Mario Limonciello
  Cc: Hans de Goede, Ilpo Järvinen, platform-driver-x86,
	linux-kernel, linux-rtc, Thomas Gleixner
In-Reply-To: <20260521043714.1022930-2-mario.limonciello@amd.com>

On Wed, 20 May 2026 23:37:13 -0500, Mario Limonciello wrote:
> Add a new function rtc_read_next_alarm() that reads the next expiring
> alarm from the RTC timerqueue. This is different from rtc_read_alarm(),
> which only reads the aie_timer.
> 
> The wakealarm sysfs file programs the rtc->aie_timer, whereas the
> alarmtimer suspend routine programs its own timer into the RTC timerqueue.
> Both timers end up in the RTC's timerqueue, and the first expiring timer
> is what gets armed in the hardware.
> 
> [...]

Applied, thanks!

[1/2] rtc: Add rtc_read_next_alarm() to read next expiring timer
      https://git.kernel.org/abelloni/c/947d7ea6f60b

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: (subset) [PATCH 2/2] rtc: isl1208: Balance enable_irq_wake() with disable_irq_wake() on cleanup
From: Alexandre Belloni @ 2026-06-24 21:15 UTC (permalink / raw)
  To: John Madieu
  Cc: ryan, akpm, m.grzeschik, Denis.Osterland, linux-rtc, linux-kernel,
	biju.das.jz, john.madieu
In-Reply-To: <20260425154959.2796261-3-john.madieu.xa@bp.renesas.com>

On Sat, 25 Apr 2026 15:49:59 +0000, John Madieu wrote:
> isl1208_setup_irq() calls enable_irq_wake() after a successful
> IRQ request, but the driver has no remove path that balances it.
> The driver is devm-only, so on unbind devm releases the IRQ -
> but enable_irq_wake() is not undone by IRQ release, so the wake
> count for that IRQ stays incremented.
> 
> Each rebind therefore leaks one wake reference; the leak doubles
> for the chip variant that has a separate evdet IRQ, since
> isl1208_setup_irq() is then called twice during probe.
> 
> [...]

Applied, thanks!

[2/2] rtc: isl1208: Balance enable_irq_wake() with disable_irq_wake() on cleanup
      https://git.kernel.org/abelloni/c/1afe4f19d6ad

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH v1] rtc: mpfs: fix counter upload completion condition
From: Alexandre Belloni @ 2026-06-24 21:15 UTC (permalink / raw)
  To: linux-riscv, Conor Dooley
  Cc: Conor Dooley, stable, Valentina.FernandezAlanis, Daire McNamara,
	linux-rtc, linux-kernel
In-Reply-To: <20260513-panhandle-ashy-70c6abf84d59@spud>

On Wed, 13 May 2026 18:55:55 +0100, Conor Dooley wrote:
> The condition that needs to be checked for upload completion is the
> UPLOAD bit in the completion register going low. The original iterations
> of this driver used a do-while and this was converted to a
> read_poll_timeout() during upstreaming without the condition being
> inverted as it should have been.
> 
> I suspect that this went unnoticed until now because a) the first read
> was done when the bit was still set, immediately completing the
> read_poll_timeout() and b) because the RTC doesn't hold time when power
> is removed from the SoC reducing its utility (I for one keep it
> disabled). If my first suspicion was true when the driver was
> upstreamed, it's not true any longer though, hence the detection of the
> problem.
> 
> [...]

Applied, thanks!

[1/1] rtc: mpfs: fix counter upload completion condition
      https://git.kernel.org/abelloni/c/9792ff8afa90

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH v5] dt-bindings: rtc: epson,rx6110: Convert to DT Schema
From: Alexandre Belloni @ 2026-06-24 21:15 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, Udaya Kiran Challa
  Cc: skhan, me, linux-rtc, devicetree, linux-kernel
In-Reply-To: <20260514173851.25088-1-challauday369@gmail.com>

On Thu, 14 May 2026 23:03:32 +0530, Udaya Kiran Challa wrote:
> Convert the Epson RX6110 Real Time Clock devicetree binding
> from the legacy text format to DT schema.

Applied, thanks!

[1/1] dt-bindings: rtc: epson,rx6110: Convert to DT Schema
      https://git.kernel.org/abelloni/c/c7ab7504631d

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH] rtc: remove unused pcap driver
From: Alexandre Belloni @ 2026-06-24 21:15 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Arnd Bergmann, Lee Jones, linux-kernel, linux-rtc
In-Reply-To: <20260527193927.3523952-1-arnd@kernel.org>

On Wed, 27 May 2026 21:39:03 +0200, Arnd Bergmann wrote:
> The platform was removed a few years ago, and the mfd driver
> is also gone now, so it is impossible to build or use it.

Applied, thanks!

[1/1] rtc: remove unused pcap driver
      https://git.kernel.org/abelloni/c/a50b23a57fce

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH] rtc: abx80x: fix the RTC_VL_CLR clearing all status flags
From: Alexandre Belloni @ 2026-06-24 21:15 UTC (permalink / raw)
  To: Antoni Pokusinski; +Cc: marex, linux-rtc, linux-kernel
In-Reply-To: <20260415160610.127155-2-apokusinski01@gmail.com>

On Wed, 15 Apr 2026 18:06:11 +0200, Antoni Pokusinski wrote:
> The RTC_VL_CLR ioctl intends to clear only the battery low flag (BLF),
> however the current implementation writes 0 to the status register,
> clearing all status bits.
> 
> Fix this by writing back the masked status value so that only BLF is
> cleared, preserving other status flags.
> 
> [...]

Applied, thanks!

[1/1] rtc: abx80x: fix the RTC_VL_CLR clearing all status flags
      https://git.kernel.org/abelloni/c/419719c51425

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH v3 0/6] rtc: m41t93: add new features alarm, clock out, watchdog
From: Alexandre Belloni @ 2026-06-24 21:15 UTC (permalink / raw)
  To: krzk+dt, robh, conor+dt, Akhilesh Patil
  Cc: skhan, linux-rtc, devicetree, linux-kernel, akhileshpatilvnit
In-Reply-To: <cover.1758379856.git.akhilesh@ee.iitb.ac.in>

On Sat, 20 Sep 2025 20:30:48 +0530, Akhilesh Patil wrote:
> This patch series adds following to m41t93 rtc driver.
> 
> Functionalities:
> - Alarm support (support to configure alarm 1)
> - Square wave output support
> - Watchdog support
> 
> [...]

Applied, thanks!

[1/6] dt-bindings: rtc: Add ST m41t93
      https://git.kernel.org/abelloni/c/b70598b3769e
[2/6] rtc: m41t93: add device tree support
      https://git.kernel.org/abelloni/c/081e3de28c76
[3/6] rtc: m41t93: migrate to regmap api for register access
      https://git.kernel.org/abelloni/c/d86e8682593c
[4/6] rtc: m41t93: Add alarm support
      https://git.kernel.org/abelloni/c/5b55ff7cace4
[5/6] rtc: m41t93: Add square wave clock provider support
      https://git.kernel.org/abelloni/c/5cb6816cd81b
[6/6] rtc: m41t93: Add watchdog support
      https://git.kernel.org/abelloni/c/15ec2ce19962

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* Re: [PATCH 1/1] rtc: ds1307: add support for clock provider in ds1307
From: Alexandre Belloni @ 2026-06-24 21:15 UTC (permalink / raw)
  To: mturquette, sboyd, Akhilesh Patil
  Cc: linux-rtc, linux-clk, linux-kernel, akhileshpatilvnit, skhan
In-Reply-To: <6b44b47567e418a7bc3f68b626e287b8106641f3.1755599808.git.akhilesh@ee.iitb.ac.in>

On Tue, 19 Aug 2025 16:17:23 +0530, Akhilesh Patil wrote:
> Add support for square-wave output for ds1307 rtc via
> common clock framework clock provider.
> 
> tested on TI am62x SK board using ds1307 RTC hardware module.

Applied, thanks!

[1/1] rtc: ds1307: add support for clock provider in ds1307
      https://git.kernel.org/abelloni/c/18d39c71e317

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* [PATCH] rtc: s35390a: fix typo in comment
From: alexandre.belloni @ 2026-06-24 20:42 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: linux-rtc, linux-kernel

From: Alexandre Belloni <alexandre.belloni@bootlin.com>

Fix trivial typo

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-s35390a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-s35390a.c b/drivers/rtc/rtc-s35390a.c
index 31394f34fb70..b72eef4fb099 100644
--- a/drivers/rtc/rtc-s35390a.c
+++ b/drivers/rtc/rtc-s35390a.c
@@ -297,7 +297,7 @@ static int s35390a_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
 	else
 		sts = S35390A_INT2_MODE_NOINTR;
 
-	/* set interupt mode*/
+	/* set interrupt mode*/
 	err = s35390a_set_reg(s35390a, S35390A_CMD_STATUS2, &sts, sizeof(sts));
 	if (err < 0)
 		return err;
-- 
2.54.0


^ permalink raw reply related

* Re: [PATCH] spi: dt-bindings: microchip,pic32mzda-sqi: Convert to DT schema
From: Conor Dooley @ 2026-06-24 16:48 UTC (permalink / raw)
  To: Udaya Kiran Challa
  Cc: tsbogend, robh, krzk+dt, conor+dt, skhan, me, linux-rtc,
	devicetree, linux-kernel
In-Reply-To: <20260624061329.130468-1-challauday369@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

On Wed, Jun 24, 2026 at 11:43:29AM +0530, Udaya Kiran Challa wrote:

> +  clocks:
> +    maxItems: 2

Please make this an items list too (and drop the maxItems while you're
doing so).
pw-bot: changes-requested

> +
> +  clock-names:
> +    items:
> +      - const: spi_ck
> +      - const: reg_ck

> +examples:
> +  - |
> +    #include <dt-bindings/clock/microchip,pic32-clock.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    sqi1: spi@1f8e2000 {

And remove the unused label here.

Thanks,
Conor.

> +        compatible = "microchip,pic32mzda-sqi";
> +        reg = <0x1f8e2000 0x200>;
> +        interrupts = <169 IRQ_TYPE_LEVEL_HIGH>;
> +        clocks = <&rootclk REF2CLK>, <&rootclk PB5CLK>;
> +        clock-names = "spi_ck", "reg_ck";
> +    };

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply

* Re: [PATCH] drivers: rtc: handle OTF clock changes
From: Alexandre Belloni @ 2026-06-24 15:31 UTC (permalink / raw)
  To: Elad Nachman; +Cc: linux-rtc, linux-kernel
In-Reply-To: <20260624123103.3523728-1-enachman@marvell.com>

On 24/06/2026 15:31:03+0300, Elad Nachman wrote:
> From: Elad Nachman <enachman@marvell.com>
> 
> When processing expired RTC events and rearming them, use now
> instead of expiry to prevent endless loops.
> Issue seen with Armada 385 SOC.

The loop is not endless, it may be long however. How do you reproduce
this? Or maybe the question is what is enabling PIE on your system?

Your patch breaks existing code because it will expect to get one event
per elapsed period while your patch will cause events to be skipped.

> 
> Fixes commit 6610e0893b8b ("RTC: Rework RTC code to use timerqueue for events")
> Signed-off-by: Elad Nachman <enachman@marvell.com>
> ---
>  drivers/rtc/interface.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
> index 96626f8068f9..c32ef95a07d4 100644
> --- a/drivers/rtc/interface.c
> +++ b/drivers/rtc/interface.c
> @@ -126,6 +126,7 @@ EXPORT_SYMBOL_GPL(rtc_read_time);
>  int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm)
>  {
>  	int err, uie;
> +	struct rtc_time new_tm;
>  
>  	err = rtc_valid_tm(tm);
>  	if (err != 0)
> @@ -159,6 +160,17 @@ int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm)
>  	else
>  		err = -EINVAL;
>  
> +	if (rtc && rtc->ops && rtc->ops->read_time) {
> +		if (!rtc->ops->read_time(rtc->dev.parent, &new_tm)) {
> +			pr_debug("new rtc time secs %d mins %d hours %d mday %d mon %d year %d way %d yday %d dst %d\n",
> +					new_tm.tm_sec, new_tm.tm_min,
> +					new_tm.tm_hour, new_tm.tm_mday,
> +					new_tm.tm_mon, new_tm.tm_year,
> +					new_tm.tm_wday, new_tm.tm_yday,
> +					new_tm.tm_isdst);
> +		}
> +	}
> +


This is unrelated to the patch.

>  	pm_stay_awake(rtc->dev.parent);
>  	mutex_unlock(&rtc->ops_lock);
>  	/* A timer might have just expired */
> @@ -999,7 +1011,7 @@ void rtc_timer_do_work(struct work_struct *work)
>  		trace_rtc_timer_fired(timer);
>  		/* Re-add/fwd periodic timers */
>  		if (ktime_to_ns(timer->period)) {
> -			timer->node.expires = ktime_add(timer->node.expires,
> +			timer->node.expires = ktime_add(now,
>  							timer->period);
>  			timer->enabled = 1;
>  			timerqueue_add(&rtc->timerqueue, &timer->node);
> -- 
> 2.25.1
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* [PATCH] drivers: rtc: handle OTF clock changes
From: Elad Nachman @ 2026-06-24 12:31 UTC (permalink / raw)
  To: alexandre.belloni, linux-rtc, linux-kernel; +Cc: enachman

From: Elad Nachman <enachman@marvell.com>

When processing expired RTC events and rearming them, use now
instead of expiry to prevent endless loops.
Issue seen with Armada 385 SOC.

Fixes commit 6610e0893b8b ("RTC: Rework RTC code to use timerqueue for events")
Signed-off-by: Elad Nachman <enachman@marvell.com>
---
 drivers/rtc/interface.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 96626f8068f9..c32ef95a07d4 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -126,6 +126,7 @@ EXPORT_SYMBOL_GPL(rtc_read_time);
 int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm)
 {
 	int err, uie;
+	struct rtc_time new_tm;
 
 	err = rtc_valid_tm(tm);
 	if (err != 0)
@@ -159,6 +160,17 @@ int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm)
 	else
 		err = -EINVAL;
 
+	if (rtc && rtc->ops && rtc->ops->read_time) {
+		if (!rtc->ops->read_time(rtc->dev.parent, &new_tm)) {
+			pr_debug("new rtc time secs %d mins %d hours %d mday %d mon %d year %d way %d yday %d dst %d\n",
+					new_tm.tm_sec, new_tm.tm_min,
+					new_tm.tm_hour, new_tm.tm_mday,
+					new_tm.tm_mon, new_tm.tm_year,
+					new_tm.tm_wday, new_tm.tm_yday,
+					new_tm.tm_isdst);
+		}
+	}
+
 	pm_stay_awake(rtc->dev.parent);
 	mutex_unlock(&rtc->ops_lock);
 	/* A timer might have just expired */
@@ -999,7 +1011,7 @@ void rtc_timer_do_work(struct work_struct *work)
 		trace_rtc_timer_fired(timer);
 		/* Re-add/fwd periodic timers */
 		if (ktime_to_ns(timer->period)) {
-			timer->node.expires = ktime_add(timer->node.expires,
+			timer->node.expires = ktime_add(now,
 							timer->period);
 			timer->enabled = 1;
 			timerqueue_add(&rtc->timerqueue, &timer->node);
-- 
2.25.1


^ permalink raw reply related

* Re: [PATCH 07/12] rtc: rzn1: fix alarm range check truncation on 32-bit systems
From: Lad, Prabhakar @ 2026-06-24  9:53 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Miquel Raynal, Alexandre Belloni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
	Magnus Damm, linux-rtc, linux-renesas-soc, devicetree,
	linux-kernel, Biju Das, Fabrizio Castro, Lad Prabhakar
In-Reply-To: <ajr1wXCI2U23d1sY@shikoro>

Hi Wolfram,

On Tue, Jun 23, 2026 at 10:08 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
>
> > Can you please share the commands you tried, I'll try and replicate it
> > on my side.
>
> Sorry, can't give you the commands, just from my head: I tried to set an
> alarm more than a week in the future, and the alarm was set to the next
> day. But I was in a hurry, maybe I overlooked something, because that
> handling used to work in the past IIRC. I can return to this topic on
> Friday earliest, sadly. Maybe next week only...
>
I ran some tests for cases #1 and #2, and we see an out-of-range
error. By adding a 1-sec leeway when checking the ranges I don't get
the out-of-range error. Let me know what you think (I'll create a
seprate patch for it).

Case #1 reverting this patch:

root@rzn2h-evk:~# date -s "2026-06-24 10:34:00"; hwclock -w;
Wed Jun 24 10:34:00 UTC 2026
root@rzn2h-evk:~#
root@rzn2h-evk:~#
root@rzn2h-evk:~# rtcwake -m no -s 604800;cat /proc/driver/rtc
rtcwake: set rtc wake alarm failed: Numerical result out of range
rtc_time        : 10:34:32
rtc_date        : 2026-06-24
alrm_time       : 10:34:33
alrm_date       : 2026-07-01
alarm_IRQ       : no
alrm_pending    : no
update IRQ enabled      : no
periodic IRQ enabled    : no
periodic IRQ frequency  : 1
max user IRQ frequency  : 64
24hr            : yes
root@rzn2h-evk:~#

Case #2 with this patch:
root@rzn2h-evk:~# date -s "2026-06-24 10:46:00"; hwclock -w;
Wed Jun 24 10:46:00 UTC 2026
root@rzn2h-evk:~# rtcwake -m no -s 604800;cat /proc/driver/rtc
rtcwake: set rtc wake alarm failed: Numerical result out of range
rtc_time        : 10:46:30
rtc_date        : 2026-06-24
alrm_time       : 10:46:31
alrm_date       : 2026-07-01
alarm_IRQ       : no
alrm_pending    : no
update IRQ enabled      : no
periodic IRQ enabled    : no
periodic IRQ frequency  : 1
max user IRQ frequency  : 64
24hr            : yes
root@rzn2h-evk:~#

Case #3: Add 1-sec  leeway:
root@rzn2h-evk:~# date -s "2026-06-24 10:48:00"; hwclock -w;
Wed Jun 24 10:48:00 UTC 2026
root@rzn2h-evk:~# rtcwake -m no -s 604800;cat /proc/driver/rtc
rtcwake: wakeup using /dev/rtc0 at Wed Jul  1 10:48:50 2026
rtc_time        : 10:48:49
rtc_date        : 2026-06-24
alrm_time       : 10:48:50
alrm_date       : 2026-07-01
alarm_IRQ       : yes
alrm_pending    : no
update IRQ enabled      : no
periodic IRQ enabled    : no
periodic IRQ frequency  : 1
max user IRQ frequency  : 64
24hr            : yes
root@rzn2h-evk:~#


Changes for case #3:

diff --git a/drivers/rtc/rtc-rzn1.c b/drivers/rtc/rtc-rzn1.c
index 173526d50d41..8fdb5114a6d8 100644
--- a/drivers/rtc/rtc-rzn1.c
+++ b/drivers/rtc/rtc-rzn1.c
@@ -279,7 +279,9 @@ static int rzn1_rtc_set_alarm(struct device *dev,
struct rtc_wkalrm *alrm)
        /* We cannot set alarms more than one week ahead */
        farest = rtc_tm_to_time64(&tm_now) + rtc->rtcdev->alarm_offset_max;
        alarm = rtc_tm_to_time64(tm);
-       if (alarm > farest)
+
+       /* Add a 1-second leeway for processing delay */
+       if (alarm > (farest + 1))
                return -ERANGE;

        /* Convert alarm day into week day */


Cheers,
Prabhakar

^ permalink raw reply related

* [PATCH] rtc: amlogic-a4: clear unsupported update interrupt feature
From: Xianwei Zhao via B4 Relay @ 2026-06-24  7:24 UTC (permalink / raw)
  To: Yiting Deng, Alexandre Belloni
  Cc: linux-amlogic, linux-rtc, linux-kernel, Xianwei Zhao

From: Xianwei Zhao <xianwei.zhao@amlogic.com>

The Amlogic A4 RTC does not support update interrupt. Clear
RTC_FEATURE_UPDATE_INTERRUPT before registering the RTC device to
prevent userspace from enabling an unsupported RTC UIE function.

Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
---
Clear RTC_FEATURE_UPDATE_INTERRUPT before registering the RTC device.
---
 drivers/rtc/rtc-amlogic-a4.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/rtc/rtc-amlogic-a4.c b/drivers/rtc/rtc-amlogic-a4.c
index 50938c35af36..116cf095a9e9 100644
--- a/drivers/rtc/rtc-amlogic-a4.c
+++ b/drivers/rtc/rtc-amlogic-a4.c
@@ -379,6 +379,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
 	rtc->rtc_dev->ops = &aml_rtc_ops;
 	rtc->rtc_dev->range_min = 0;
 	rtc->rtc_dev->range_max = U32_MAX;
+	clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, rtc->rtc_dev->features);
 
 	return devm_rtc_register_device(rtc->rtc_dev);
 }

---
base-commit: 851d961ff248218f681c53cf0f7f08cf8201a117
change-id: 20260624-rtc-feature-03ce3f3843a9

Best regards,
-- 
Xianwei Zhao <xianwei.zhao@amlogic.com>



^ permalink raw reply related

* [PATCH] spi: dt-bindings: microchip,pic32mzda-sqi: Convert to DT schema
From: Udaya Kiran Challa @ 2026-06-24  6:13 UTC (permalink / raw)
  To: tsbogend, robh, krzk+dt, conor+dt
  Cc: skhan, me, linux-rtc, devicetree, linux-kernel,
	Udaya Kiran Challa

Convert Microchip PIC32 Quad SPI controller devicetree binding
from legacy text format to DT schema.

Signed-off-by: Udaya Kiran Challa <challauday369@gmail.com>
---
 .../bindings/spi/microchip,pic32mzda-sqi.yaml | 53 +++++++++++++++++++
 .../devicetree/bindings/spi/sqi-pic32.txt     | 18 -------
 2 files changed, 53 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/microchip,pic32mzda-sqi.yaml
 delete mode 100644 Documentation/devicetree/bindings/spi/sqi-pic32.txt

diff --git a/Documentation/devicetree/bindings/spi/microchip,pic32mzda-sqi.yaml b/Documentation/devicetree/bindings/spi/microchip,pic32mzda-sqi.yaml
new file mode 100644
index 000000000000..39f06b61e894
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/microchip,pic32mzda-sqi.yaml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/microchip,pic32mzda-sqi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip PIC32MZDA Quad SPI controller
+
+maintainers:
+  - Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+
+allOf:
+  - $ref: spi-controller.yaml#
+
+properties:
+  compatible:
+    const: microchip,pic32mzda-sqi
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 2
+
+  clock-names:
+    items:
+      - const: spi_ck
+      - const: reg_ck
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/microchip,pic32-clock.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    sqi1: spi@1f8e2000 {
+        compatible = "microchip,pic32mzda-sqi";
+        reg = <0x1f8e2000 0x200>;
+        interrupts = <169 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&rootclk REF2CLK>, <&rootclk PB5CLK>;
+        clock-names = "spi_ck", "reg_ck";
+    };
diff --git a/Documentation/devicetree/bindings/spi/sqi-pic32.txt b/Documentation/devicetree/bindings/spi/sqi-pic32.txt
deleted file mode 100644
index c82d021bce50..000000000000
--- a/Documentation/devicetree/bindings/spi/sqi-pic32.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-Microchip PIC32 Quad SPI controller
------------------------------------
-Required properties:
-- compatible: Should be "microchip,pic32mzda-sqi".
-- reg: Address and length of SQI controller register space.
-- interrupts: Should contain SQI interrupt.
-- clocks: Should contain phandle of two clocks in sequence, one that drives
-          clock on SPI bus and other that drives SQI controller.
-- clock-names: Should be "spi_ck" and "reg_ck" in order.
-
-Example:
-	sqi1: spi@1f8e2000 {
-		compatible = "microchip,pic32mzda-sqi";
-		reg = <0x1f8e2000 0x200>;
-		clocks = <&rootclk REF2CLK>, <&rootclk PB5CLK>;
-		clock-names = "spi_ck", "reg_ck";
-		interrupts = <169 IRQ_TYPE_LEVEL_HIGH>;
-	};
-- 
2.34.1


^ permalink raw reply related

* [PATCH v2] dt-bindings: watchdog: microchip,pic32mzda-wdt: Convert to DT schema
From: Udaya Kiran Challa @ 2026-06-24  5:56 UTC (permalink / raw)
  To: tsbogend, robh, krzk+dt, conor+dt
  Cc: skhan, me, linux-rtc, devicetree, linux-kernel,
	Udaya Kiran Challa, Krzysztof Kozlowski

Convert Microchip PIC32 Watchdog Timer devicetree binding
from legacy text format to DT schema.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Udaya Kiran Challa <challauday369@gmail.com>
---
Changelog:

Changes since v1:
- Fix example indentation
- Correct example clock specifier from REF2CLK to LPRCCLK

Link to v1:https://lore.kernel.org/all/20260620172354.155565-1-challauday369@gmail.com/
---
 .../bindings/watchdog/microchip,pic32-wdt.txt | 18 --------
 .../watchdog/microchip,pic32mzda-wdt.yaml     | 44 +++++++++++++++++++
 2 files changed, 44 insertions(+), 18 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/microchip,pic32-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/microchip,pic32mzda-wdt.yaml

diff --git a/Documentation/devicetree/bindings/watchdog/microchip,pic32-wdt.txt b/Documentation/devicetree/bindings/watchdog/microchip,pic32-wdt.txt
deleted file mode 100644
index f03a29a1b323..000000000000
--- a/Documentation/devicetree/bindings/watchdog/microchip,pic32-wdt.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-* Microchip PIC32 Watchdog Timer
-
-When enabled, the watchdog peripheral can be used to reset the device if the
-WDT is not cleared periodically in software.
-
-Required properties:
-- compatible: must be "microchip,pic32mzda-wdt".
-- reg: physical base address of the controller and length of memory mapped
-  region.
-- clocks: phandle of source clk. Should be <&rootclk LPRCCLK>.
-
-Example:
-
-	watchdog@1f800800 {
-		compatible = "microchip,pic32mzda-wdt";
-		reg = <0x1f800800 0x200>;
-		clocks = <&rootclk LPRCCLK>;
-	};
diff --git a/Documentation/devicetree/bindings/watchdog/microchip,pic32mzda-wdt.yaml b/Documentation/devicetree/bindings/watchdog/microchip,pic32mzda-wdt.yaml
new file mode 100644
index 000000000000..a5dd633c3e78
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/microchip,pic32mzda-wdt.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/microchip,pic32mzda-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip PIC32MZDA Watchdog Timer
+
+maintainers:
+  - Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+
+description:
+  The PIC32 watchdog timer can be used to reset the device if software fails
+  to periodically service the watchdog.
+
+allOf:
+  - $ref: watchdog.yaml#
+
+properties:
+  compatible:
+    const: microchip,pic32mzda-wdt
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/microchip,pic32-clock.h>
+
+    watchdog@1f800800 {
+        compatible = "microchip,pic32mzda-wdt";
+        reg = <0x1f800800 0x200>;
+        clocks = <&rootclk LPRCCLK>;
+    };
-- 
2.34.1


^ permalink raw reply related

* [PATCH] rtc: zynqmp: Return optional clock lookup errors
From: Pengpeng Hou @ 2026-06-24  5:55 UTC (permalink / raw)
  To: Alexandre Belloni, Michal Simek
  Cc: linux-rtc, linux-arm-kernel, linux-kernel, Pengpeng Hou

devm_clk_get_optional() returns NULL when the optional clock is absent,
but returns an ERR_PTR when the clock provider lookup fails.  Probe
currently keeps the ERR_PTR and then passes it to clk_get_rate().

Return the lookup error instead.  A truly absent optional clock still
reaches the existing calibration fallback through clk_get_rate(NULL).

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
 drivers/rtc/rtc-zynqmp.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c
index 2ae54804b87a..5bcb7536e973 100644
--- a/drivers/rtc/rtc-zynqmp.c
+++ b/drivers/rtc/rtc-zynqmp.c
@@ -334,10 +334,9 @@ static int xlnx_rtc_probe(struct platform_device *pdev)
 
 	/* Getting the rtc info */
 	xrtcdev->rtc_clk = devm_clk_get_optional(&pdev->dev, "rtc");
-	if (IS_ERR(xrtcdev->rtc_clk)) {
-		if (PTR_ERR(xrtcdev->rtc_clk) != -EPROBE_DEFER)
-			dev_warn(&pdev->dev, "Device clock not found.\n");
-	}
+	if (IS_ERR(xrtcdev->rtc_clk))
+		return dev_err_probe(&pdev->dev, PTR_ERR(xrtcdev->rtc_clk),
+				     "Failed to get rtc clock\n");
 	xrtcdev->freq = clk_get_rate(xrtcdev->rtc_clk);
 	if (!xrtcdev->freq) {
 		ret = of_property_read_u32(pdev->dev.of_node, "calibration",
-- 
2.50.1 (Apple Git-155)


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox