 039c8db774
			
		
	
	
		039c8db774
		
	
	
	
	
		
			
			On the BeagleBoard-xM, the RTC is located on the Power Management IC (PMIC). To keep things consistent, access to the PMIC's RTC is done through the readclock driver. The readclock driver forwards the request on to the TPS65950 driver which does the work of manipulating the registers on the chip. Change-Id: I53cefbb59c5a9ab87fab90df3cc1a75a6e430f58
		
			
				
	
	
		
			22 lines
		
	
	
		
			457 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			457 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #ifndef __READCLOCK_H
 | |
| #define __READCLOCK_H
 | |
| 
 | |
| #include <time.h>
 | |
| 
 | |
| /* implementations provided by arch/${MACHINE_ARCH}/arch_readclock.c */
 | |
| struct rtc {
 | |
| 	int (*init)(void);
 | |
| 	int (*get_time)(struct tm *t, int flags);
 | |
| 	int (*set_time)(struct tm *t, int flags);
 | |
| 	int (*pwr_off)(void);
 | |
| 	void (*exit)(void);
 | |
| };
 | |
| 
 | |
| int arch_setup(struct rtc *r);
 | |
| 
 | |
| /* utility functions provided by readclock.c */
 | |
| int bcd_to_dec(int n);
 | |
| int dec_to_bcd(int n);
 | |
| 
 | |
| #endif /* __READCLOCK_H */
 |