mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
rtc: pcf2127: provide ->write method
Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
This commit is contained in:
parent
a518dd6336
commit
29f965a7ec
1 changed files with 7 additions and 0 deletions
|
@ -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[] = {
|
||||
|
|
Loading…
Add table
Reference in a new issue