rtc: Add RTC chip pcf2127 support
PATCH v3 1/1 rtc: Add RTC chip pcf2127 support
This driver just implemented rtc_get and rtc_set function for the compatibility of pcf2127 and pcf2129, and didn't make use of pcf2127's 512 bytes of general-purpose static RAM since pcf2129 don't have any static RAM.
---
change in V3:
-fix coding style and return value check
change in V2:
-convert to using u-boot driver module
--- drivers/rtc/Kconfig | 10 +++++ drivers/rtc/Makefile | 1 + drivers/rtc/pcf2127.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 drivers/rtc/pcf2127.c
drivers/rtc/Kconfig +10 -0
@@ -13,4 +13,14 @@ config DM_RTC drivers to perform the actual functions. See rtc.h for a description of the API. +config RTC_PCF2127 + bool "Enable PCF2127 driver" + depends on DM_RTC + help + The PCF2127 is a CMOS Real Time Clock (RTC) and calendar with an integrated + Temperature Compensated Crystal (Xtal) Oscillator (TCXO) and a 32.768 kHz quartz + crystal optimized for very high accuracy and very low power consumption. The PCF2127 + has a selectable I2C-bus or SPI-bus, a backup battery switch-over circuit, a + programmable watchdog function, a timestamp function, and many other features. + endmenu
drivers/rtc/Makefile +1 -0
@@ -45,6 +45,7 @@ obj-$(CONFIG_RTC_MV) += mvrtc.o obj-$(CONFIG_RTC_MX27) += mx27rtc.o obj-$(CONFIG_RTC_MXS) += mxsrtc.o obj-$(CONFIG_RTC_PCF8563) += pcf8563.o +obj-$(CONFIG_RTC_PCF2127) += pcf2127.o obj-$(CONFIG_RTC_PL031) += pl031.o obj-$(CONFIG_RTC_PT7C4338) += pt7c4338.o obj-$(CONFIG_RTC_RS5C372A) += rs5c372.o
drivers/rtc/pcf2127.c new file +109 -0
109 lines not on this page · raw message
Signature · 1 line
2.1.0.27.g96db324
PATCH v3 1/1 rtc: Add RTC chip pcf2127 support
Quoted 11 lines · Meng Yi
This driver just implemented
rtc_getandrtc_setfunction for the compatibility of pcf2127 and pcf2129, and didn't make use of pcf2127's 512 bytes of general-purpose static RAM since pcf2129 don't have any static RAM.Signed-off-by Meng Yi <[email protected]>---
change in V3:
-fix coding style and return value check
change in V2:
-convert to using u-boot driver module
Quoted 6 lines
--- drivers/rtc/Kconfig | 10 +++++ drivers/rtc/Makefile | 1 + drivers/rtc/pcf2127.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 drivers/rtc/pcf2127.c
PATCH v3 1/1 rtc: Add RTC chip pcf2127 support
Quoted 6 lines · Simon Glass
Quoted 5 lines · Meng Yi
This driver just implemented
rtc_getandrtc_setfunction for the compatibility of pcf2127 and pcf2129, and didn't make use of pcf2127's 512 bytes of general-purpose static RAM since pcf2129 don't have any static RAM.
Quoted 14 lines
Quoted 6 lines
Signed-off-by Meng Yi <[email protected]>---
change in V3:
-fix coding style and return value check
change in V2:
-convert to using u-boot driver moduleQuoted 6 lines
--- drivers/rtc/Kconfig | 10 +++++ drivers/rtc/Makefile | 1 + drivers/rtc/pcf2127.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 drivers/rtc/pcf2127.cReviewed-by Simon Glass <[email protected]>
Applied to u-boot-dm, thanks!