| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Definitions for the registers, addresses, and platform data of the |
|---|
| 3 | 4 | * DS1685/DS1687-series RTC chips. |
|---|
| .. | .. |
|---|
| 15 | 16 | * DS17x85/DS17x87 3V/5V Real-Time Clocks, 19-5222, Rev 4/10. |
|---|
| 16 | 17 | * DS1689/DS1693 3V/5V Serialized Real-Time Clocks, Rev 112105. |
|---|
| 17 | 18 | * 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. |
|---|
| 22 | 19 | */ |
|---|
| 23 | 20 | |
|---|
| 24 | 21 | #ifndef _LINUX_RTC_DS1685_H_ |
|---|
| .. | .. |
|---|
| 45 | 42 | struct ds1685_priv { |
|---|
| 46 | 43 | struct rtc_device *dev; |
|---|
| 47 | 44 | void __iomem *regs; |
|---|
| 45 | + void __iomem *data; |
|---|
| 48 | 46 | u32 regstep; |
|---|
| 49 | | - resource_size_t baseaddr; |
|---|
| 50 | | - size_t size; |
|---|
| 51 | | - spinlock_t lock; |
|---|
| 52 | | - struct work_struct work; |
|---|
| 53 | 47 | int irq_num; |
|---|
| 54 | 48 | bool bcd_mode; |
|---|
| 55 | 49 | bool no_irq; |
|---|
| 56 | | - bool uie_unsupported; |
|---|
| 57 | | - bool alloc_io_resources; |
|---|
| 58 | 50 | u8 (*read)(struct ds1685_priv *, int); |
|---|
| 59 | 51 | void (*write)(struct ds1685_priv *, int, u8); |
|---|
| 60 | 52 | void (*prepare_poweroff)(void); |
|---|
| .. | .. |
|---|
| 79 | 71 | const bool bcd_mode; |
|---|
| 80 | 72 | const bool no_irq; |
|---|
| 81 | 73 | 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); |
|---|
| 85 | 74 | void (*plat_prepare_poweroff)(void); |
|---|
| 86 | 75 | void (*plat_wake_alarm)(void); |
|---|
| 87 | 76 | void (*plat_post_ram_clear)(void); |
|---|
| 77 | + enum { |
|---|
| 78 | + ds1685_reg_direct, |
|---|
| 79 | + ds1685_reg_indirect |
|---|
| 80 | + } access_type; |
|---|
| 88 | 81 | }; |
|---|
| 89 | 82 | |
|---|
| 90 | 83 | |
|---|