rtc-mt7622.c (10a558374f3751cf4eb55143008975641dfc2cf4) | rtc-mt7622.c (22652ba72453d35c8a637d5c0f06b3dc29ff9eb0) |
---|---|
1/* 2 * Driver for MediaTek SoC based RTC 3 * 4 * Copyright (C) 2017 Sean Wang <sean.wang@mediatek.com> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 of --- 218 unchanged lines hidden (view full) --- 227} 228 229static int mtk_rtc_gettime(struct device *dev, struct rtc_time *tm) 230{ 231 struct mtk_rtc *hw = dev_get_drvdata(dev); 232 233 mtk_rtc_get_alarm_or_time(hw, tm, MTK_TC); 234 | 1/* 2 * Driver for MediaTek SoC based RTC 3 * 4 * Copyright (C) 2017 Sean Wang <sean.wang@mediatek.com> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 of --- 218 unchanged lines hidden (view full) --- 227} 228 229static int mtk_rtc_gettime(struct device *dev, struct rtc_time *tm) 230{ 231 struct mtk_rtc *hw = dev_get_drvdata(dev); 232 233 mtk_rtc_get_alarm_or_time(hw, tm, MTK_TC); 234 |
235 return rtc_valid_tm(tm); | 235 return 0; |
236} 237 238static int mtk_rtc_settime(struct device *dev, struct rtc_time *tm) 239{ 240 struct mtk_rtc *hw = dev_get_drvdata(dev); 241 242 if (!MTK_RTC_TM_YR_VALID(tm->tm_year)) 243 return -EINVAL; --- 179 unchanged lines hidden --- | 236} 237 238static int mtk_rtc_settime(struct device *dev, struct rtc_time *tm) 239{ 240 struct mtk_rtc *hw = dev_get_drvdata(dev); 241 242 if (!MTK_RTC_TM_YR_VALID(tm->tm_year)) 243 return -EINVAL; --- 179 unchanged lines hidden --- |