aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc
AgeCommit message (Collapse)AuthorFilesLines
2021-02-06rtc: rv3028: quiet maybe-unused variable warningAlexandre Belloni1-1/+1
When CONFIG_OF is disabled then the matching table is not referenced. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: rs5c372: quiet maybe-unused variable warningAlexandre Belloni1-1/+1
When CONFIG_OF is disabled then the matching table is not referenced. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: pcf85363: quiet maybe-unused variable warningAlexandre Belloni1-1/+1
When CONFIG_OF is disabled then the matching table is not referenced. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: pcf85063: quiet maybe-unused variable warningsAlexandre Belloni1-19/+19
pcf85063a_config and rv8263_config are only referenced by pcf85063_of_match, move them in the #ifdef CONFIG_OF section. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: meson: quiet maybe-unused variable warningAlexandre Belloni1-1/+1
When CONFIG_OF is disabled then the matching table is not referenced. Signed-off-by: Alexandre Belloni <[email protected]> Acked-by: Kevin Hilman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: m41t80: quiet maybe-unused variable warningAlexandre Belloni1-1/+1
When CONFIG_OF is disabled then the matching table is not referenced. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: isl1208: quiet maybe-unused variable warningAlexandre Belloni1-1/+1
When CONFIG_OF is disabled then the matching table is not referenced. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: ds3232: quiet maybe-unused variable warningAlexandre Belloni1-1/+1
When CONFIG_OF is disabled then the matching table is not referenced. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: ds1672: quiet maybe-unused variable warningAlexandre Belloni1-1/+1
When CONFIG_OF is disabled then the matching table is not referenced. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: digicolor: quiet maybe-unused variable warningAlexandre Belloni1-1/+1
When CONFIG_OF is disabled then the matching table is not referenced. Signed-off-by: Alexandre Belloni <[email protected]> Acked-by: Baruch Siach <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: brcmstb-waketimer: quiet maybe-unused variable warningAlexandre Belloni1-1/+1
When CONFIG_OF is disabled then the matching table is not referenced. Signed-off-by: Alexandre Belloni <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: bq32k: quiet maybe-unused variable warningAlexandre Belloni1-1/+1
When CONFIG_OF is disabled then the matching table is not referenced. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: armada38x: depend on OFAlexandre Belloni1-0/+1
The driver will compile with warning without OF because armada38x_data and armada8k_data will be defined but not used. It would be possible to move then in the #ifdef CONFIG_OF section but then their members will be defined but not used. Instead of moving most of the driver in the #ifdef, simply depend on OF. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: class: remove bogus documentationAlexandre Belloni1-5/+0
rtc_device_unregister is gone since commit fdcfd854333b ("rtc: rework rtc_register_device() resource management"). Remove its documentation. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: rv3028: remove useless warning messagesAlexandre Belloni1-9/+1
Remove voltage low messages as userspace has a proper way to get the information and react on it. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: rv3028: fix PORF handlingAlexandre Belloni1-0/+2
The PORF bit is cleared on interrupts which prevents the driver to know when the time and date are invalid. Stop clearing PORF in the interrupt handler. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: mxc_v2: Replace spin_lock_irqsave with spin_lock in hard IRQXiaofei Tan1-4/+3
It is redundant to do irqsave and irqrestore in hardIRQ context, where it has been in a irq-disabled context. Signed-off-by: Xiaofei Tan <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: mxc: Replace spin_lock_irqsave with spin_lock in hard IRQXiaofei Tan1-3/+2
It is redundant to do irqsave and irqrestore in hardIRQ context, where it has been in a irq-disabled context. Signed-off-by: Xiaofei Tan <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: tegra: Replace spin_lock_irqsave with spin_lock in hard IRQXiaofei Tan1-3/+3
It is redundant to do irqsave and irqrestore in hardIRQ context, where it has been in a irq-disabled context. Signed-off-by: Xiaofei Tan <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: r7301: Replace spin_lock_irqsave with spin_lock in hard IRQXiaofei Tan1-3/+2
It is redundant to do irqsave and irqrestore in hardIRQ context, where it has been in a irq-disabled context. Signed-off-by: Xiaofei Tan <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: pm8xxx: Replace spin_lock_irqsave with spin_lock in hard IRQXiaofei Tan1-5/+4
It is redundant to do irqsave and irqrestore in hardIRQ context, where it has been in a irq-disabled context. Signed-off-by: Xiaofei Tan <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-06rtc: cmos: Replace spin_lock_irqsave with spin_lock in hard IRQXiaofei Tan1-3/+2
It is redundant to do irqsave and irqrestore in hardIRQ context, where it has been in a irq-disabled context. Signed-off-by: Xiaofei Tan <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-03rtc: zynqmp: depend on HAS_IOMEMDavid Gow1-1/+1
The Xilinx zynqmp RTC driver makes use of IOMEM functions like devm_platform_ioremap_resource(), which are only available if CONFIG_HAS_IOMEM is defined. This causes the driver not to be enable under make ARCH=um allyesconfig, even though it won't build. By adding a dependency on HAS_IOMEM, the driver will not be enabled on architectures which don't support it. Fixes: 09ef18bcd5ac ("rtc: use devm_platform_ioremap_resource() to simplify code") Signed-off-by: David Gow <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-02rtc: mc146818: Dont test for bit 0-5 in Register DThomas Gleixner2-4/+4
The recent change to validate the RTC turned out to be overly tight. While it cures the problem on the reporters machine it breaks machines with Intel chipsets which use bit 0-5 of the D register. So check only for bit 6 being 0 which is the case on these Intel machines as well. Fixes: 211e5db19d15 ("rtc: mc146818: Detect and handle broken RTCs") Reported-by: Serge Belyshev <[email protected]> Reported-by: Dirk Gouders <[email protected]> Reported-by: Borislav Petkov <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Dirk Gouders <[email protected]> Tested-by: Len Brown <[email protected]> Tested-by: Borislav Petkov <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-02-02amba: Make the remove callback return voidUwe Kleine-König2-6/+2
All amba drivers return 0 in their remove callback. Together with the driver core ignoring the return value anyhow, it doesn't make sense to return a value here. Change the remove prototype to return void, which makes it explicit that returning an error value doesn't work as expected. This simplifies changing the core remove callback to return void, too. Reviewed-by: Ulf Hansson <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> # for drivers/memory Acked-by: Mark Brown <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Suzuki K Poulose <[email protected]> # for hwtracing/coresight Acked-By: Vinod Koul <[email protected]> # for dmaengine Acked-by: Guenter Roeck <[email protected]> # for watchdog Acked-by: Wolfram Sang <[email protected]> # for I2C Acked-by: Takashi Iwai <[email protected]> # for sound Acked-by: Vladimir Zapolskiy <[email protected]> # for memory/pl172 Acked-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
2021-01-27rtc: mc146818: Detect and handle broken RTCsThomas Gleixner2-0/+15
The recent fix for handling the UIP bit unearthed another issue in the RTC code. If the RTC is advertised but the readout is straight 0xFF because it's not available, the old code just proceeded with crappy values, but the new code hangs because it waits for the UIP bit to become low. Add a sanity check in the RTC CMOS probe function which reads the RTC_VALID register (Register D) which should have bit 0-6 cleared. If that's not the case then fail to register the CMOS. Add the same check to mc146818_get_time(), warn once when the condition is true and invalidate the rtc_time data. Reported-by: Mickaël Salaün <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Mickaël Salaün <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-26rtc: pcf2127: Run a OTP refresh if not done beforePhilipp Rosenberger1-0/+17
The datasheet of the PCF2127 states, it is recommended to process an OTP refresh once the power is up and the oscillator is operating stable. The OTP refresh takes less than 100 ms to complete. Signed-off-by: Philipp Rosenberger <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-26rtc: pcf2127: Disable Power-On Reset OverridePhilipp Rosenberger1-0/+8
To resume normal operation after a total power loss (no or empty battery) the "Power-On Reset Override (PORO)" facility needs to be disabled. The register reset value sets the PORO enabled and the data sheet recommends setting it to disabled for normal operation. From what I've seen on the PCF2127 and PCF2129 there is no event generated at the interrupt pin (INT), as long the PORO bit is set. This behavior is not documented in the manual. Signed-off-by: Philipp Rosenberger <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: tps65910: Support wakeup-source propertyDmitry Osipenko1-3/+7
TPS65910 is a PMIC MFD device and RTC is one of its functions. The wakeup-source DT property is specified for the parent MFD device and we need to use this property for the RTC in order to allow to use RTC alarm for waking up system from suspend by default, instead of requiring user to enable wakeup manually via sysfs. Tested-by: Peter Geis <[email protected]> Tested-by: Matt Merhar <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: stm32: use rtc_lock/rtc_unlockAlexandre Belloni1-2/+2
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: rx8025: use rtc_lock/rtc_unlockAlexandre Belloni1-3/+2
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: rx8010: use rtc_lock/rtc_unlockAlexandre Belloni1-3/+3
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: rv3029: use rtc_lock/rtc_unlockAlexandre Belloni1-5/+4
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: pcf2123: use rtc_lock/rtc_unlockAlexandre Belloni1-3/+2
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: mcp795: use rtc_lock/rtc_unlockAlexandre Belloni1-3/+2
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: m41t80: use rtc_lock/rtc_unlockAlexandre Belloni1-5/+4
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: hym8563: use rtc_lock/rtc_unlockAlexandre Belloni1-3/+2
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: ds3232: use rtc_lock/rtc_unlockAlexandre Belloni1-3/+2
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: ds1685: use rtc_lock/rtc_unlockAlexandre Belloni1-4/+2
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Acked-by: Joshua Kinard <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: ds1307: use rtc_lock/rtc_unlockAlexandre Belloni1-3/+2
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: ds1305: use rtc_lock/rtc_unlockAlexandre Belloni1-3/+2
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: asm9260: use rtc_lock/rtc_unlockAlexandre Belloni1-3/+3
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: ac100: use rtc_lock/rtc_unlockAlexandre Belloni1-2/+2
Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-25rtc: mrst: Remove driver for deprecated platformAndy Shevchenko3-534/+0
Intel Moorestown and Medfield are quite old Intel Atom based 32-bit platforms, which were in limited use in some Android phones, tablets and consumer electronics more than eight years ago. There are no bugs or problems ever reported outside from Intel for breaking any of that platforms for years. It seems no real users exists who run more or less fresh kernel on it. The commit 05f4434bc130 ("ASoC: Intel: remove mfld_machine") also in align with this theory. Due to above and to reduce a burden of supporting outdated drivers we remove the support of outdated platforms completely. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Acked-by: Linus Walleij <[email protected]>
2021-01-23rtc: remove ste ab3100 driverArnd Bergmann3-263/+0
The ST-Ericsson U300 platform is getting removed, so this driver is no longer needed. Cc: Linus Walleij <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-23rtc: remove ste coh901 driverArnd Bergmann3-303/+0
The ST-Ericsson U300 platform is getting removed, so this driver is no longer needed. Cc: Linus Walleij <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-23rtc: remove sirfsoc driverArnd Bergmann3-454/+0
The CSR SiRF prima2/atlas platforms are getting removed, so this driver is no longer needed. Cc: Barry Song <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Barry Song <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-16rtc: tps65910: remove tps65910_rtc_ops_noirqAlexandre Belloni1-11/+4
Clear RTC_FEATURE_ALARM to signal that alarms are not available instead of having a supplementary struct rtc_class_ops without alarm callbacks. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-16rtc: rv8803: constify rv8803_rtc_opsAlexandre Belloni1-5/+6
Use RTC_FEATURE_ALARM to signal to the core whether alarms are available instead of changing the global struct rtc_class_ops, allowing to make it const. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-01-16rtc: rv3032: constify rv3032_rtc_opsAlexandre Belloni1-5/+6
Use RTC_FEATURE_ALARM to signal to the core whether alarms are available instead of changing the global struct rtc_class_ops, allowing to make it const. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]