1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Dallas Semiconductors 1603 RTC driver 4 * 5 * Brian Murphy <brian@murphy.dk> 6 * 7 */ 8 #ifndef __DS1603_H 9 #define __DS1603_H 10 11 struct ds_defs { 12 volatile u32 *reg; 13 volatile u32 *data_reg; 14 u32 rst; 15 u32 clk; 16 u32 data; 17 u32 data_read_shift; 18 char data_reversed; 19 u32 huge_delay; 20 }; 21 22 extern struct ds_defs *ds1603; 23 24 void ds1603_set_trimmer(unsigned int); 25 void ds1603_enable(void); 26 void ds1603_disable(void); 27 void ds1603_init(struct ds_defs *); 28 29 #define TRIMMER_DEFAULT 3 30 #define TRIMMER_DISABLE_RTC 0 31 32 #endif