<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/rtc/rtc-ds1307.c, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-08-03T00:57:05+00:00</updated>
<entry>
<title>rtc: ds1307: convert from round_rate() to determine_rate()</title>
<updated>2025-08-03T00:57:05+00:00</updated>
<author>
<name>Brian Masney</name>
<email>bmasney@redhat.com</email>
</author>
<published>2025-07-10T15:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=31b5fea399d57cea6657bc4515d1e93cd528a510'/>
<id>urn:sha1:31b5fea399d57cea6657bc4515d1e93cd528a510</id>
<content type='text'>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney &lt;bmasney@redhat.com&gt;
Link: https://lore.kernel.org/r/20250710-rtc-clk-round-rate-v1-7-33140bb2278e@redhat.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: fix incorrect maximum clock rate handling</title>
<updated>2025-08-03T00:57:05+00:00</updated>
<author>
<name>Brian Masney</name>
<email>bmasney@redhat.com</email>
</author>
<published>2025-07-10T15:20:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf6eb547a24af7ad7bbd2abe9c5327f956bbeae8'/>
<id>urn:sha1:cf6eb547a24af7ad7bbd2abe9c5327f956bbeae8</id>
<content type='text'>
When ds3231_clk_sqw_round_rate() is called with a requested rate higher
than the highest supported rate, it currently returns 0, which disables
the clock. According to the clk API, round_rate() should instead return
the highest supported rate. Update the function to return the maximum
supported rate in this case.

Fixes: 6c6ff145b3346 ("rtc: ds1307: add clock provider support for DS3231")
Signed-off-by: Brian Masney &lt;bmasney@redhat.com&gt;
Link: https://lore.kernel.org/r/20250710-rtc-clk-round-rate-v1-1-33140bb2278e@redhat.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: handle oscillator stop flag (OSF) for ds1341</title>
<updated>2025-07-23T21:24:38+00:00</updated>
<author>
<name>Meagan Lloyd</name>
<email>meaganlloyd@linux.microsoft.com</email>
</author>
<published>2025-06-11T18:14:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=523923cfd5d622b8f4ba893fdaf29fa6adeb8c3e'/>
<id>urn:sha1:523923cfd5d622b8f4ba893fdaf29fa6adeb8c3e</id>
<content type='text'>
In using CONFIG_RTC_HCTOSYS, rtc_hctosys() will sync the RTC time to the
kernel time as long as rtc_read_time() succeeds. In some power loss
situations, our supercapacitor-backed DS1342 RTC comes up with either an
unpredictable future time or the default 01/01/00 from the datasheet.
The oscillator stop flag (OSF) is set in these scenarios due to the
power loss and can be used to determine the validity of the RTC data.

This change expands the oscillator stop flag (OSF) handling that has
already been implemented for some chips to the ds1341 chip (DS1341 and
DS1342 share a datasheet). This handling manages the validity of the RTC
data in .read_time and .set_time based on the OSF.

Signed-off-by: Meagan Lloyd &lt;meaganlloyd@linux.microsoft.com&gt;
Reviewed-by: Tyler Hicks &lt;code@tyhicks.com&gt;
Acked-by: Rodolfo Giometti &lt;giometti@enneenne.com&gt;
Link: https://lore.kernel.org/r/1749665656-30108-3-git-send-email-meaganlloyd@linux.microsoft.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: remove clear of oscillator stop flag (OSF) in probe</title>
<updated>2025-07-23T21:24:38+00:00</updated>
<author>
<name>Meagan Lloyd</name>
<email>meaganlloyd@linux.microsoft.com</email>
</author>
<published>2025-06-11T18:14:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=48458654659c9c2e149c211d86637f1592470da5'/>
<id>urn:sha1:48458654659c9c2e149c211d86637f1592470da5</id>
<content type='text'>
In using CONFIG_RTC_HCTOSYS, rtc_hctosys() will sync the RTC time to the
kernel time as long as rtc_read_time() succeeds. In some power loss
situations, our supercapacitor-backed DS1342 RTC comes up with either an
unpredictable future time or the default 01/01/00 from the datasheet.
The oscillator stop flag (OSF) is set in these scenarios due to the
power loss and can be used to determine the validity of the RTC data.

Some chip types in the ds1307 driver already have OSF handling to
determine whether .read_time provides valid RTC data or returns -EINVAL.

