mbox series

[v7,0/5] RZ/N1 RTC support

Message ID 20220516082504.33913-1-miquel.raynal@bootlin.com
Headers show
Series RZ/N1 RTC support | expand

Message

Miquel Raynal May 16, 2022, 8:24 a.m. UTC
Hello,

This small series adds support for the RZ/N1 RTC.

Despite its limitations, I found useful to at least have alarm and
offset support.

Cheers,
Miquèl

Changes in v7:
* Drop the unused *clk member of the rtc structure and the clk.h header
  as well now that we use runtime pm.

Changes in v6:
* Fix a sparse warning by dropping a variable not really used and
  replaced by a comment.

Changes in v5:
* Dropped a (now) useless header that could produce a build error.

Changes in v4:
* Collected more tags (on the DT bindings).
* Fixed the name of the SoC in the header: RZ/N1 instead of RZN1.
* Dropped the error message when the alarm IRQ is not available (already
  handled by the core)
* Used pm_runtime_put() instead of pm_runtime_put_sync().
* Used pm_runtime_resume_and_get() instead of pm_runtime_get().
* Used devm_pm_runtime_enable() instead of pm_runtime_enable().

Changes in v3:
* Collected tags.
* s/soc:/clk:/ in the clock commit title.
* Dropped the RTC hclk fix which has already been applied.
* Added the power-domain properties both in the bindings and in the DT.
* Used runtime PM to enable the clock instead of using the clk API
  directly. 

Changes in v2:
* Fixed the error path in the clk driver, where I missed to release a
  spin_lock.
* Collected tags.
* Moved the rtc subnode in the dt to keep the nodes ordered by unit
  address.
* Dropped the useless "oneOf" statement in the bindings (compatible
  property).
* Dropped the start-year property in the bindings (already defined).
* Avoided rollover calculations that could be more easily handled (and
  reviewed) with a time64_t conversion.
* Returned ERANGE instead of EOPNOTSUPP when the alarm date is not
  valid.
* Cleared RTC_FEATURE_UPDATE_INTERRUPT to avoid warning from the tools.
* Dropped the sysctl patch adding the reset helper, instead fulfilled
  the description of the RTC clock so that when requesting this clock to
  be enabled, the idle bit is released.
* Avoided rollover calculations that could be more easily handled
  (and reviewed) with a time64_t conversion.
* Fixed the max_range value, after a rtc-range test and looking at other
  implementations.

Michel Pollet (1):
  rtc: rzn1: Add new RTC driver

Miquel Raynal (4):
  dt-bindings: rtc: rzn1: Describe the RZN1 RTC
  rtc: rzn1: Add alarm support
  rtc: rzn1: Add oscillator offset support
  MAINTAINERS: Add myself as maintainer of the RZN1 RTC driver

 .../bindings/rtc/renesas,rzn1-rtc.yaml        |  70 +++
 MAINTAINERS                                   |   8 +
 drivers/rtc/Kconfig                           |   7 +
 drivers/rtc/Makefile                          |   1 +
 drivers/rtc/rtc-rzn1.c                        | 420 ++++++++++++++++++
 5 files changed, 506 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/renesas,rzn1-rtc.yaml
 create mode 100644 drivers/rtc/rtc-rzn1.c

Comments

Alexandre Belloni May 17, 2022, 9:13 p.m. UTC | #1
On Mon, 16 May 2022 10:24:59 +0200, Miquel Raynal wrote:
> This small series adds support for the RZ/N1 RTC.
> 
> Despite its limitations, I found useful to at least have alarm and
> offset support.
> 
> Cheers,
> Miquèl
> 
> [...]

Applied, thanks!

[1/5] dt-bindings: rtc: rzn1: Describe the RZN1 RTC
      commit: 4c4d145a65e5a7faac440081bc1eac860930cd24
[2/5] rtc: rzn1: Add new RTC driver
      commit: deeb4b5393e106b990607df06261fba0ebb7ebde
[3/5] rtc: rzn1: Add alarm support
      commit: b5ad1bf00d2c4bf96bf9318f44a929f0b22dd29c
[4/5] rtc: rzn1: Add oscillator offset support
      commit: be4a11cf98aff5d456eae947a49b6163393d9420
[5/5] MAINTAINERS: Add myself as maintainer of the RZN1 RTC driver
      commit: 060eceb739e5b30db684666592c2a33d09426651

Best regards,