Add a driver for Epson RX8111 RTC
Subsystems (2)
v3 cover Add a driver for Epson RX8111 RTC
In this patch series we add a basic driver for Epson RX8111 RTC with support for only reading/writing the time and the ioctls RTC_VL_READ and RTC_VL_CLR.
Datasheet: https://support.epson.biz/td/api/doc_check.php?dl=app_RX8111CE&lang=en
Changes in v3:
* Remove macro define RX8111_DRV_NAME for the driver name.
* Remove macro function RX8111_TIME_BUF_IDX and instead use the offsets as indices directly.
* Remove rx8111_setup() that disabled extended functionality and interrupts.
* Remove comments explaining register value conversions in rx8111_read/set_time().
* Check/clear register flag XST (oscillation stoppage) in rx8111_read/set_time().
* Change vlval to unsigned int in rx8111_ioctl().
* Remove case RTC_VL_CLR in rx8111_ioctl().
* Convert all dev_err() to dev_dbg().
* Convert all dev_err_probe() to dev_dbg() in probe.
* Return without printing from devm_rtc_register_device() in probe.
Link to v2: https://lore.kernel.org/lkml/[email protected]/
Changes in v2:
* Move dt-bindings to trivial-rtc.yaml.
Link to v1: https://lore.kernel.org/lkml/[email protected]/
Waqar Hameed (2):
dt-bindings: rtc: Add Epson RX8111
rtc: Add driver for Epson RX8111
.../devicetree/bindings/rtc/trivial-rtc.yaml | 1 + drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-rx8111.c | 356 ++++++++++++++++++ 4 files changed, 368 insertions(+) create mode 100644 drivers/rtc/rtc-rx8111.c
base-commit: 98b1cc82c4affc16f5598d4fa14b1858671b2263
Signature · 1 line
2.30.2
PATCH v3 1/2 dt-bindings: rtc: Add Epson RX8111
Epson RX8111 is an RTC with timestamp functionality. Add devicetree bindings requiring the compatible string and I2C slave address (reg) through trivial-rtc.yaml.
--- Documentation/devicetree/bindings/rtc/trivial-rtc.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/rtc/trivial-rtc.yaml +1 -0
@@ -38,6 +38,7 @@ properties: - epson,rx8025 - epson,rx8035 # I2C-BUS INTERFACE REAL TIME CLOCK MODULE with Battery Backed RAM + - epson,rx8111 - epson,rx8571 # I2C-BUS INTERFACE REAL TIME CLOCK MODULE - epson,rx8581
Signature · 1 line
2.30.2
PATCH v3 2/2 rtc: Add driver for Epson RX8111
In reply to Waqar HameedEpson RX8111 is an RTC with alarm, timer and timestamp functionality. Add a basic driver with support for only reading/writing time (for now).
--- drivers/rtc/Kconfig | 10 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-rx8111.c | 356 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 367 insertions(+) create mode 100644 drivers/rtc/rtc-rx8111.c
drivers/rtc/Kconfig +10 -0
@@ -639,6 +639,16 @@ config RTC_DRV_RX8010 This driver can also be built as a module. If so, the module will be called rtc-rx8010. +config RTC_DRV_RX8111 + tristate "Epson RX8111" + select REGMAP_I2C + depends on I2C + help + If you say yes here you will get support for the Epson RX8111 RTC. + + This driver can also be built as a module. If so, the module will be + called rtc-rx8111. + config RTC_DRV_RX8581 tristate "Epson RX-8571/RX-8581" select REGMAP_I2C
drivers/rtc/Makefile +1 -0
@@ -152,6 +152,7 @@ obj-$(CONFIG_RTC_DRV_RX4581) += rtc-rx4581.o obj-$(CONFIG_RTC_DRV_RX6110) += rtc-rx6110.o obj-$(CONFIG_RTC_DRV_RX8010) += rtc-rx8010.o obj-$(CONFIG_RTC_DRV_RX8025) += rtc-rx8025.o +obj-$(CONFIG_RTC_DRV_RX8111) += rtc-rx8111.o obj-$(CONFIG_RTC_DRV_RX8581) += rtc-rx8581.o obj-$(CONFIG_RTC_DRV_RZN1) += rtc-rzn1.o obj-$(CONFIG_RTC_DRV_S35390A) += rtc-s35390a.o
drivers/rtc/rtc-rx8111.c new file +356 -0
356 lines not on this page · raw message
Signature · 1 line
2.30.2
Re: [PATCH v3 2/2] rtc: Add driver for Epson RX8111
Quoted 2 lines · On Mon, Nov 20, 2023 at 15:49 +0100 Waqar Hameed <[email protected]> wrote:
Epson RX8111 is an RTC with alarm, timer and timestamp functionality. Add a basic driver with support for only reading/writing time (for now).
Friendly ping incoming!
Alexandre Belloni
maintainerRe: [PATCH v3 2/2] rtc: Add driver for Epson RX8111
Quoted 6 lines · Waqar Hameed
Quoted 2 lines · On Mon, Nov 20, 2023 at 15:49 +0100 Waqar Hameed <[email protected]> wrote:
Epson RX8111 is an RTC with alarm, timer and timestamp functionality. Add a basic driver with support for only reading/writing time (for now).
Friendly ping incoming!
Yes, this is definitely on my list of things to review before the end of the week.
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 22 lines · Waqar Hameed
In this patch series we add a basic driver for Epson RX8111 RTC with support for only reading/writing the time and the
ioctlsRTC_VL_READandRTC_VL_CLR.Datasheet: https://support.epson.biz/td/api/doc_check.php?dl=app_RX8111CE&lang=en
Changes in v3:
* Remove macro defineRX8111_DRV_NAMEfor the driver name.
* Remove macro functionRX8111_TIME_BUF_IDXand instead use the offsets as indices directly.
* Removerx8111_setup()that disabled extended functionality and interrupts.
* Remove comments explaining register value conversions inrx8111_read/set_time().
* Check/clear register flag XST (oscillation stoppage) inrx8111_read/set_time().
* Changevlvaltounsigned intinrx8111_ioctl().
* Removecase RTC_VL_CLRinrx8111_ioctl().
* Convert alldev_err()todev_dbg().
* Convert alldev_err_probe()todev_dbg()in probe.
* Return without printing fromdevm_rtc_register_device()in probe.
Quoted 1 line
[...]
Applied, thanks!
[1/2] dt-bindings: rtc: Add Epson RX8111
https://git.kernel.org/abelloni/c/c6a2fb6d14bf [2/2] rtc: Add driver for Epson RX8111 https://git.kernel.org/abelloni/c/f8c81d15f4bb
Best regards,
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com