ds1286.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (C) 1998, 1999, 2003 Ralf Baechle
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. */
  8. #ifndef __LINUX_DS1286_H
  9. #define __LINUX_DS1286_H
  10. /**********************************************************************
  11. * register summary
  12. **********************************************************************/
  13. #define RTC_HUNDREDTH_SECOND 0
  14. #define RTC_SECONDS 1
  15. #define RTC_MINUTES 2
  16. #define RTC_MINUTES_ALARM 3
  17. #define RTC_HOURS 4
  18. #define RTC_HOURS_ALARM 5
  19. #define RTC_DAY 6
  20. #define RTC_DAY_ALARM 7
  21. #define RTC_DATE 8
  22. #define RTC_MONTH 9
  23. #define RTC_YEAR 10
  24. #define RTC_CMD 11
  25. #define RTC_WHSEC 12
  26. #define RTC_WSEC 13
  27. #define RTC_UNUSED 14
  28. /* RTC_*_alarm is always true if 2 MSBs are set */
  29. # define RTC_ALARM_DONT_CARE 0xC0
  30. /*
  31. * Bits in the month register
  32. */
  33. #define RTC_EOSC 0x80
  34. #define RTC_ESQW 0x40
  35. /*
  36. * Bits in the Command register
  37. */
  38. #define RTC_TDF 0x01
  39. #define RTC_WAF 0x02
  40. #define RTC_TDM 0x04
  41. #define RTC_WAM 0x08
  42. #define RTC_PU_LVL 0x10
  43. #define RTC_IBH_LO 0x20
  44. #define RTC_IPSW 0x40
  45. #define RTC_TE 0x80
  46. #endif /* __LINUX_DS1286_H */