diff options
author | Thomas Bogendoerfer <tbogendoerfer@suse.de> | 2019-10-14 23:46:21 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-10-16 10:39:00 +0200 |
commit | 299b610117a4145dfe15963f0ea037ab319ce531 (patch) | |
tree | 1fb468c08bd358b879ca13210da5ebcf60d43bac /include/linux/rtc | |
parent | af818031f4637b0e8d106fcc9023f1c22c44e13a (diff) | |
download | talos-op-linux-299b610117a4145dfe15963f0ea037ab319ce531.tar.gz talos-op-linux-299b610117a4145dfe15963f0ea037ab319ce531.zip |
rtc: ds1685: add indirect access method and remove plat_read/plat_write
SGI Octane (IP30) doesn't have RTC register directly mapped into CPU
address space, but accesses RTC registers with an address and data
register. This is now supported by additional access functions, which
are selected by a new field in platform data. Removed plat_read/plat_write
since there is no user and their usage could introduce lifetime issue,
when functions are placed in different modules.
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Acked-by: Joshua Kinard <kumba@gentoo.org>
Reviewed-by: Joshua Kinard <kumba@gentoo.org>
Link: https://lore.kernel.org/r/20191014214621.25257-1-tbogendoerfer@suse.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'include/linux/rtc')
-rw-r--r-- | include/linux/rtc/ds1685.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/rtc/ds1685.h b/include/linux/rtc/ds1685.h index 101c7adc05a2..67ee9d20cc5a 100644 --- a/include/linux/rtc/ds1685.h +++ b/include/linux/rtc/ds1685.h @@ -42,6 +42,7 @@ struct ds1685_priv { struct rtc_device *dev; void __iomem *regs; + void __iomem *data; u32 regstep; int irq_num; bool bcd_mode; @@ -70,12 +71,13 @@ struct ds1685_rtc_platform_data { const bool bcd_mode; const bool no_irq; const bool uie_unsupported; - const bool alloc_io_resources; - u8 (*plat_read)(struct ds1685_priv *, int); - void (*plat_write)(struct ds1685_priv *, int, u8); void (*plat_prepare_poweroff)(void); void (*plat_wake_alarm)(void); void (*plat_post_ram_clear)(void); + enum { + ds1685_reg_direct, + ds1685_reg_indirect + } access_type; }; |