Skip to contentSkip to conversation

ARM: prima2: move to use REGMAP APIs for rtciobrg

PATCH Superseded Barry Song 1 participant 1 message Mar 25, 2015

Subsystems (3)
lore
Share & tools
lore

Barry Song

author
#0 lore raw

PATCH 1/1 ARM: prima2: move to use REGMAP APIs for rtciobrg

From: Guo Zeng <[email protected]>

all devices behind rtciobrg needs a special way to access. currently they are using a platform-specific API.
this patch moves to REGMAP, then clients can use regmap APIs to read/write. for the moment, old APIs are still kept, once all clients move to regmap, old APIs will be dropped.

this patch also does minor clean for comments, authors statement.

---
 arch/arm/mach-prima2/Kconfig         |  1 +
 arch/arm/mach-prima2/rtciobrg.c      | 48 +++++++++++++++++++++++++++++++++---
 include/linux/rtc/sirfsoc_rtciobrg.h |  4 +++
 3 files changed, 50 insertions(+), 3 deletions(-)
arch/arm/mach-prima2/Kconfig +1 -0
index e03d8b5..9ab8932 100644
@@ -4,6 +4,7 @@ menuconfig ARCH_SIRF
 	select ARCH_REQUIRE_GPIOLIB
 	select GENERIC_IRQ_CHIP
 	select NO_IOPORT_MAP
+	select REGMAP
 	select PINCTRL
 	select PINCTRL_SIRF
 	help
arch/arm/mach-prima2/rtciobrg.c +45 -3

81 lines not on this page · raw message

include/linux/rtc/sirfsoc_rtciobrg.h +4 -0
index 2c92e1c..aefd997 100644
@@ -9,10 +9,14 @@
 #ifndef _SIRFSOC_RTC_IOBRG_H_
 #define _SIRFSOC_RTC_IOBRG_H_
 
+struct regmap_config;
+
 extern void sirfsoc_rtc_iobrg_besyncing(void);
 
 extern u32 sirfsoc_rtc_iobrg_readl(u32 addr);
 
 extern void sirfsoc_rtc_iobrg_writel(u32 val, u32 addr);
+struct regmap *devm_regmap_init_iobg(struct device *dev,
+				    const struct regmap_config *config);
 
 #endif
Signature · 1 line
1.9.1