Lines Matching +full:0 +full:x7f

25 #define DS1511_SEC		0x0
26 #define DS1511_MIN 0x1
27 #define DS1511_HOUR 0x2
28 #define DS1511_DOW 0x3
29 #define DS1511_DOM 0x4
30 #define DS1511_MONTH 0x5
31 #define DS1511_YEAR 0x6
32 #define DS1511_CENTURY 0x7
33 #define DS1511_AM1_SEC 0x8
34 #define DS1511_AM2_MIN 0x9
35 #define DS1511_AM3_HOUR 0xa
36 #define DS1511_AM4_DATE 0xb
37 #define DS1511_WD_MSEC 0xc
38 #define DS1511_WD_SEC 0xd
39 #define DS1511_CONTROL_A 0xe
40 #define DS1511_CONTROL_B 0xf
41 #define DS1511_RAMADDR_LSB 0x10
42 #define DS1511_RAMDATA 0x13
44 #define DS1511_BLF1 0x80
45 #define DS1511_BLF2 0x40
46 #define DS1511_PRS 0x20
47 #define DS1511_PAB 0x10
48 #define DS1511_TDF 0x08
49 #define DS1511_KSF 0x04
50 #define DS1511_WDF 0x02
51 #define DS1511_IRQF 0x01
52 #define DS1511_TE 0x80
53 #define DS1511_CS 0x40
54 #define DS1511_BME 0x20
55 #define DS1511_TPE 0x10
56 #define DS1511_TIE 0x08
57 #define DS1511_KIE 0x04
58 #define DS1511_WDE 0x02
59 #define DS1511_WDS 0x01
60 #define DS1511_RAM_MAX 0x100
103 dow = rtc_tm->tm_wday & 0x7; /* automatic BCD */ in ds1511_rtc_set_time()
111 sec = bin2bcd(sec) & 0x7f; in ds1511_rtc_set_time()
112 min = bin2bcd(min) & 0x7f; in ds1511_rtc_set_time()
113 hrs = bin2bcd(hrs) & 0x3f; in ds1511_rtc_set_time()
114 day = bin2bcd(day) & 0x3f; in ds1511_rtc_set_time()
115 mon = bin2bcd(mon) & 0x1f; in ds1511_rtc_set_time()
116 yrs = bin2bcd(yrs) & 0xff; in ds1511_rtc_set_time()
117 cen = bin2bcd(cen) & 0xff; in ds1511_rtc_set_time()
123 rtc_write((rtc_read(DS1511_MONTH) & 0xe0) | mon, DS1511_MONTH); in ds1511_rtc_set_time()
132 return 0; in ds1511_rtc_set_time()
143 rtc_tm->tm_sec = rtc_read(DS1511_SEC) & 0x7f; in ds1511_rtc_read_time()
144 rtc_tm->tm_min = rtc_read(DS1511_MIN) & 0x7f; in ds1511_rtc_read_time()
145 rtc_tm->tm_hour = rtc_read(DS1511_HOUR) & 0x3f; in ds1511_rtc_read_time()
146 rtc_tm->tm_mday = rtc_read(DS1511_DOM) & 0x3f; in ds1511_rtc_read_time()
147 rtc_tm->tm_wday = rtc_read(DS1511_DOW) & 0x7; in ds1511_rtc_read_time()
148 rtc_tm->tm_mon = rtc_read(DS1511_MONTH) & 0x1f; in ds1511_rtc_read_time()
149 rtc_tm->tm_year = rtc_read(DS1511_YEAR) & 0x7f; in ds1511_rtc_read_time()
173 return 0; in ds1511_rtc_read_time()
178 rtc_write(rtc_read(DS1511_CONTROL_B) | (enabled ? DS1511_TIE : 0), DS1511_CONTROL_B); in ds1511_rtc_alarm_enable()
187 rtc_write(bin2bcd(alrm->time.tm_mday) & 0x3f, DS1511_AM4_DATE); in ds1511_rtc_set_alarm()
188 rtc_write(bin2bcd(alrm->time.tm_hour) & 0x3f, DS1511_AM3_HOUR); in ds1511_rtc_set_alarm()
189 rtc_write(bin2bcd(alrm->time.tm_min) & 0x7f, DS1511_AM2_MIN); in ds1511_rtc_set_alarm()
190 rtc_write(bin2bcd(alrm->time.tm_sec) & 0x7f, DS1511_AM1_SEC); in ds1511_rtc_set_alarm()
196 return 0; in ds1511_rtc_set_alarm()
201 alrm->time.tm_mday = bcd2bin(rtc_read(DS1511_AM4_DATE) & 0x3f); in ds1511_rtc_read_alarm()
202 alrm->time.tm_hour = bcd2bin(rtc_read(DS1511_AM3_HOUR) & 0x3f); in ds1511_rtc_read_alarm()
203 alrm->time.tm_min = bcd2bin(rtc_read(DS1511_AM2_MIN) & 0x7f); in ds1511_rtc_read_alarm()
204 alrm->time.tm_sec = bcd2bin(rtc_read(DS1511_AM1_SEC) & 0x7f); in ds1511_rtc_read_alarm()
207 return 0; in ds1511_rtc_read_alarm()
214 unsigned long events = 0; in ds1511_interrupt()
237 return 0; in ds1511_rtc_alarm_irq_enable()
254 for (i = 0; i < size; i++) in ds1511_nvram_read()
257 return 0; in ds1511_nvram_read()
266 for (i = 0; i < size; i++) in ds1511_nvram_write()
269 return 0; in ds1511_nvram_write()
275 int ret = 0; in ds1511_rtc_probe()
290 ds1511_base = devm_platform_ioremap_resource(pdev, 0); in ds1511_rtc_probe()
294 ds1511->irq = platform_get_irq(pdev, 0); in ds1511_rtc_probe()
300 rtc_write(0, DS1511_CONTROL_A); in ds1511_rtc_probe()
304 rtc_write(0, DS1511_WD_MSEC); in ds1511_rtc_probe()
305 rtc_write(0, DS1511_WD_SEC); in ds1511_rtc_probe()
332 if (ds1511->irq > 0) { in ds1511_rtc_probe()
335 IRQF_SHARED, pdev->name, pdev) < 0) { in ds1511_rtc_probe()
338 ds1511->irq = 0; in ds1511_rtc_probe()
342 if (ds1511->irq == 0) in ds1511_rtc_probe()
351 return 0; in ds1511_rtc_probe()