projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rtc: pcf2127: Fixed bug with rtc settings and getting error time
[oweals/u-boot.git]
/
drivers
/
rtc
/
i2c_rtc_emul.c
diff --git
a/drivers/rtc/i2c_rtc_emul.c
b/drivers/rtc/i2c_rtc_emul.c
index 20827fdff135b8a6e60bc570b8a50f531a69364e..d4b33e59d6966835b2e4a6212eb6eb472d43ac66 100644
(file)
--- a/
drivers/rtc/i2c_rtc_emul.c
+++ b/
drivers/rtc/i2c_rtc_emul.c
@@
-1,10
+1,9
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Simulate an I2C real time clock
*
* Copyright (c) 2015 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
/*
* Simulate an I2C real time clock
*
* Copyright (c) 2015 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
*/
/*
@@
-16,7
+15,6
@@
#include <common.h>
#include <dm.h>
#include <common.h>
#include <dm.h>
-#include <fdtdec.h>
#include <i2c.h>
#include <os.h>
#include <rtc.h>
#include <i2c.h>
#include <os.h>
#include <rtc.h>
@@
-29,8
+27,6
@@
#define debug_buffer(x, ...)
#endif
#define debug_buffer(x, ...)
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* struct sandbox_i2c_rtc_plat_data - platform data for the RTC
*
/**
* struct sandbox_i2c_rtc_plat_data - platform data for the RTC
*
@@
-100,7
+96,9
@@
static int sandbox_i2c_rtc_get(struct udevice *dev, struct rtc_time *time)
now = plat->base_time;
}
now = plat->base_time;
}
- return rtc_to_tm(now + plat->offset, time);
+ rtc_to_tm(now + plat->offset, time);
+
+ return 0;
}
static int sandbox_i2c_rtc_set(struct udevice *dev, const struct rtc_time *time)
}
static int sandbox_i2c_rtc_set(struct udevice *dev, const struct rtc_time *time)