mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
dm: rtc: Rename gregorian day function
Change this function name to something more descriptive. Also return a failure code if it cannot calculate a correct value. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
@@ -45,7 +45,6 @@ int rtc_get (struct rtc_time *);
|
||||
int rtc_set (struct rtc_time *);
|
||||
void rtc_reset (void);
|
||||
|
||||
void GregorianDay (struct rtc_time *);
|
||||
void to_tm (int, struct rtc_time *);
|
||||
unsigned long mktime (unsigned int, unsigned int, unsigned int,
|
||||
unsigned int, unsigned int, unsigned int);
|
||||
@@ -87,4 +86,15 @@ void rtc_write32(int reg, u32 value);
|
||||
*/
|
||||
void rtc_init(void);
|
||||
|
||||
/**
|
||||
* rtc_calc_weekday() - Work out the weekday from a time
|
||||
*
|
||||
* This only works for the Gregorian calendar - i.e. after 1752 (in the UK).
|
||||
* It sets time->tm_wdaay to the correct day of the week.
|
||||
*
|
||||
* @time: Time to inspect. tm_wday is updated
|
||||
* @return 0 if OK, -EINVAL if the weekday could not be determined
|
||||
*/
|
||||
int rtc_calc_weekday(struct rtc_time *time);
|
||||
|
||||
#endif /* _RTC_H_ */
|
||||
|
Reference in New Issue
Block a user