All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: lrg@ti.com, sameo@linux.intel.com, vbyravarasu@nvidia.com,
	axel.lin@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] regulator; tps65090: Register all regulators in single probe call
Date: Tue, 9 Oct 2012 15:22:34 +0900	[thread overview]
Message-ID: <20121009062231.GI8237@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1349536671-31714-4-git-send-email-ldewangan@nvidia.com>

On Sat, Oct 06, 2012 at 08:47:48PM +0530, Laxman Dewangan wrote:
> MFD drier registers the regulator driver once per device and
> hence it is require to register all regulators in single probe
> call.
> Following are details of changes done to achieve this:
> - Add max regulator and register all regulators even if there
>   is no regulator init data from platform.
> - Convert regulator init data to pointer type in platform data.
> - Add input supply name in regulator desc to provide input supply.
> - Separate desc information from driver information.

Shouldn't this be the first commit in the series?  Also...

> +	for (num = 0; num < TPS65090_REGULATOR_MAX; num++) {
> +		tps_pdata = tps65090_pdata->reg_pdata[num];

>  struct tps65090_regulator_platform_data {
> -	struct regulator_init_data regulator;
> +	struct regulator_init_data *reg_init_data;
>  };

I can't help but think that if we're going to require the full array
here the array should just be declared immediately - perhaps as an array
of pointers:

	struct regulator_init_data *reg_init_data[TPS65090_REGULATOR_MAX];

to allow things to be missed out.  Otherwise we're likely to crash if
the user misses a regulator or something.

  reply	other threads:[~2012-10-09  6:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-06 15:17 [PATCH 0/5] regulator: tps65090: fix regulator registration and add external control support Laxman Dewangan
2012-10-06 15:17 ` [PATCH] regulator: TPS51632: Add tps51632 regulator driver Laxman Dewangan
2012-10-09  6:14   ` Mark Brown
2012-10-09  6:07     ` Laxman Dewangan
2012-10-06 15:17 ` [PATCH 1/5] regulator: tps65090: rename driver name and regulator name Laxman Dewangan
2012-10-08  5:53   ` Venu Byravarasu
2012-10-08  6:00     ` Laxman Dewangan
2012-10-06 15:17 ` [PATCH 2/5] regulator; tps65090: Register all regulators in single probe call Laxman Dewangan
2012-10-09  6:22   ` Mark Brown [this message]
2012-10-09  6:16     ` Laxman Dewangan
2012-10-06 15:17 ` [PATCH 3/5] regulator: tps65090: Add support for LDO regulators Laxman Dewangan
2012-10-06 15:17 ` [PATCH 4/5] regulator: tps65090: Add voltage out level in platform data Laxman Dewangan
2012-10-09  6:26   ` Mark Brown
2012-10-06 15:17 ` [PATCH 5/5] regulator: tps65090: add external control support for DCDC Laxman Dewangan
2012-10-08  5:45   ` Venu Byravarasu
2012-10-08  5:58     ` Laxman Dewangan
2012-10-09  6:28   ` Mark Brown
2012-10-09  6:21     ` Laxman Dewangan
2012-10-09  7:04       ` Mark Brown

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=20121009062231.GI8237@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=axel.lin@gmail.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=sameo@linux.intel.com \
    --cc=vbyravarasu@nvidia.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.