Skip to contentSkip to conversation

rtc: add AB-RTCMC-32.768kHz-EOZ9 RTC support

PATCH Applied Artem Panfilov 2 participants 2 messages Feb 17, 2019 – Feb 18, 2019 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 rtc: add AB-RTCMC-32.768kHz-EOZ9 RTC support

This patch adds support for AB-RTCMC-32.768kHz-EOZ9 RTC/Calendar module with I2C interface.

v3:
- Move validity check before reading time registers
- Add V1F/V2F check before reading the temperature
- Fix missing check of a return value

v2:
- Remove a package denomination in variable names and files
- Fix read/write time registers length
- Replace regmap_update_bits with regmap_write during probing
- Add a check and reset for PON, V2F, V1F registers
- Rename registers according to the datasheet

---
 drivers/rtc/Kconfig       |  10 +
 drivers/rtc/Makefile      |   1 +
 drivers/rtc/rtc-ab-eoz9.c | 465 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 476 insertions(+)
 create mode 100644 drivers/rtc/rtc-ab-eoz9.c
drivers/rtc/Kconfig +10 -0
index 225b0b8516f3..ea0780a7f1bf 100644
@@ -185,6 +185,16 @@ config RTC_DRV_ABB5ZES3
 	  This driver can also be built as a module. If so, the module
 	  will be called rtc-ab-b5ze-s3.
 
+config RTC_DRV_ABEOZ9
+	select REGMAP_I2C
+	tristate "Abracon AB-RTCMC-32.768kHz-EOZ9"
+	help
+	  If you say yes here you get support for the Abracon
+	  AB-RTCMC-32.768kHz-EOA9 I2C RTC chip.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called rtc-ab-e0z9.
+
 config RTC_DRV_ABX80X
 	tristate "Abracon ABx80x"
 	select WATCHDOG_CORE if WATCHDOG
drivers/rtc/Makefile +1 -0
index df022d820bee..974252647087 100644
@@ -28,6 +28,7 @@ obj-$(CONFIG_RTC_DRV_88PM860X)	+= rtc-88pm860x.o
 obj-$(CONFIG_RTC_DRV_AB3100)	+= rtc-ab3100.o
 obj-$(CONFIG_RTC_DRV_AB8500)	+= rtc-ab8500.o
 obj-$(CONFIG_RTC_DRV_ABB5ZES3)	+= rtc-ab-b5ze-s3.o
+obj-$(CONFIG_RTC_DRV_ABEOZ9)	+= rtc-ab-eoz9.o
 obj-$(CONFIG_RTC_DRV_ABX80X)	+= rtc-abx80x.o
 obj-$(CONFIG_RTC_DRV_AC100)	+= rtc-ac100.o
 obj-$(CONFIG_RTC_DRV_ARMADA38X)	+= rtc-armada38x.o
drivers/rtc/rtc-ab-eoz9.c new file +465 -0

465 lines not on this page · raw message

Signature · 1 line
2.19.1
maintainer Applied
#1 lore raw
Quoted 15 lines · Artem Panfilov

This patch adds support for AB-RTCMC-32.768kHz-EOZ9 RTC/Calendar module with I2C interface.

v3:
- Move validity check before reading time registers
- Add V1F/V2F check before reading the temperature
- Fix missing check of a return value

v2:
- Remove a package denomination in variable names and files
- Fix read/write time registers length
- Replace regmap_update_bits with regmap_write during probing
- Add a check and reset for PON, V2F, V1F registers
- Rename registers according to the datasheet

Quoted 8 lines
---
 drivers/rtc/Kconfig       |  10 +
 drivers/rtc/Makefile      |   1 +
 drivers/rtc/rtc-ab-eoz9.c | 465 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 476 insertions(+)
 create mode 100644 drivers/rtc/rtc-ab-eoz9.c

Applied, thanks.

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com