3 comments:
Done
We change the code for mt8173 and mt8183 for these two reasons. 1. Move rtc_read and rtc_write to SoC folder.
2. Following functions can share with mt8192. Move them to common/.
File src/soc/mediatek/common/include/soc/rtc_common.h:
Patch Set #53, Line 8: <soc/rtc.h>
rtc.h
File src/soc/mediatek/common/rtc.c:
int rtc_set(const struct rtc_time *time)
{
return -1;
}
/* get rtc time */
int rtc_get(struct rtc_time *time)
{
u16 value;
rtc_read(RTC_TC_SEC, &value);
time->sec = value;
rtc_read(RTC_TC_MIN, &value);
time->min = value;
rtc_read(RTC_TC_HOU, &value);
time->hour = value;
rtc_read(RTC_TC_DOM, &value);
time->mday = value;
rtc_read(RTC_TC_MTH, &value);
time->mon = value;
rtc_read(RTC_TC_YEA, &value);
time->year = (value + RTC_MIN_YEAR_OFFSET) % 100;
return 0;
}
these two functions is needed for src/include/rtc.h
To view, visit change 46395. To unsubscribe, or for help writing mail filters, visit settings.