This change removes the clear of the OSF in .probe as the OSF needs to
be preserved to expand the OSF handling to the ds1341 chip type (note
that DS1341 and DS1342 share a datasheet).

Signed-off-by: Meagan Lloyd &lt;meaganlloyd@linux.microsoft.com&gt;
Reviewed-by: Tyler Hicks &lt;code@tyhicks.com&gt;
Acked-by: Rodolfo Giometti &lt;giometti@enneenne.com&gt;
Link: https://lore.kernel.org/r/1749665656-30108-2-git-send-email-meaganlloyd@linux.microsoft.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: stop disabling alarms on probe</title>
<updated>2025-03-06T21:12:14+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2025-03-03T22:37:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dcec12617ee61beed928e889607bf37e145bf86b'/>
<id>urn:sha1:dcec12617ee61beed928e889607bf37e145bf86b</id>
<content type='text'>
It is a bad practice to disable alarms on probe or remove as this will
prevent alarms across reboots.

Link: https://lore.kernel.org/r/20250303223744.1135672-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: Clamp year to valid BCD (0-99) in `set_time()`</title>
<updated>2024-07-06T22:39:27+00:00</updated>
<author>
<name>Csókás, Bence</name>
<email>csokas.bence@prolan.hu</email>
</author>
<published>2024-06-11T07:24:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68f78c720da4088d254250867126c6ae5b68fa2a'/>
<id>urn:sha1:68f78c720da4088d254250867126c6ae5b68fa2a</id>
<content type='text'>
`tm_year` may go up to 299 if the device supports the
century bit. Therefore, subtracting may not give us
a valid 2-digit number, but modulo does.

Co-developed-by: Szentendrei, Tamás &lt;szentendrei.tamas@prolan.hu&gt;
Signed-off-by: Szentendrei, Tamás &lt;szentendrei.tamas@prolan.hu&gt;
Signed-off-by: Csókás, Bence &lt;csokas.bence@prolan.hu&gt;
Link: https://lore.kernel.org/r/20240611072411.671600-2-csokas.bence@prolan.hu
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: Detect oscillator fail on mcp794xx</title>
<updated>2024-07-06T22:39:15+00:00</updated>
<author>
<name>Csókás, Bence</name>
<email>csokas.bence@prolan.hu</email>
</author>
<published>2024-06-11T07:24:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=35a34f09baed51216455740e01bd132cf60c71cf'/>
<id>urn:sha1:35a34f09baed51216455740e01bd132cf60c71cf</id>
<content type='text'>
This patch enables the detection of the oscillator failure on mcp794xx chips.

Co-developed-by: Szentendrei, Tamás &lt;szentendrei.tamas@prolan.hu&gt;
Signed-off-by: Szentendrei, Tamás &lt;szentendrei.tamas@prolan.hu&gt;
Signed-off-by: Csókás, Bence &lt;csokas.bence@prolan.hu&gt;
Link: https://lore.kernel.org/r/20240611072411.671600-1-csokas.bence@prolan.hu
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: fix Wvoid-pointer-to-enum-cast warning</title>
<updated>2023-08-15T23:32:08+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2023-08-10T10:38:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=737055e11729836fc3d7b26220affad30b4736ec'/>
<id>urn:sha1:737055e11729836fc3d7b26220affad30b4736ec</id>
<content type='text'>
'type' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:

  rtc-ds1307.c:1747:18: error: cast to smaller integer type 'enum ds_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20230810103902.151145-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: Switch i2c drivers back to use .probe()</title>
<updated>2023-06-06T21:29:37+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-05-05T12:11:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=31b0cecb4042d2676fd48f09379a19bc8b16eadd'/>
<id>urn:sha1:31b0cecb4042d2676fd48f09379a19bc8b16eadd</id>
<content type='text'>
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230505121136.1185653-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: ds1307: Convert to i2c's .probe_new()</title>
<updated>2023-01-09T22:03:56+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2022-11-18T22:44:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4cd0ca1fe9a79d81a001ff14f14035531773fe43'/>
<id>urn:sha1:4cd0ca1fe9a79d81a001ff14f14035531773fe43</id>
<content type='text'>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20221118224540.619276-561-uwe@kleine-koenig.org
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
</feed>
