Alexandre Belloni
5c78cceeb2
rtc: s3c: stop setting bogus time
...
It doesn't make sense to set the RTC to a default value at probe time. Let
the core handle invalid date and time.
Also, this is basically dead code since commit 22652ba724
("rtc: stop
validating rtc_time in .read_time")
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20210202112934.3612726-1-alexandre.belloni@bootlin.com
2021-02-06 00:59:16 +01:00
Alexandre Belloni
302757c9ae
rtc: sd3078: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-22-alexandre.belloni@bootlin.com
2021-02-06 00:58:26 +01:00
Alexandre Belloni
0a268386c7
rtc: s35390a: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-21-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
194084679e
rtc: rx8581: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-20-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
782d3ebfcf
rtc: rx8010: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-19-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
da82632150
rtc: rv8803: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-18-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
94428ac9aa
rtc: rv3032: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-17-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
788babdd54
rtc: rv3029: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-16-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
dff31b0bc0
rtc: rv3028: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-15-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
cbc1d52cb1
rtc: rs5c372: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-14-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
c506bc10aa
rtc: pcf85363: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-13-alexandre.belloni@bootlin.com
2021-02-06 00:58:25 +01:00
Alexandre Belloni
c8ecbc783c
rtc: pcf85063: quiet maybe-unused variable warnings
...
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 <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-12-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
ef886c440b
rtc: meson: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-11-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
2717c59e26
rtc: m41t80: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-10-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
413b7841f1
rtc: isl1208: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-9-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
2c1dc25fa7
rtc: ds3232: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-8-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
fb38b5da90
rtc: ds1672: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-7-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
97de1f587a
rtc: digicolor: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Link: https://lore.kernel.org/r/20210202112219.3610853-6-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
ae1247f79d
rtc: brcmstb-waketimer: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-5-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
b8ded8177a
rtc: bq32k: quiet maybe-unused variable warning
...
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-4-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
8792bab957
rtc: armada38x: depend on OF
...
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 <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-3-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
d5328499bf
rtc: class: remove bogus documentation
...
rtc_device_unregister is gone since commit fdcfd85433
("rtc: rework
rtc_register_device() resource management"). Remove its documentation.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202112219.3610853-2-alexandre.belloni@bootlin.com
2021-02-06 00:58:24 +01:00
Alexandre Belloni
3b8fc144d9
dt-bindings: rtc: pcf2127: update bindings
...
The NXP pcf2127 supports reset-source.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210202000634.3438575-1-alexandre.belloni@bootlin.com
2021-02-06 00:57:26 +01:00
Alexandre Belloni
c37b643026
rtc: rv3028: remove useless warning messages
...
Remove voltage low messages as userspace has a proper way to get the
information and react on it.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210126221435.2152339-2-alexandre.belloni@bootlin.com
2021-02-06 00:56:31 +01:00
Alexandre Belloni
f007c479c2
rtc: rv3028: fix PORF handling
...
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 <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210126221435.2152339-1-alexandre.belloni@bootlin.com
2021-02-06 00:56:30 +01:00
Xiaofei Tan
0c1095d334
rtc: mxc_v2: Replace spin_lock_irqsave with spin_lock in hard IRQ
...
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 <tanxiaofei@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/1612355981-6764-7-git-send-email-tanxiaofei@huawei.com
2021-02-06 00:50:48 +01:00
Xiaofei Tan
3f2d301847
rtc: mxc: Replace spin_lock_irqsave with spin_lock in hard IRQ
...
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 <tanxiaofei@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/1612355981-6764-6-git-send-email-tanxiaofei@huawei.com
2021-02-06 00:50:48 +01:00
Xiaofei Tan
669022c29a
rtc: tegra: Replace spin_lock_irqsave with spin_lock in hard IRQ
...
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 <tanxiaofei@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/1612355981-6764-5-git-send-email-tanxiaofei@huawei.com
2021-02-06 00:50:47 +01:00
Xiaofei Tan
be3df3f858
rtc: r7301: Replace spin_lock_irqsave with spin_lock in hard IRQ
...
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 <tanxiaofei@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/1612355981-6764-4-git-send-email-tanxiaofei@huawei.com
2021-02-06 00:50:47 +01:00
Xiaofei Tan
5131797556
rtc: pm8xxx: Replace spin_lock_irqsave with spin_lock in hard IRQ
...
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 <tanxiaofei@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/1612355981-6764-3-git-send-email-tanxiaofei@huawei.com
2021-02-06 00:50:47 +01:00
Xiaofei Tan
6950d046eb
rtc: cmos: Replace spin_lock_irqsave with spin_lock in hard IRQ
...
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 <tanxiaofei@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/1612355981-6764-2-git-send-email-tanxiaofei@huawei.com
2021-02-06 00:50:47 +01:00
David Gow
ddd0521549
rtc: zynqmp: depend on HAS_IOMEM
...
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: 09ef18bcd5
("rtc: use devm_platform_ioremap_resource() to simplify code")
Signed-off-by: David Gow <davidgow@google.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210127035146.1523286-1-davidgow@google.com
2021-02-03 00:55:01 +01:00
Philipp Rosenberger
15f57b3e31
rtc: pcf2127: Run a OTP refresh if not done before
...
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 <p.rosenberger@kunbus.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210118085752.5759-3-p.rosenberger@kunbus.com
2021-01-26 00:27:06 +01:00
Philipp Rosenberger
b9ac079abe
rtc: pcf2127: Disable Power-On Reset Override
...
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 <p.rosenberger@kunbus.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210118085752.5759-2-p.rosenberger@kunbus.com
2021-01-26 00:26:16 +01:00
Dmitry Osipenko
454ba154a6
rtc: tps65910: Support wakeup-source property
...
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 <pgwipeout@gmail.com>
Tested-by: Matt Merhar <mattmerhar@protonmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210120211603.18555-1-digetx@gmail.com
2021-01-25 23:57:24 +01:00
Alexandre Belloni
f66e7f2d32
rtc: stm32: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-14-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
31247546b4
rtc: rx8025: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-13-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
2dbbedb9b3
rtc: rx8010: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-12-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
2a5654fe2b
rtc: rv3029: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-11-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
a82430fd2d
rtc: pcf2123: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-10-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
cc92301784
rtc: mcp795: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-9-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
06c6e32167
rtc: m41t80: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-8-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
92e2c3e61d
rtc: hym8563: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-7-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
3aa7eaf238
rtc: ds3232: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-6-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
811c791660
rtc: ds1685: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Joshua Kinard <kumba@gentoo.org>
Link: https://lore.kernel.org/r/20210119220653.677750-5-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
5923819274
rtc: ds1307: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-4-alexandre.belloni@bootlin.com
2021-01-25 23:46:17 +01:00
Alexandre Belloni
d57949bb3c
rtc: ds1305: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-3-alexandre.belloni@bootlin.com
2021-01-25 23:46:16 +01:00
Alexandre Belloni
3fbd293c16
rtc: asm9260: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-2-alexandre.belloni@bootlin.com
2021-01-25 23:46:16 +01:00
Alexandre Belloni
de490e0580
rtc: ac100: use rtc_lock/rtc_unlock
...
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210125221402.1958484-1-alexandre.belloni@bootlin.com
2021-01-25 23:45:37 +01:00
Arnd Bergmann
2f58f5eea8
rtc: remove ste ab3100 driver
...
The ST-Ericsson U300 platform is getting removed, so this driver is no
longer needed.
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210120154158.1860736-4-arnd@kernel.org
2021-01-23 14:57:21 +01:00