linux-yocto/drivers/rtc
Meagan Lloyd 0adb1cc95f rtc: ds1307: remove clear of oscillator stop flag (OSF) in probe
[ Upstream commit 4845865465 ]

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 <meaganlloyd@linux.microsoft.com>
Reviewed-by: Tyler Hicks <code@tyhicks.com>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Link: https://lore.kernel.org/r/1749665656-30108-2-git-send-email-meaganlloyd@linux.microsoft.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-20 18:41:33 +02:00
..
class.c rtc: Fix offset calculation for .start_secs < 0 2025-06-02 00:10:18 +02:00
dev.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
interface.c rtc: interface: silence KMSAN warning 2025-05-24 23:31:12 +02:00
Kconfig rtc: s32g: add NXP S32G2/S32G3 SoC support 2025-05-25 23:27:56 +02:00
lib_test.c rtc: test: Test date conversion for dates starting in 1900 2025-06-02 00:10:18 +02:00
lib.c rtc: Make rtc_time64_to_tm() support dates before 1970 2025-06-02 00:10:17 +02:00
Makefile rtc: s32g: add NXP S32G2/S32G3 SoC support 2025-05-25 23:27:56 +02:00
nvmem.c nvmem: add explicit config option to read old syntax fixed OF cells 2023-10-21 19:19:06 +02:00
proc.c
rtc-88pm80x.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-88pm860x.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-88pm886.c rtc: add driver for Marvell 88PM886 PMIC RTC 2024-11-11 23:37:50 +01:00
rtc-ab-b5ze-s3.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-ab-eoz9.c rtc: ab-eoz9: Use HWMON_CHANNEL_INFO macro to simplify code 2025-03-03 23:04:37 +01:00
rtc-ab8500.c rtc: ab8500: Use resource managed API to simplify code 2025-03-03 22:52:29 +01:00
rtc-abx80x.c rtc: abx80x: Fix WDT bit position of the status register 2024-11-11 22:10:26 +01:00
rtc-ac100.c rtc: Switch back to struct platform_driver::remove() 2024-11-10 22:58:28 +01:00
rtc-amlogic-a4.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-armada38x.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-as3722.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-asm9260.c rtc: Switch back to struct platform_driver::remove() 2024-11-10 22:58:28 +01:00
rtc-aspeed.c rtc: aspeed: drop needless struct aspeed_rtc::rtc_dev member 2025-03-05 23:08:00 +01:00
rtc-at91rm9200.c rtc: at91rm9200: drop unused module alias 2025-05-24 23:58:23 +02:00
rtc-at91sam9.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-au1xxx.c
rtc-bd70528.c mfd: rtc: bd7xxxx Drop IC name from IRQ 2024-11-01 15:53:05 +00:00
rtc-bq32k.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-bq4802.c
rtc-brcmstb-waketimer.c rtc: brcmstb-waketimer: don't include 'pm_wakeup.h' directly 2024-11-18 14:47:40 +01:00
rtc-cadence.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-cmos.c rtc: cmos: use spin_lock_irqsave in cmos_interrupt 2025-06-24 00:27:51 +02:00
rtc-core.h
rtc-cpcap.c rtc: cpcap: drop unused module alias 2025-05-24 23:58:23 +02:00
rtc-cros-ec.c rtc: cros-ec: Avoid a couple of -Wflex-array-member-not-at-end warnings 2025-03-17 23:32:15 +01:00
rtc-cv1800.c rtc: sophgo: add rtc support for Sophgo CV1800 SoC 2025-05-25 00:15:13 +02:00
rtc-da9052.c
rtc-da9055.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-da9063.c rtc: da9063: drop unused module alias 2025-05-24 23:58:23 +02:00
rtc-digicolor.c
rtc-ds1216.c
rtc-ds1286.c
rtc-ds1302.c
rtc-ds1305.c rtc: ds1305: Report maximum alarm limit to rtc core 2023-08-27 23:50:22 +02:00
rtc-ds1307.c rtc: ds1307: remove clear of oscillator stop flag (OSF) in probe 2025-08-20 18:41:33 +02:00
rtc-ds1343.c rtc: ds1343: Use devm_pm_set_wake_irq 2025-03-03 22:52:29 +01:00
rtc-ds1347.c
rtc-ds1374.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-ds1390.c
rtc-ds1511.c rtc: ds1511: set alarm offset limit 2024-02-29 22:16:52 +01:00
rtc-ds1553.c
rtc-ds1672.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-ds1685.c rtc: Switch back to struct platform_driver::remove() 2024-11-10 22:58:28 +01:00
rtc-ds1742.c rtc: Explicitly include correct DT includes 2023-07-27 23:31:29 +02:00
rtc-ds2404.c rtc: ds2404: drop needless struct ds2404::rtc member 2025-03-05 23:08:00 +01:00
rtc-ds3232.c rtc: ds3232: Use HWMON_CHANNEL_INFO macro to simplify code 2025-03-03 23:04:37 +01:00
rtc-efi.c rtc: efi: fixed typo in efi_procfs() 2023-10-15 23:01:08 +02:00
rtc-em3027.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-ep93xx.c rtc: ep93xx: drop needless struct ep93xx_rtc::rtc member 2025-03-05 23:08:00 +01:00
rtc-fm3130.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-fsl-ftm-alarm.c rtc: fsl-ftm-alarm: Mark acpi_id table as maybe unused 2025-02-28 17:56:22 +01:00
rtc-ftrtc010.c rtc: ftrtc010: drop needless struct ftrtc010_rtc::rtc_dev member 2025-03-05 23:08:00 +01:00
rtc-gamecube.c
rtc-generic.c
rtc-goldfish.c rtc: add missing MODULE_DESCRIPTION() macro 2024-06-28 00:24:43 +02:00
rtc-hid-sensor-time.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
rtc-hym8563.c rtc: hym8563: fix incorrect maximum clock rate handling 2025-08-15 16:39:17 +02:00
rtc-imx-sc.c
rtc-imx-sm-bbm.c rtc: support i.MX95 BBM RTC 2024-08-28 21:54:51 +01:00
rtc-imxdi.c rtc: Switch back to struct platform_driver::remove() 2024-11-10 22:58:28 +01:00
rtc-isl1208.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-isl12022.c rtc: isl12022: Replace uint8_t types with u8 2024-11-11 00:06:46 +01:00
rtc-isl12026.c rtc: isl12026: Drop "_new" from probe callback name 2023-07-27 23:32:08 +02:00
rtc-jz4740.c rtc: jz4740: drop unused module alias 2025-05-24 23:58:23 +02:00
rtc-loongson.c rtc: loongson: Add missing alarm notifications for ACPI RTC events 2025-05-25 00:18:29 +02:00
rtc-lp8788.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-lpc24xx.c rtc: Switch back to struct platform_driver::remove() 2024-11-10 22:58:28 +01:00
rtc-lpc32xx.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-m41t80.c rtc: m41t80: reduce verbosity 2025-05-26 00:24:46 +02:00
rtc-m41t93.c
rtc-m41t94.c
rtc-m48t35.c
rtc-m48t59.c rtc: m48t59: Use platform_data struct for year offset value 2024-11-18 14:31:57 +01:00
rtc-m48t86.c rtc: m48t86: drop needless struct m48t86_rtc_info::rtc member 2025-03-05 23:08:00 +01:00
rtc-ma35d1.c rtc: ma35d1: remove hardcoded UIE support 2024-01-08 01:33:27 +01:00
rtc-max6900.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-max6902.c
rtc-max6916.c
rtc-max8907.c
rtc-max8925.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-max8997.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-max8998.c
rtc-max31335.c rtc: max31335: Add driver support for max31331 2025-04-01 00:17:01 +02:00
rtc-max77686.c rtc: max77686: use dev_err_probe() where appropriate 2025-03-05 23:08:01 +01:00
rtc-mc13xxx.c rtc: Switch back to struct platform_driver::remove() 2024-11-10 22:58:28 +01:00
rtc-mc146818-lib.c rtc: rtc-mc146818-lib: Use is_leap_year instead of calculate leap years 2024-11-10 23:02:43 +01:00
rtc-mcp795.c rtc: mcp795: drop unneeded MODULE_ALIAS 2024-04-17 01:39:35 +02:00
rtc-meson-vrtc.c rtc: meson-vrtc: drop needless struct meson_vrtc_data::rtc member 2025-03-05 23:08:00 +01:00
rtc-meson.c rtc: meson: drop needless struct meson_rtc::rtc member 2025-03-05 23:08:00 +01:00
rtc-moxart.c
rtc-mpc5121.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-mpfs.c rtc: mpfs: switch to devm_device_init_wakeup 2025-03-17 11:51:49 +01:00
rtc-msc313.c
rtc-msm6242.c
rtc-mt2712.c
rtc-mt6397.c rtc: mt6359: Add mt6357 support 2025-06-02 00:25:32 +02:00
rtc-mt7622.c rtc: Switch back to struct platform_driver::remove() 2024-11-10 22:58:28 +01:00
rtc-mv.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-mxc_v2.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-mxc.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-nct3018y.c rtc: nct3018y: fix incorrect maximum clock rate handling 2025-08-15 16:39:17 +02:00
rtc-ntxec.c
rtc-nxp-bbnsm.c rtc: nxp-bbnsm: Use resource managed API to simplify code 2025-03-03 22:52:29 +01:00
rtc-omap.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-opal.c
rtc-optee.c
rtc-palmas.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-pcap.c rtc: pcap: Drop no-op remove function 2023-10-13 12:29:08 +02:00
rtc-pcf2123.c
rtc-pcf2127.c rtc: pcf2127: add missing semicolon after statement 2025-06-24 16:06:14 +02:00
rtc-pcf8523.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-pcf8563.c rtc: pcf8563: fix incorrect maximum clock rate handling 2025-08-15 16:39:17 +02:00
rtc-pcf8583.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-pcf85063.c rtc: pcf85063: fix incorrect maximum clock rate handling 2025-08-15 16:39:17 +02:00
rtc-pcf85363.c rtc: pcf85363: fix wrong mask/val parameters in regmap_update_bits call 2023-10-15 22:37:57 +02:00
rtc-pic32.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-pl030.c rtc: pl030: drop needless struct pl030_rtc::rtc member 2025-03-05 23:08:00 +01:00
rtc-pl031.c rtc: pl031: document struct pl031_vendor_data members 2025-03-07 22:46:29 +01:00
rtc-pm8xxx.c rtc: pm8xxx: drop unused module alias 2025-05-24 23:58:23 +02:00
rtc-ps3.c
rtc-pxa.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-r7301.c rtc: rtc7301: Support byte-addressed IO 2023-10-15 22:37:25 +02:00
rtc-r9701.c
rtc-rc5t583.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-rc5t619.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-renesas-rtca3.c rtc: renesas-rtca3: Disable interrupts only if the RTC is enabled 2025-03-11 15:11:20 +01:00
rtc-rk808.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-rp5c01.c
rtc-rs5c313.c
rtc-rs5c348.c
rtc-rs5c372.c rtc: rs5c372: fix Wvoid-pointer-to-enum-cast warning 2023-08-16 01:32:08 +02:00
rtc-rtd119x.c rtc: Switch back to struct platform_driver::remove() 2024-11-10 22:58:28 +01:00
rtc-rv3028.c rtc: rv3028: fix incorrect maximum clock rate handling 2025-08-15 16:39:17 +02:00
rtc-rv3029c2.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-rv3032.c rtc: rv3032: drop WADA 2025-03-17 11:52:11 +01:00
rtc-rv8803.c rtc: rv8803: add wakeup-source support 2024-01-15 22:29:48 +01:00
rtc-rx4581.c
rtc-rx6110.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-rx8010.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-rx8025.c rtc: Switch i2c drivers back to use .probe() 2023-06-06 23:29:37 +02:00
rtc-rx8111.c rtc: rx8111: handle VLOW flag 2024-05-07 23:40:10 +02:00
rtc-rx8581.c rtc: rx8581: drop needless struct rx8581 2025-03-05 23:08:01 +01:00
rtc-rzn1.c rtc: rzn1: support input frequencies other than 32768Hz 2025-06-01 23:53:02 +02:00
rtc-s3c.c rtc: s3c: drop unused module alias 2025-05-24 23:58:24 +02:00
rtc-s3c.h
rtc-s5m.c rtc: s5m: replace open-coded read/modify/write registers with regmap helpers 2025-06-23 23:58:40 +02:00
rtc-s32g.c rtc: s32g: add NXP S32G2/S32G3 SoC support 2025-05-25 23:27:56 +02:00
rtc-s35390a.c rtc: s35390a: drop needless struct s35390a::rtc member 2025-03-05 23:08:01 +01:00
rtc-sa1100.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-sa1100.h
rtc-sc27xx.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-sd2405al.c rtc: sd2405al: drop needless struct sd2405al::rtc member 2025-03-05 23:08:01 +01:00
rtc-sd3078.c rtc: sd3078: drop needless struct sd3078 2025-03-05 23:08:01 +01:00
rtc-sh.c rtc: sh: minor fixes to adhere to coding style 2025-04-08 15:56:19 +02:00
rtc-snvs.c
rtc-spear.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-ssd202d.c rtc: Add support for the SSD202D RTC 2023-10-16 16:54:15 +02:00
rtc-st-lpc.c rtc: st-lpc: Use IRQF_NO_AUTOEN flag in request_irq() 2024-11-10 23:01:59 +01:00
rtc-starfire.c
rtc-stk17ta8.c
rtc-stm32.c rtc: stm32: drop unused module alias 2025-05-24 23:58:24 +02:00
rtc-stmp3xxx.c rtc: Switch back to struct platform_driver::remove() 2024-11-10 22:58:28 +01:00
rtc-sun4v.c
rtc-sun6i.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-sunplus.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-sunxi.c rtc: Explicitly include correct DT includes 2023-07-27 23:31:29 +02:00
rtc-tegra.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-test.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
rtc-ti-k3.c rtc: Explicitly include correct DT includes 2023-07-27 23:31:29 +02:00
rtc-tps6586x.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-tps6594.c rtc: tps6594: Fix integer overflow on 32bit systems 2025-01-13 00:20:55 +01:00
rtc-tps65910.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-twl.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-vt8500.c rtc: Switch back to struct platform_driver::remove() 2024-11-10 22:58:28 +01:00
rtc-wilco-ec.c
rtc-wm831x.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-wm8350.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-x1205.c rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-07 00:40:29 +02:00
rtc-xgene.c rtc: use boolean values with device_init_wakeup() 2025-01-09 18:29:24 +01:00
rtc-zynqmp.c rtc: zynqmp: Fix optional clock name property 2025-01-13 00:41:24 +01:00
sysfs.c