rtc-pic32.c (0cce284537fb42d9c28b9b31038ffc9b464555f5) | rtc-pic32.c (22652ba72453d35c8a637d5c0f06b3dc29ff9eb0) |
---|---|
1/* 2 * PIC32 RTC driver 3 * 4 * Joshua Henderson <joshua.henderson@microchip.com> 5 * Copyright (C) 2016 Microchip Technology Inc. All rights reserved. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 161 unchanged lines hidden (view full) --- 170 171 rtc_tm->tm_year += 100; 172 173 dev_dbg(dev, "read time %04d.%02d.%02d %02d:%02d:%02d\n", 174 1900 + rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday, 175 rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); 176 177 clk_disable(pdata->clk); | 1/* 2 * PIC32 RTC driver 3 * 4 * Joshua Henderson <joshua.henderson@microchip.com> 5 * Copyright (C) 2016 Microchip Technology Inc. All rights reserved. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 161 unchanged lines hidden (view full) --- 170 171 rtc_tm->tm_year += 100; 172 173 dev_dbg(dev, "read time %04d.%02d.%02d %02d:%02d:%02d\n", 174 1900 + rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday, 175 rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); 176 177 clk_disable(pdata->clk); |
178 return rtc_valid_tm(rtc_tm); | 178 return 0; |
179} 180 181static int pic32_rtc_settime(struct device *dev, struct rtc_time *tm) 182{ 183 struct pic32_rtc_dev *pdata = dev_get_drvdata(dev); 184 void __iomem *base = pdata->reg_base; 185 int year = tm->tm_year - 100; 186 --- 224 unchanged lines hidden --- | 179} 180 181static int pic32_rtc_settime(struct device *dev, struct rtc_time *tm) 182{ 183 struct pic32_rtc_dev *pdata = dev_get_drvdata(dev); 184 void __iomem *base = pdata->reg_base; 185 int year = tm->tm_year - 100; 186 --- 224 unchanged lines hidden --- |