blob: 3e718b1cca025407b6034c851f2ffc389e8c7f94 [file] [log] [blame]
Brian Murphy1f21d2b2007-08-21 22:34:16 +02001/*
2 * Dallas Semiconductors 1603 RTC driver
3 *
4 * Brian Murphy <brian@murphy.dk>
5 *
6 */
7#ifndef __DS1603_H
8#define __DS1603_H
9
10struct ds_defs {
11 volatile u32 *reg;
12 volatile u32 *data_reg;
13 u32 rst;
14 u32 clk;
15 u32 data;
16 u32 data_read_shift;
17 char data_reversed;
18 u32 huge_delay;
19};
20
21extern struct ds_defs *ds1603;
22
Brian Murphy1f21d2b2007-08-21 22:34:16 +020023void ds1603_set_trimmer(unsigned int);
24void ds1603_enable(void);
25void ds1603_disable(void);
26void ds1603_init(struct ds_defs *);
27
Ralf Baechle70342282013-01-22 12:59:30 +010028#define TRIMMER_DEFAULT 3
Brian Murphy1f21d2b2007-08-21 22:34:16 +020029#define TRIMMER_DISABLE_RTC 0
30
31#endif