blob: 00987d3bdc2114ed86278bc57c46754bf894386e [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001/* 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
11struct 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
22extern struct ds_defs *ds1603;
23
24void ds1603_set_trimmer(unsigned int);
25void ds1603_enable(void);
26void ds1603_disable(void);
27void ds1603_init(struct ds_defs *);
28
29#define TRIMMER_DEFAULT 3
30#define TRIMMER_DISABLE_RTC 0
31
32#endif