hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/include/linux/rtc/ds1685.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Definitions for the registers, addresses, and platform data of the
34 * DS1685/DS1687-series RTC chips.
....@@ -15,10 +16,6 @@
1516 * DS17x85/DS17x87 3V/5V Real-Time Clocks, 19-5222, Rev 4/10.
1617 * DS1689/DS1693 3V/5V Serialized Real-Time Clocks, Rev 112105.
1718 * Application Note 90, Using the Multiplex Bus RTC Extended Features.
18
- *
19
- * This program is free software; you can redistribute it and/or modify
20
- * it under the terms of the GNU General Public License version 2 as
21
- * published by the Free Software Foundation.
2219 */
2320
2421 #ifndef _LINUX_RTC_DS1685_H_
....@@ -45,16 +42,11 @@
4542 struct ds1685_priv {
4643 struct rtc_device *dev;
4744 void __iomem *regs;
45
+ void __iomem *data;
4846 u32 regstep;
49
- resource_size_t baseaddr;
50
- size_t size;
51
- spinlock_t lock;
52
- struct work_struct work;
5347 int irq_num;
5448 bool bcd_mode;
5549 bool no_irq;
56
- bool uie_unsupported;
57
- bool alloc_io_resources;
5850 u8 (*read)(struct ds1685_priv *, int);
5951 void (*write)(struct ds1685_priv *, int, u8);
6052 void (*prepare_poweroff)(void);
....@@ -79,12 +71,13 @@
7971 const bool bcd_mode;
8072 const bool no_irq;
8173 const bool uie_unsupported;
82
- const bool alloc_io_resources;
83
- u8 (*plat_read)(struct ds1685_priv *, int);
84
- void (*plat_write)(struct ds1685_priv *, int, u8);
8574 void (*plat_prepare_poweroff)(void);
8675 void (*plat_wake_alarm)(void);
8776 void (*plat_post_ram_clear)(void);
77
+ enum {
78
+ ds1685_reg_direct,
79
+ ds1685_reg_indirect
80
+ } access_type;
8881 };
8982
9083