aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc
AgeCommit message (Collapse)AuthorFilesLines
2023-02-09rtc: pm8xxx: return IRQ_NONE on errorsJohan Hovold1-3/+3
In the unlikely event that disabling the alarm and clearing the status ever fails, return IRQ_NONE instead of IRQ_HANDLED. Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-09rtc: pm8xxx: drop bogus lockingJohan Hovold1-46/+21
Since commit c8d523a4b053 ("drivers/rtc/rtc-pm8xxx.c: rework to support pm8941 rtc") which removed the shadow control register there is no need for a driver lock. Specifically, the rtc ops are serialised by rtc core and the interrupt handler only unconditionally disables the alarm using the alarm_ctrl register. Note that since only the alarm enable bit of alarm_ctrl is used after enabling the RTC at probe, the locking was not needed when doing open coded read-modify-write cycles either. Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: David Collins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-09rtc: pm8xxx: use regmap_update_bits()Johan Hovold1-65/+22
Switch to using regmap_update_bits() instead of open coding read-modify-write accesses. Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: David Collins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-09rtc: pm8xxx: drop spmi error messagesJohan Hovold1-54/+17
Drop the unnecessary error messages after every spmi regmap access, which are not expected to fail. Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-09rtc: pm8xxx: fix set-alarm raceJohan Hovold1-14/+10
Make sure to disable the alarm before updating the four alarm time registers to avoid spurious alarms during the update. Note that the disable needs to be done outside of the ctrl_reg_lock section to prevent a racing alarm interrupt from disabling the newly set alarm when the lock is released. Fixes: 9a9a54ad7aa2 ("drivers/rtc: add support for Qualcomm PMIC8xxx RTC") Cc: [email protected] # 3.1 Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: David Collins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-09rtc: rv8803: invalidate date/time if alarm time is invalidSascha Hauer1-7/+38
RTC core never calls rv8803_set_alarm with an invalid alarm time, so if an invalid alarm time > 0 is set, external factors must have corrupted the RTC's alarm time and possibly other registers. Play it safe by marking the date/time invalid, so all registers are reinitialized on a ->set_time. This may cause existing setups to lose time if they so far set only date/time, but ignored that the alarm registers had an invalid date value, e.g.: rtc rtc0: invalid alarm value: 2020-3-27 7:82:0 These systems will have their ->get_time return -EINVAL till ->set_time initializes the alarm value (and sets a new time). Signed-off-by: Ahmad Fatoum <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: remove v3020 driverArnd Bergmann3-379/+0
The v3020 RTC driver was exclusively used by the now removed cm-x300.c machine. Cc: Alessandro Zummo <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: [email protected] Cc: [email protected] Acked-by: Robert Jarzmik <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2023-02-01rtc: max8907: Drop unused i2c includeUwe Kleine-König1-1/+0
rtc-max8907 is a platform driver that doesn't use any symbol provided in <linux/i2c.h>. So drop the include. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: rx8010: use IRQ flags obtained from fwnodeAlexandre Belloni1-2/+6
Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: rv8803: use IRQ flags obtained from fwnodeAlexandre Belloni1-1/+6
Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: rv3032: use IRQ flags obtained from fwnodeAlexandre Belloni1-1/+6
Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: rv3029c2: use IRQ flags obtained from fwnodeAlexandre Belloni1-1/+6
Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: pcf8563: use IRQ flags obtained from fwnodeAlexandre Belloni1-1/+6
Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: pcf85363: use IRQ flags obtained fromfwnodeAlexandre Belloni1-1/+6
Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: pcf8523: use IRQ flags obtained from fwnodeAlexandre Belloni1-1/+6
Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: pcf85063: use IRQ flags obtained from fwnodeAlexandre Belloni1-1/+6
Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: pcf2123: use IRQ flags obtained from fwnodeAlexandre Belloni1-1/+6
Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: m41t80: use IRQ flags obtained from fwnodeAlexandre Belloni1-1/+6
Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: hym8563: use IRQ flags obtained from fwnodeAlexandre Belloni1-1/+6
Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-02-01rtc: ab-eoz9: use IRQ flags obtained from fwnodeAlexandre Belloni1-1/+6
Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-01-25rtc: brcmstb-waketimer: allow use as non-wake alarmDoug Berger1-3/+52
The wake interrupt only fires when the system is in a suspend state. Fortunately we have another interrupt that fires in a non-suspend state at the L2 controller UPG_AUX_AON. Add support for this interrupt line so we can use the alarm in a non-wake context. Signed-off-by: Doug Berger <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-01-24rtc: sun6i: Always export the internal oscillatorSamuel Holland1-12/+4
On all variants of the hardware, the internal oscillator is one possible parent for the AR100 clock. It needs to be exported so we can model that relationship correctly in the devicetree. Fixes: c56afc1844d6 ("rtc: sun6i: Expose internal oscillator through device tree") Signed-off-by: Samuel Holland <[email protected]> Acked-by: Jernej Skrabec <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-01-24rtc: brcmstb-waketimer: rename irq to wake_irqDoug Berger1-8/+7
In preparation for adding a second interrupt to service RTC interrupts, the existing interrupt is renamed from the generic 'irq' to 'wake_irq' to more clearly convey its role. It is also converted to an unsigned int. Finally, the driver message that outputs the IRQ number when registered is removed since devm_rtc_register_device() already provides a report of registration and the interrupts can be found in /proc/interrupts. Signed-off-by: Doug Berger <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-01-24rtc: brcmstb-waketimer: compensate for lack of wktmr disableDoug Berger1-18/+34
Since the WKTMR hardware block cannot be disabled it is necessary for the driver to accommodate for associated timing hazards. This commit targets the following possibilities: A possible race between clearing a wktmr event and the alarm expiring is made one-sided by setting the alarm to its maximum value before clearing the event. Programming alarm values close to the current time may not trigger events if the counter advances while the alarm is being programmed. After programming an alarm, a check is made to ensure that it is either in the future or an expiration event is pending. Signed-off-by: Doug Berger <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-01-24rtc: brcmstb-waketimer: non-functional code changesDoug Berger1-13/+12
These changes are not intended to affect functionality, but simplify the source code. They are performed here to simplify review and reduce confusion with other changes in this set. Since set_alarm includes the alarm_irq_enable functionality call it directly from that function for simplicity (even though it does nothing at the moment). The order of the declarations is changed to prevent the need for a prototype. The function device_init_wakeup() is used to replace the functions device_set_wakeup_capable() and device_wakeup_enable() since it is equivalent. Signed-off-by: Doug Berger <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-01-24rtc: brcmstb-waketimer: introduce WKTMR_ALARM_EVENT flagDoug Berger1-4/+11
This commit defines bit 0 as the bit of interest within the BRCMSTB_WKTMR_EVENT register to make the implementation more readable. Signed-off-by: Doug Berger <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-01-23rtc: sunplus: fix format string for printing resourceArnd Bergmann1-2/+2
On 32-bit architectures with 64-bit resource_size_t, sp_rtc_probe() causes a compiler warning: drivers/rtc/rtc-sunplus.c: In function 'sp_rtc_probe': drivers/rtc/rtc-sunplus.c:243:33: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=] 243 | dev_dbg(&plat_dev->dev, "res = 0x%x, reg_base = 0x%lx\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The best way to print a resource is the special %pR format string, and similarly to print a pointer we can use %p and avoid the cast. Fixes: fad6cbe9b2b4 ("rtc: Add driver for RTC in Sunplus SP7021") Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-01-16ARM: s3c: remove s3c24xx specific hacksArnd Bergmann1-6/+2
A number of device drivers reference CONFIG_ARM_S3C24XX_CPUFREQ or similar symbols that are no longer available with the platform gone, though the drivers themselves are still used on newer platforms, so remove these hacks. Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Acked-by: Miquel Raynal <[email protected]> Acked-by: Ulf Hansson <[email protected]> Acked-by: Stephen Boyd <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2023-01-09rtc: ds1307: Convert to i2c's .probe_new()Uwe Kleine-König1-3/+3
.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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2023-01-09rtc: efi: Enable SET/GET WAKEUP services as optionalShanker Donthineni1-21/+27
The current implementation of rtc-efi is expecting all the 4 time services GET{SET}_TIME{WAKEUP} must be supported by UEFI firmware. As per the EFI_RT_PROPERTIES_TABLE, the platform specific implementations can choose to enable selective time services based on the RTC device capabilities. This patch does the following changes to provide GET/SET RTC services on platforms that do not support the WAKEUP feature. 1) Relax time services cap check when creating a platform device. 2) Clear RTC_FEATURE_ALARM bit in the absence of WAKEUP services. 3) Conditional alarm entries in '/proc/driver/rtc'. Cc: <[email protected]> # v6.0+ Signed-off-by: Shanker Donthineni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-21Merge tag 'mfd-next-6.2' of ↵Linus Torvalds3-158/+0
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - Add support for Ampere Computing SMpro - Add support for TI TPS65219 PMIC New Functionality: - Add support for multiple devices of the same type; rk808 Fix-ups: - Convert a bunch of I2C class drivers over to .probe_new() - Remove superfluous includes; mc13xxx-*, palmas, timberdale - Use correct includes for GPIO handling; madera-core - Convert to GPIOD; twl6040 - Remove unused platform data handling; twl6040 - Device Tree changes; many - Remove unused drivers; dm355evm_msp, davinci_voicecodec, htc-i2cpld - Add support for modules; palmas - Enable COMPILE_TEST support; intel_soc_pmic* - Trivial: spelling / whitespace fixes; mc13xxx-spi - Replace old PM helpers with new ones; many - Convert deprecated mask_invert usage to unmask_base; many - Use devm_*() calls; qcom_rpm - MAINTAINER fix-ups - Make use of improved / replaced APIs; palmas, fsl-imx25-tsadc, stm32-lptimer, qcom_rpm, rohm-* Bug Fixes: - Add bounds / error checking; mt6360-core - No sleeping inside critical sections; axp20x - Fix missing dependencies; ROHM_BD957XMUF - Repair error paths; qcom-pm8008" * tag 'mfd-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (161 commits) dt-bindings: mfd: da9062: Correct file name for watchdog mfd: pm8008: Fix return value check in pm8008_probe() mfd: rohm: Use dev_err_probe() mfd: Drop obsolete dependencies on COMPILE_TEST dt-bindings: mfd: da9062: Move IRQ to optional properties mfd: qcom_rpm: Use devm_of_platform_populate() to simplify code mfd: qcom_rpm: Fix an error handling path in qcom_rpm_probe() mfd: stm32-lptimer: Use devm_platform_get_and_ioremap_resource() mfd: rohm-bd9576: Convert to i2c's .probe_new() mfd: fsl-imx25-tsadc: Use devm_platform_get_and_ioremap_resource() dt-bindings: Fix maintainer email for a few ROHM ICs mfd: palmas: Use device_get_match_data() to simplify the code Input: Add tps65219 interrupt driven powerbutton mfd: tps65219: Add driver for TI TPS65219 PMIC mfd: bd957x: Fix Kconfig dependency on REGMAP_IRQ mfd: wcd934x: Convert irq chip to config regs mfd: tps65090: Replace irqchip mask_invert with unmask_base mfd: sun4i-gpadc: Replace irqchip mask_invert with unmask_base mfd: stpmic1: Fix swapped mask/unmask in irq chip mfd: sprd-sc27xx-spi: Replace irqchip mask_invert with unmask_base ...
2022-12-15rtc: ds1742: use devm_platform_get_and_ioremap_resource()Minghao Chi1-2/+1
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Minghao Chi <[email protected]> Signed-off-by: ye xingchen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-15rtc: mxc_v2: Add missing clk_disable_unprepare()GUO Zihua1-1/+3
The call to clk_disable_unprepare() is left out in the error handling of devm_rtc_allocate_device. Add it back. Fixes: 5490a1e018a4 ("rtc: mxc_v2: fix possible race condition") Signed-off-by: GUO Zihua <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-15rtc: rs5c313: correct some spelling mistakesZhang Jiaming1-3/+3
Change 'modifed' to 'modified'. Change 'Updata' to 'Update'. Change 'Initiatlize' to 'Initialize'. Signed-off-by: Zhang Jiaming <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-15rtc: at91rm9200: Fix syntax errors in commentsXiang wangx1-1/+1
Delete the redundant word 'is'. Signed-off-by: Xiang wangx <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-15rtc: remove duplicated words in commentsshaomin Deng3-3/+3
Signed-off-by: shaomin Deng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-15rtc: rv3028: Use IRQ flags obtained from device tree if availableWadim Egorov1-1/+12
Make the interrupt pin of the RV3028 usable with GPIO controllers without level type IRQs support, such as the TI Davinci GPIO controller. Therefore, allow the IRQ type to be passed from the device tree if available. Based on commit d4785b46345c ("rtc: pcf2127: use IRQ flags obtained from device tree if available") Signed-off-by: Wadim Egorov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-15rtc: ds1307: use sysfs_emit() to instead of scnprintf()ye xingchen1-2/+1
Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-15rtc: isl12026: drop obsolete dependency on COMPILE_TESTJean Delvare1-1/+1
Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it is possible to test-build any driver which depends on OF on any architecture by explicitly selecting OF. Therefore depending on COMPILE_TEST as an alternative is no longer needed. It is actually better to always build such drivers with OF enabled, so that the test builds are closer to how each driver will actually be built on its intended target. Building them without OF may not test much as the compiler will optimize out potentially large parts of the code. In the worst case, this could even pop false positive warnings. Dropping COMPILE_TEST here improves the quality of our testing and avoids wasting time on non-existent issues. Signed-off-by: Jean Delvare <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-11rtc: pcf85063: fix pcf85063_clkout_controlAlexandre Belloni1-1/+1
pcf85063_clkout_control reads the wrong register but then update the correct one. Reported-by: Janne Terho <[email protected]> Fixes: 8c229ab6048b ("rtc: pcf85063: Add pcf85063 clkout control to common clock framework") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-11rtc: rx6110: fix warning with !OFAlexandre Belloni1-1/+1
rx6110_spi_of_match is not used when !OF, leading to a warning: >> drivers/rtc/rtc-rx6110.c:384:34: warning: 'rx6110_spi_of_match' defined but not used [-Wunused-const-variable=] 384 | static const struct of_device_id rx6110_spi_of_match[] = { | ^~~~~~~~~~~~~~~~~~~ Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-11rtc: rk808: reduce 'struct rk808' usageSebastian Reichel1-27/+20
Reduce usage of 'struct rk808' (driver data of the parent MFD), so that only the chip variant field is still being accessed directly. This allows restructuring the MFD driver to support SPI based PMICs. Acked-by: Alexandre Belloni <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-11rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe()Kees Cook1-11/+1
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. msc313_rtc_probe() was passing clk_disable_unprepare() directly, which did not have matching prototypes for devm_add_action_or_reset()'s callback argument. Refactor to use devm_clk_get_enabled() instead. This was found as a result of Clang's new -Wcast-function-type-strict flag, which is more sensitive than the simpler -Wcast-function-type, which only checks for type width mismatches. Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/lkml/[email protected] Suggested-by: Christophe JAILLET <[email protected]> Cc: Daniel Palmer <[email protected]> Cc: Romain Perier <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Reviewed-by: Daniel Palmer <[email protected]> Tested-by: Daniel Palmer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-10rtc: pic32: Move devm_rtc_allocate_device earlier in pic32_rtc_probe()Gaosheng Cui1-4/+4
The pic32_rtc_enable(pdata, 0) and clk_disable_unprepare(pdata->clk) should be called in the error handling of devm_rtc_allocate_device(), so we should move devm_rtc_allocate_device earlier in pic32_rtc_probe() to fix it. Fixes: 6515e23b9fde ("rtc: pic32: convert to devm_rtc_allocate_device") Signed-off-by: Gaosheng Cui <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-10rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()Gaosheng Cui1-0/+1
The clk_disable_unprepare() should be called in the error handling of clk_get_rate(), fix it. Fixes: b5b2bdfc2893 ("rtc: st: Add new driver for ST's LPC RTC") Signed-off-by: Gaosheng Cui <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-12-07mfd: Remove dm355evm_msp driverArnd Bergmann3-158/+0
The DaVinci DM355EVM platform is gone after the removal of all unused board files, so the MTD device along with its sub-devices can be removed as well. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-11-16rtc: pcf85063: Fix reading alarmAlexander Stein1-4/+4
If the alarms are disabled the topmost bit (AEN_*) is set in the alarm registers. This is also interpreted in BCD number leading to this warning: rtc rtc0: invalid alarm value: 2022-09-21T80:80:80 Fix this by masking alarm enabling and reserved bits. Fixes: 05cb3a56ee8c ("rtc: pcf85063: add alarm support") Signed-off-by: Alexander Stein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-11-16rtc: pcf8523: fix for stop bitpaulmn1-10/+10
Bugfix for an issue detected when a goldcap capacitor gets fully discharged due to a long absence of the power supply, and then recharges again. The RTC failed to continue to keep the real-time clock. This was caused by the incorrect handling of the STOP bit in the RTC internal register. This fix solves the problem. Signed-off-by: paulmn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-11-16rtc: efi: Add wakeup supportRiwen Lu1-0/+2
Add wakeup support for rtc-efi, so we can wakeup from S3/S4/S5 through rtcwake. Signed-off-by: Riwen Lu <[email protected]> Link: https://lore.kernel.org/r/TYWP286MB260191455377CEBD2336557EB1659@TYWP286MB2601.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Alexandre Belloni <[email protected]>
2022-11-16rtc: pcf8563: clear RTC_FEATURE_ALARM if no irqVincent Whitchurch1-0/+2
If there is no IRQ hooked up, clear RTC_FEATURE_ALARM to make the core ensure that userspace is made aware that alarms are not supported. Signed-off-by: Vincent Whitchurch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>