PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/mips/lasat/ds1603.h

http://github.com/mirrors/linux
C Header | 32 lines | 20 code | 5 blank | 7 comment | 0 complexity | a0e7533e4a09f1720f0c6f0d27ddf84f MD5 | raw file
 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
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