linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: twl-core: export twl_get_regmap
@ 2016-11-12 11:38 Nicolae Rosia
  2016-11-18 18:55 ` Lee Jones
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolae Rosia @ 2016-11-12 11:38 UTC (permalink / raw)
  To: linux-arm-kernel

We want to get rid of global twl_i2c_{write/read}.
As a first step, allow clients to get the regmap and write directly

Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com>
---
 drivers/mfd/twl-core.c  | 3 ++-
 include/linux/i2c/twl.h | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index c64615d..49e6a4b 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -421,7 +421,7 @@ EXPORT_SYMBOL(twl_rev);
  *
  * Returns the regmap pointer or NULL in case of failure.
  */
-static struct regmap *twl_get_regmap(u8 mod_no)
+struct regmap *twl_get_regmap(u8 mod_no)
 {
 	int sid;
 	struct twl_client *twl;
@@ -440,6 +440,7 @@ static struct regmap *twl_get_regmap(u8 mod_no)
 
 	return twl->regmap;
 }
+EXPORT_SYMBOL(twl_get_regmap);
 
 /**
  * twl_i2c_write - Writes a n bit register in TWL4030/TWL5030/TWL60X0
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 9ad7828..4c43cdb3 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -174,6 +174,8 @@ static inline int twl_class_is_ ##class(void)	\
 TWL_CLASS_IS(4030, TWL4030_CLASS_ID)
 TWL_CLASS_IS(6030, TWL6030_CLASS_ID)
 
+struct regmap *twl_get_regmap(u8 mod_no);
+
 /* Set the regcache bypass for the regmap associated with the nodule */
 int twl_set_regcache_bypass(u8 mod_no, bool enable);
 
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-11-26 18:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-12 11:38 [PATCH] mfd: twl-core: export twl_get_regmap Nicolae Rosia
2016-11-18 18:55 ` Lee Jones
2016-11-20 12:54   ` Nicolae Rosia
2016-11-21  9:23     ` Lee Jones
2016-11-21  9:31       ` Russell King - ARM Linux
2016-11-21 10:03         ` Nicolae Rosia
2016-11-21 13:37           ` Russell King - ARM Linux
2016-11-23 11:12             ` Russell King - ARM Linux
2016-11-23 11:22               ` Rosia, Nicolae
2016-11-26 18:23                 ` Nicolae Rosia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).