diff mbox series

[v4,05/11] rtc: pcf2127: provide ->write method

Message ID 20200706200120.23093-6-rasmus.villemoes@prevas.dk
State Accepted
Commit 29f965a7ec2bc32be3282eac0645b6e5ea2112ab
Delegated to: Heiko Schocher
Headers show
Series new rtc methods, rtc command, and tests | expand

Commit Message

Rasmus Villemoes July 6, 2020, 8:01 p.m. UTC
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 drivers/rtc/pcf2127.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Heiko Schocher July 9, 2020, 8:37 a.m. UTC | #1
Hello Rasmus,

Am 06.07.2020 um 22:01 schrieb Rasmus Villemoes:
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Heiko Schocher <hs@denx.de>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> ---
>   drivers/rtc/pcf2127.c | 7 +++++++
>   1 file changed, 7 insertions(+)

Applied to u-boot-i2c.git master

Thanks!

bye,
Heiko
diff mbox series

Patch

diff --git a/drivers/rtc/pcf2127.c b/drivers/rtc/pcf2127.c
index eea72ad522..88ff8c52c3 100644
--- a/drivers/rtc/pcf2127.c
+++ b/drivers/rtc/pcf2127.c
@@ -43,6 +43,12 @@  static int pcf2127_rtc_read(struct udevice *dev, uint offset, u8 *buffer, uint l
 	return dm_i2c_xfer(dev, &msg, 1);
 }
 
+static int pcf2127_rtc_write(struct udevice *dev, uint offset,
+			     const u8 *buffer, uint len)
+{
+	return dm_i2c_write(dev, offset, buffer, len);
+}
+
 static int pcf2127_rtc_set(struct udevice *dev, const struct rtc_time *tm)
 {
 	uchar buf[7] = {0};
@@ -110,6 +116,7 @@  static const struct rtc_ops pcf2127_rtc_ops = {
 	.set = pcf2127_rtc_set,
 	.reset = pcf2127_rtc_reset,
 	.read = pcf2127_rtc_read,
+	.write = pcf2127_rtc_write,
 };
 
 static const struct udevice_id pcf2127_rtc_ids[] = {