All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Nicolae Rosia <Nicolae_Rosia@mentor.com>
Cc: Tony Lindgren <tony@atomide.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mfd: twl-core: export twl_get_regmap
Date: Fri, 18 Nov 2016 18:55:48 +0000	[thread overview]
Message-ID: <20161118185548.GA23246@dell.home> (raw)
In-Reply-To: <1478950693-13959-1-git-send-email-Nicolae_Rosia@mentor.com>

On Sat, 12 Nov 2016, Nicolae Rosia wrote:

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

What's stopping you from passing it through device data?

> 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);
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mfd: twl-core: export twl_get_regmap
Date: Fri, 18 Nov 2016 18:55:48 +0000	[thread overview]
Message-ID: <20161118185548.GA23246@dell.home> (raw)
In-Reply-To: <1478950693-13959-1-git-send-email-Nicolae_Rosia@mentor.com>

On Sat, 12 Nov 2016, Nicolae Rosia wrote:

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

What's stopping you from passing it through device data?

> 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);
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2016-11-18 18:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-12 11:38 [PATCH] mfd: twl-core: export twl_get_regmap Nicolae Rosia
2016-11-12 11:38 ` Nicolae Rosia
2016-11-18 18:55 ` Lee Jones [this message]
2016-11-18 18:55   ` Lee Jones
2016-11-20 12:54   ` Nicolae Rosia
2016-11-20 12:54     ` Nicolae Rosia
2016-11-21  9:23     ` Lee Jones
2016-11-21  9:23       ` Lee Jones
2016-11-21  9:31       ` Russell King - ARM Linux
2016-11-21  9:31         ` Russell King - ARM Linux
2016-11-21 10:03         ` Nicolae Rosia
2016-11-21 10:03           ` Nicolae Rosia
2016-11-21 13:37           ` Russell King - ARM Linux
2016-11-21 13:37             ` Russell King - ARM Linux
2016-11-23 11:12             ` Russell King - ARM Linux
2016-11-23 11:12               ` Russell King - ARM Linux
2016-11-23 11:22               ` Rosia, Nicolae
2016-11-23 11:22                 ` Rosia, Nicolae
2016-11-26 18:23                 ` Nicolae Rosia
2016-11-26 18:23                   ` Nicolae Rosia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161118185548.GA23246@dell.home \
    --to=lee.jones@linaro.org \
    --cc=Nicolae_Rosia@mentor.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.