Skip to contentSkip to conversation

RTC for 4.18

GIT PULL Alexandre Belloni 2 participants 10 messages Jun 10, 2018 – Jul 11, 2018 Real time clock (RTC)

lore
Share & tools
lore

Alexandre Belloni

author maintainer
#0 lore raw

Hi Linus,

Here is the pull-request for the RTC subsystem for 4.18.

Setting the supported range from drivers for RTCs failing soon has started. A few fixes are developed along the way.
Some drivers have been switched to SPDX by their maintainers.

The following changes since commit 60cc43fc888428bb2f18f08997432d426a243338:

Linux 4.17-rc1 (2018-04-15 18:24:20 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git tags/rtc-4.18

for you to fetch changes up to e4302aec8a0646828a701443e303eb5ef48b37f5:

rtc: pxa: fix probe function (2018-06-07 20:11:08 +0200)

----------------------------------------------------------------
RTC for 4.18

Subsystem:
- rework of the rtc-test driver which allows to test the core more thoroughly
- rtc_set_alarm() now fails early when alarms are not supported

Drivers:
- mktime is now replaced by mktime64
- RTC range added for 88pm80x, ab-b5ze-s3, at91rm9200, brcmstb-waketimer, ds1685, ftrtc010, ls1x, mxc_v2, rx8581, sprd, st-lpc, tps6586x, tps65910 and vr41xx
- Fixed a possible race condition in probe functions
- pxa: fix the probe function that is broken since v4.3
- stm32: now supports stm32mp1

----------------------------------------------------------------
Alexandre Belloni (49):
rtc: nvmem: don't return an error when not enabled
rtc: at91rm9200: add range
rtc: 88pm80x: stop setting a default time
rtc: 88pm80x: remove unused pm80x_rtc_info members
rtc: 88pm80x: fix possible race condition
rtc: 88pm80x: let the core handle the RTC range
rtc: 88pm80x: convert to rtc_tm_to_time64/rtc_time64_to_tm
rtc: ab-b5ze-s3: fix possible race conditions
rtc: ab-b5ze-s3: let the core handle the RTC range
rtc: tps65910: fix possible race condition
rtc: tps65910: allow platform power up
rtc: tps65910: add range
rtc: rx8581: switch to rtc_register_device
rtc: rx8581: add RTC range
rtc: rx8581: let the core handle rtc range
rtc: rx8581: remove useless indirection
rtc: rx8581: remove useless declaration
rtc: rx8581: error out when time invalid
rtc: rx8581: switch to regmap
rtc: vr41xx: fix possible race condition
rtc: vr41xx: add range
rtc: tps6586x: fix possible race condition
rtc: tps6586x: let the core handle rtc range
rtc: ls1x: switch to rtc_register_device
rtc: ls1x: remove useless label and goto
rtc: ls1x: add range
rtc: mxc_v2: fix possible race condition
rtc: mxc_v2: let the core handle rtc range
rtc: mxc_v2: use rtc_time64_to_tm in mxc_rtc_read_alarm
rtc: brcmstb-waketimer: switch to rtc_register_device
rtc: brcmstb-waketimer: add range
rtc: st-lpc: fix possible race condition
rtc: st-lpc: add range
rtc: test: remove obsolete .set_mmss
rtc: ds1685: fix possible race condition
rtc: ds1685: Add range
rtc: test: remove useless proc info
rtc: test: allow registering many devices
rtc: test: store time as an offset to system time
rtc: test: emulate alarms using timers
rtc: test: remove irq sysfs file
rtc: sunxi: fix possible race condition
rtc: mrst: switch to devm functions
rtc: ftrtc010: switch to devm_rtc_allocate_device
rtc: ftrtc010: handle dates after 2106
rtc: ftrtc010: let the core handle range
rtc: test: convert to devm_rtc_allocate_device
rtc: test: remove alarm support from the first device
rtc: ensure rtc_set_alarm fails when alarms are not supported

Amelie Delaunay (8):
rtc: stm32: fix copyright and adopt SPDX identifier
rtc: stm32: fix alarm interrupt flags by removing IRQF_TRIGGER_RISING
dt-bindings: rtc: update stm32-rtc documentation for st, syscfg property
rtc: stm32: get DBP register and mask from DT st, syscfg property
rtc: stm32: fix misspelling and misalignment issues
rtc: stm32: rework register management to prepare other version of RTC
dt-bindings: rtc: update stm32-rtc documentation for stm32mp1 rtc
rtc: stm32: add stm32mp1 rtc support

Andrea Greco (1):
rtc: ds1340: Add support for trickle charger.

Arnd Bergmann (3):
rtc: vr41xx: remove mktime usage
rtc: ls1x: remove mktime usage
rtc: tps6586x: remove mktime usage

Baolin Wang (3):
rtc: sprd: Change to use devm_rtc_allocate_device()
rtc: sprd: Add RTC hardware range
rtc: sprd: Add new RTC power down check method

Dan Carpenter (1):
rtc: pxa: fix probe function

Enric Balletbo i Serra (2):
rtc: cros-ec: Make license text and module license match.
rtc: cros-ec: Switch to SPDX identifier.

Fabio Estevam (3):
dt-bindings: rtc-2123: Make the node name generic
rtc: snvs: Switch to SPDX identifier
rtc: mxc: Switch to SPDX identifier

Mathieu Malaterre (1):
rtc: jz4740: Fix a typo in Kconfig

Michael Trimarchi (1):
rtc: sun6i: Fix bit_idx value for clk_register_gate

Uwe Kleine-König (2):
rtc: ds1742: don't explicitly specify word_size and stride of nvmem
rtc: nvmem: don't use IS_ERR_OR_NULL

Wolfram Sang (1):
rtc: simplify getting .drvdata

Zhang Rui (3):
rtc: cmos: allow using ACPI for RTC alarm instead of HPET
rtc: cmos: acknowledge ACPI driven wake alarms upon resume
rtc: cmos: introduce quirks to enable use_acpi_alarm mode

 .../devicetree/bindings/rtc/nxp,rtc-2123.txt       |   2 +-
 .../devicetree/bindings/rtc/st,stm32-rtc.txt       |  37 ++-
 drivers/rtc/Kconfig                                |   2 +-
 drivers/rtc/interface.c                            |   5 +
 drivers/rtc/nvmem.c                                |   2 +-
 drivers/rtc/rtc-88pm80x.c                          |  58 ++--
 drivers/rtc/rtc-ab-b5ze-s3.c                       |  30 +-
 drivers/rtc/rtc-at91rm9200.c                       |   2 +
 drivers/rtc/rtc-bq4802.c                           |   6 +-
 drivers/rtc/rtc-brcmstb-waketimer.c                |  20 +-
 drivers/rtc/rtc-cmos.c                             | 155 ++++++++--
 drivers/rtc/rtc-cros-ec.c                          |  23 +-
 drivers/rtc/rtc-ds1216.c                           |   6 +-
 drivers/rtc/rtc-ds1307.c                           |   2 +
 drivers/rtc/rtc-ds1511.c                           |   9 +-
 drivers/rtc/rtc-ds1553.c                           |  15 +-
 drivers/rtc/rtc-ds1685.c                           |  66 ++--
 drivers/rtc/rtc-ds1742.c                           |   8 +-
 drivers/rtc/rtc-ftrtc010.c                         |  36 ++-
 drivers/rtc/rtc-lpc32xx.c                          |  16 +-
 drivers/rtc/rtc-ls1x.c                             |  32 +-
 drivers/rtc/rtc-m48t59.c                           |  41 +--
 drivers/rtc/rtc-mrst.c                             |  45 ++-
 drivers/rtc/rtc-mv.c                               |   3 +-
 drivers/rtc/rtc-mxc.c                              |  34 +--
 drivers/rtc/rtc-mxc_v2.c                           |  29 +-
 drivers/rtc/rtc-pcap.c                             |  15 +-
 drivers/rtc/rtc-pxa.c                              |   2 +-
 drivers/rtc/rtc-rx8581.c                           | 210 ++++---------
 drivers/rtc/rtc-sc27xx.c                           |  63 ++--
 drivers/rtc/rtc-sh.c                               |  15 +-
 drivers/rtc/rtc-snvs.c                             |  13 +-
 drivers/rtc/rtc-st-lpc.c                           |  26 +-
 drivers/rtc/rtc-stk17ta8.c                         |  15 +-
 drivers/rtc/rtc-stm32.c                            | 339 +++++++++++++++------
 drivers/rtc/rtc-sun6i.c                            |   4 +-
 drivers/rtc/rtc-sunxi.c                            |  23 +-
 drivers/rtc/rtc-test.c                             | 208 ++++++-------
 drivers/rtc/rtc-tps6586x.c                         |  55 ++--
 drivers/rtc/rtc-tps65910.c                         |  26 +-
 drivers/rtc/rtc-vr41xx.c                           |  35 ++-
 drivers/rtc/rtc-zynqmp.c                           |  10 +-
 include/linux/rtc.h                                |   2 +-
 43 files changed, 904 insertions(+), 841 deletions(-)
Signature · 3 lines
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#1 lore raw

Hi Alexandre,

Quoted 38 lines · Alexandre Belloni

Hi Linus,

Here is the pull-request for the RTC subsystem for 4.18.

Setting the supported range from drivers for RTCs failing soon has started. A few fixes are developed along the way.
Some drivers have been switched to SPDX by their maintainers.

The following changes since commit 60cc43fc888428bb2f18f08997432d426a243338:

Linux 4.17-rc1 (2018-04-15 18:24:20 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git tags/rtc-4.18

for you to fetch changes up to e4302aec8a0646828a701443e303eb5ef48b37f5:

rtc: pxa: fix probe function (2018-06-07 20:11:08 +0200)

----------------------------------------------------------------
RTC for 4.18

Subsystem:
- rework of the rtc-test driver which allows to test the core more thoroughly
- rtc_set_alarm() now fails early when alarms are not supported

Drivers:
- mktime is now replaced by mktime64
- RTC range added for 88pm80x, ab-b5ze-s3, at91rm9200, brcmstb-waketimer, ds1685, ftrtc010, ls1x, mxc_v2, rx8581, sprd, st-lpc, tps6586x, tps65910 and vr41xx
- Fixed a possible race condition in probe functions
- pxa: fix the probe function that is broken since v4.3
- stm32: now supports stm32mp1

----------------------------------------------------------------
Alexandre Belloni (49):

...

Quoted 1 line

rtc: tps6586x: let the core handle rtc range

Sorry I am missing the original mail with the above change, but I have noticed on v4.18-rc1 that rtc wake-ups from suspend are no longer working on one of our Tegra boards. The bisect points to the above change and reverting it fixes the problem. I have not had chance to dig further, but if you have any thoughts, please let me know.

Thanks!
Jon

Signature · 1 line
nvpublic
author maintainer
#2 lore raw

Hi,

Quoted 8 lines · Jon Hunter
Quoted 1 line

rtc: tps6586x: let the core handle rtc range

Sorry I am missing the original mail with the above change, but I have noticed on v4.18-rc1 that rtc wake-ups from suspend are no longer working on one of our Tegra boards. The bisect points to the above change and reverting it fixes the problem. I have not had chance to dig further, but if you have any thoughts, please let me know.

Thanks for the report, does the following patch fix the issue:

https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/patch/?id=1b287f23b0a1fcb2b502dae981a8024be379391e

Signature · 3 lines
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw
Quoted 13 lines · Alexandre Belloni

Hi,

Quoted 8 lines · Jon Hunter
Quoted 1 line

rtc: tps6586x: let the core handle rtc range

Sorry I am missing the original mail with the above change, but I have noticed on v4.18-rc1 that rtc wake-ups from suspend are no longer working on one of our Tegra boards. The bisect points to the above change and reverting it fixes the problem. I have not had chance to dig further, but if you have any thoughts, please let me know.

Quoted 3 lines

Thanks for the report, does the following patch fix the issue:

https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/patch/?id=1b287f23b0a1fcb2b502dae981a8024be379391e

Thanks. I gave the above a test, but still not waking-up from suspend.

Cheers
Jon

Signature · 1 line
nvpublic
author maintainer
#4 lore raw
Quoted 15 lines · Jon Hunter
Quoted 13 lines · Alexandre Belloni

Hi,

Quoted 8 lines · Jon Hunter
Quoted 1 line

rtc: tps6586x: let the core handle rtc range

Sorry I am missing the original mail with the above change, but I have noticed on v4.18-rc1 that rtc wake-ups from suspend are no longer working on one of our Tegra boards. The bisect points to the above change and reverting it fixes the problem. I have not had chance to dig further, but if you have any thoughts, please let me know.

Quoted 6 lines
Quoted 3 lines

Thanks for the report, does the following patch fix the issue:

https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/patch/?id=1b287f23b0a1fcb2b502dae981a8024be379391e

Thanks. I gave the above a test, but still not waking-up from suspend.

Ok, I probably found the issue but the fix is not immediate. I'll try to post something tomorrow.

Signature · 3 lines
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

Hi Alexandre,

Quoted 18 lines · Alexandre Belloni
Quoted 17 lines · Jon Hunter
Quoted 15 lines · Alexandre Belloni

Hi,

Quoted 8 lines · Jon Hunter
Quoted 1 line

rtc: tps6586x: let the core handle rtc range

Sorry I am missing the original mail with the above change, but I have noticed on v4.18-rc1 that rtc wake-ups from suspend are no longer working on one of our Tegra boards. The bisect points to the above change and reverting it fixes the problem. I have not had chance to dig further, but if you have any thoughts, please let me know.

Thanks for the report, does the following patch fix the issue:

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/patch/?id=1b287f23b0a1fcb2b502dae981a8024be379391e

Thanks. I gave the above a test, but still not waking-up from suspend.

Ok, I probably found the issue but the fix is not immediate. I'll try to post something tomorrow.

Sorry if I missed it, but did you send a fix for this?

Cheers
Jon

Signature · 1 line
nvpublic
author maintainer
#6 lore raw
Quoted 5 lines · Jon Hunter
Quoted 2 lines

Ok, I probably found the issue but the fix is not immediate. I'll try to post something tomorrow.

Sorry if I missed it, but did you send a fix for this?

Not yet, I'll keep you copied. I was missing the serial cable of my T20 board with this PMIC. I'll try to find some time later this week to solve that.

If I can't fix it on time, I'll revert the patch.

Signature · 3 lines
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
author maintainer
#7 lore raw

Hi Jon,

Can you test that one?

https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/patch/?id=4393575d9aa250c74335f8b37e0466b872b5080

This fixes setting alarms on the TPS658623 of my T20 board but I don't get the interrupt I'm expecting. However, I don't get interrupts with the offending patch reverted so hopefully, this fix is sufficient.

Quoted 18 lines · Alexandre Belloni
Quoted 5 lines · Jon Hunter
Quoted 2 lines

Ok, I probably found the issue but the fix is not immediate. I'll try to post something tomorrow.

Sorry if I missed it, but did you send a fix for this?

Not yet, I'll keep you copied. I was missing the serial cable of my T20 board with this PMIC. I'll try to find some time later this week to solve that.

If I can't fix it on time, I'll revert the patch.

Signature · 3 lines
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
Signature · 3 lines
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
Tested-by
#8 lore raw

Hi Alexandre.

Quoted 9 lines · Alexandre Belloni

Hi Jon,

Can you test that one?

https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/patch/?id=4393575d9aa250c74335f8b37e0466b872b5080

This fixes setting alarms on the TPS658623 of my T20 board but I don't get the interrupt I'm expecting. However, I don't get interrupts with the offending patch reverted so hopefully, this fix is sufficient.

Yes this fixes the problem. Feel free to add my ...

Cheers!
Jon

Signature · 1 line
nvpublic
author maintainer
#9 lore raw
Quoted 9 lines · Jon Hunter

Hi Alexandre.

Quoted 6 lines · Alexandre Belloni

Hi Jon,

Can you test that one?

https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/patch/?id=4393575d9aa250c74335f8b37e0466b872b5080

Quoted 8 lines
Quoted 3 lines

This fixes setting alarms on the TPS658623 of my T20 board but I don't get the interrupt I'm expecting. However, I don't get interrupts with the offending patch reverted so hopefully, this fix is sufficient.

Yes this fixes the problem. Feel free to add my ...

Great ! Thank you for your patience, I'll send it as a fix before Sunday.

Signature · 3 lines
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com