All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	devicetree@vger.kernel.org,
	Peter De Schrijver <pdeschrijver@nvidia.com>,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH 5/7] mfd: twl4030-power: Add support for board specific configuration
Date: Wed, 21 May 2014 10:18:57 +0100	[thread overview]
Message-ID: <20140521091857.GD6679@lee--X1> (raw)
In-Reply-To: <20140521024552.GD17417@atomide.com>

On Tue, 20 May 2014, Tony Lindgren wrote:

> * Lee Jones <lee.jones@linaro.org> [140520 08:18]:
> > 
> > Ah, I forgot to Ack this last time, didn't I?
> > 
> >   Acked-by: Lee Jones <lee.jones@linaro.org>
> 
> Yeah, here's this one updated with your ack.

Has the code changed at all, or are you just reposting with my Ack
applied?

> 8< ---------------------------
> From: Tony Lindgren <tony@atomide.com>
> Date: Tue, 20 May 2014 11:17:54 -0700
> Subject: [PATCH] mfd: twl4030-power: Add support for board specific configuration
> 
> With the recommended twl4030 configuration added, we can now add
> board specific changes as modifications to the recommended
> configuration.
> 
> Note that the data is private to this driver, and the data must
> always have a NULL resource in the sentinel.
> 
> Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> --- a/drivers/mfd/twl4030-power.c
> +++ b/drivers/mfd/twl4030-power.c
> @@ -567,13 +567,34 @@ twl4030_power_configure_scripts(const struct twl4030_power_data *pdata)
>  	return 0;
>  }
>  
> +static void twl4030_patch_rconfig(struct twl4030_resconfig *common,
> +				  struct twl4030_resconfig *board)
> +{
> +	while (common->resource) {
> +		struct twl4030_resconfig *b = board;
> +
> +		while (b->resource) {
> +			if (b->resource == common->resource) {
> +				*common = *b;
> +				break;
> +			}
> +			b++;
> +		}
> +		common++;
> +	}
> +}
> +
>  static int
>  twl4030_power_configure_resources(const struct twl4030_power_data *pdata)
>  {
>  	struct twl4030_resconfig *resconfig = pdata->resource_config;
> +	struct twl4030_resconfig *boardconf = pdata->board_config;
>  	int err;
>  
>  	if (resconfig) {
> +		if (boardconf)
> +			twl4030_patch_rconfig(resconfig, boardconf);
> +
>  		while (resconfig->resource) {
>  			err = twl4030_configure_resource(resconfig);
>  			if (err)
> --- a/include/linux/i2c/twl.h
> +++ b/include/linux/i2c/twl.h
> @@ -674,6 +674,7 @@ struct twl4030_power_data {
>  	struct twl4030_script **scripts;
>  	unsigned num;
>  	struct twl4030_resconfig *resource_config;
> +	struct twl4030_resconfig *board_config;
>  #define TWL4030_RESCONFIG_UNDEF	((u8)-1)
>  	bool use_poweroff;	/* Board is wired for TWL poweroff */
>  };

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/7] mfd: twl4030-power: Add support for board specific configuration
Date: Wed, 21 May 2014 10:18:57 +0100	[thread overview]
Message-ID: <20140521091857.GD6679@lee--X1> (raw)
In-Reply-To: <20140521024552.GD17417@atomide.com>

On Tue, 20 May 2014, Tony Lindgren wrote:

> * Lee Jones <lee.jones@linaro.org> [140520 08:18]:
> > 
> > Ah, I forgot to Ack this last time, didn't I?
> > 
> >   Acked-by: Lee Jones <lee.jones@linaro.org>
> 
> Yeah, here's this one updated with your ack.

Has the code changed at all, or are you just reposting with my Ack
applied?

> 8< ---------------------------
> From: Tony Lindgren <tony@atomide.com>
> Date: Tue, 20 May 2014 11:17:54 -0700
> Subject: [PATCH] mfd: twl4030-power: Add support for board specific configuration
> 
> With the recommended twl4030 configuration added, we can now add
> board specific changes as modifications to the recommended
> configuration.
> 
> Note that the data is private to this driver, and the data must
> always have a NULL resource in the sentinel.
> 
> Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> --- a/drivers/mfd/twl4030-power.c
> +++ b/drivers/mfd/twl4030-power.c
> @@ -567,13 +567,34 @@ twl4030_power_configure_scripts(const struct twl4030_power_data *pdata)
>  	return 0;
>  }
>  
> +static void twl4030_patch_rconfig(struct twl4030_resconfig *common,
> +				  struct twl4030_resconfig *board)
> +{
> +	while (common->resource) {
> +		struct twl4030_resconfig *b = board;
> +
> +		while (b->resource) {
> +			if (b->resource == common->resource) {
> +				*common = *b;
> +				break;
> +			}
> +			b++;
> +		}
> +		common++;
> +	}
> +}
> +
>  static int
>  twl4030_power_configure_resources(const struct twl4030_power_data *pdata)
>  {
>  	struct twl4030_resconfig *resconfig = pdata->resource_config;
> +	struct twl4030_resconfig *boardconf = pdata->board_config;
>  	int err;
>  
>  	if (resconfig) {
> +		if (boardconf)
> +			twl4030_patch_rconfig(resconfig, boardconf);
> +
>  		while (resconfig->resource) {
>  			err = twl4030_configure_resource(resconfig);
>  			if (err)
> --- a/include/linux/i2c/twl.h
> +++ b/include/linux/i2c/twl.h
> @@ -674,6 +674,7 @@ struct twl4030_power_data {
>  	struct twl4030_script **scripts;
>  	unsigned num;
>  	struct twl4030_resconfig *resource_config;
> +	struct twl4030_resconfig *board_config;
>  #define TWL4030_RESCONFIG_UNDEF	((u8)-1)
>  	bool use_poweroff;	/* Board is wired for TWL poweroff */
>  };

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

  reply	other threads:[~2014-05-21  9:19 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14  1:34 [PATCH v2 0/7] mfd: twl4030-power: Enable off-idle configuration when booted with device tree Tony Lindgren
2014-05-14  1:34 ` Tony Lindgren
2014-05-14  1:34 ` [PATCH 1/7] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier Tony Lindgren
2014-05-14  1:34   ` Tony Lindgren
2014-05-20 15:01   ` Lee Jones
2014-05-20 15:01     ` Lee Jones
2014-05-20 15:07     ` Tony Lindgren
2014-05-20 15:07       ` Tony Lindgren
2014-05-20 17:37       ` Lee Jones
2014-05-20 17:37         ` Lee Jones
2014-05-20 17:48         ` Tony Lindgren
2014-05-20 17:48           ` Tony Lindgren
2014-05-20 17:55           ` Lee Jones
2014-05-20 17:55             ` Lee Jones
2014-05-14  1:34 ` [PATCH 2/7] mfd: twl4030-power: Fix some defines for SW_EVENTS Tony Lindgren
2014-05-14  1:34   ` Tony Lindgren
2014-05-20 15:03   ` Lee Jones
2014-05-20 15:03     ` Lee Jones
2014-05-21  2:33     ` Tony Lindgren
2014-05-21  2:33       ` Tony Lindgren
2014-05-14  1:34 ` [PATCH 3/7] mfd: twl4030-power: Add generic reset configuration Tony Lindgren
2014-05-14  1:34   ` Tony Lindgren
2014-05-20 15:12   ` Lee Jones
2014-05-20 15:12     ` Lee Jones
2014-05-21  2:39     ` Tony Lindgren
2014-05-21  2:39       ` Tony Lindgren
2014-05-14  1:34 ` [PATCH 4/7] mfd: twl4030-power: Add recommended idle configuration Tony Lindgren
2014-05-14  1:34   ` Tony Lindgren
     [not found]   ` <1400031250-29542-5-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2014-05-20 15:14     ` Lee Jones
2014-05-20 15:14       ` Lee Jones
2014-05-21  2:44       ` Tony Lindgren
2014-05-21  2:44         ` Tony Lindgren
2014-05-14  1:34 ` [PATCH 5/7] mfd: twl4030-power: Add support for board specific configuration Tony Lindgren
2014-05-14  1:34   ` Tony Lindgren
2014-05-20 15:17   ` Lee Jones
2014-05-20 15:17     ` Lee Jones
2014-05-21  2:45     ` Tony Lindgren
2014-05-21  2:45       ` Tony Lindgren
2014-05-21  9:18       ` Lee Jones [this message]
2014-05-21  9:18         ` Lee Jones
2014-05-21 14:41         ` Tony Lindgren
2014-05-21 14:41           ` Tony Lindgren
2014-05-21 15:06           ` Lee Jones
2014-05-21 15:06             ` Lee Jones
2014-05-14  1:34 ` [PATCH 6/7] mfd: twl4030power: Add a configuration to turn off oscillator during off-idle Tony Lindgren
2014-05-14  1:34   ` Tony Lindgren
2014-05-14  1:34 ` [PATCH 7/7] ARM: dts: Enable twl4030 off-idle configuration for selected omaps Tony Lindgren
2014-05-14  1:34   ` Tony Lindgren
2014-05-21  9:23 ` [PATCH v2 0/7] mfd: twl4030-power: Enable off-idle configuration when booted with device tree Lee Jones
2014-05-21  9:23   ` Lee Jones
2014-05-21 14:49   ` Tony Lindgren
2014-05-21 14:49     ` Tony Lindgren
     [not found] ` <1400031250-29542-1-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2014-05-27 16:52   ` Lee Jones
2014-05-27 16:52     ` Lee Jones
2014-05-27 17:13     ` Tony Lindgren
2014-05-27 17:13       ` Tony Lindgren
2014-05-28  7:03       ` Lee Jones
2014-05-28  7:03         ` Lee Jones

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=20140521091857.GD6679@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pdeschrijver@nvidia.com \
    --cc=sameo@linux.intel.com \
    --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.