rtc-m48t86.c (e3f51c0d29164b2e4cf3c72c962f3a4891412e9b) | rtc-m48t86.c (22652ba72453d35c8a637d5c0f06b3dc29ff9eb0) |
---|---|
1/* 2 * ST M48T86 / Dallas DS12887 RTC driver 3 * Copyright (c) 2006 Tower Technologies 4 * 5 * Author: Alessandro Zummo <a.zummo@towertech.it> 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 version 2 as --- 86 unchanged lines hidden (view full) --- 95 tm->tm_wday = bcd2bin(m48t86_readb(dev, M48T86_DOW)); 96 } 97 98 /* correct the hour if the clock is in 12h mode */ 99 if (!(reg & M48T86_B_H24)) 100 if (m48t86_readb(dev, M48T86_HOUR) & 0x80) 101 tm->tm_hour += 12; 102 | 1/* 2 * ST M48T86 / Dallas DS12887 RTC driver 3 * Copyright (c) 2006 Tower Technologies 4 * 5 * Author: Alessandro Zummo <a.zummo@towertech.it> 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 version 2 as --- 86 unchanged lines hidden (view full) --- 95 tm->tm_wday = bcd2bin(m48t86_readb(dev, M48T86_DOW)); 96 } 97 98 /* correct the hour if the clock is in 12h mode */ 99 if (!(reg & M48T86_B_H24)) 100 if (m48t86_readb(dev, M48T86_HOUR) & 0x80) 101 tm->tm_hour += 12; 102 |
103 return rtc_valid_tm(tm); | 103 return 0; |
104} 105 106static int m48t86_rtc_set_time(struct device *dev, struct rtc_time *tm) 107{ 108 unsigned char reg; 109 110 reg = m48t86_readb(dev, M48T86_B); 111 --- 184 unchanged lines hidden --- | 104} 105 106static int m48t86_rtc_set_time(struct device *dev, struct rtc_time *tm) 107{ 108 unsigned char reg; 109 110 reg = m48t86_readb(dev, M48T86_B); 111 --- 184 unchanged lines hidden --- |