From patchwork Mon Jul 6 20:01:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 240832 List-Id: U-Boot discussion From: rasmus.villemoes at prevas.dk (Rasmus Villemoes) Date: Mon, 6 Jul 2020 22:01:14 +0200 Subject: [PATCH v4 05/11] rtc: pcf2127: provide ->write method In-Reply-To: <20200706200120.23093-1-rasmus.villemoes@prevas.dk> References: <20200706200120.23093-1-rasmus.villemoes@prevas.dk> Message-ID: <20200706200120.23093-6-rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass Reviewed-by: Heiko Schocher Signed-off-by: Rasmus Villemoes --- drivers/rtc/pcf2127.c | 7 +++++++ 1 file changed, 7 insertions(+) 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[] = {