linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Liam Girdwood <lrg@ti.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	linux-kernel@vger.kernel.org, Gyungoh Yoo <jack.yoo@maxim-ic.com>,
	Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH V2 3/3] regulator: add MAX8907 driver
Date: Thu, 9 Aug 2012 12:04:32 +0100	[thread overview]
Message-ID: <20120809110432.GO24328@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1344460727-6243-3-git-send-email-swarren@wwwdotorg.org>

On Wed, Aug 08, 2012 at 03:18:47PM -0600, Stephen Warren wrote:

> +static struct regulator_desc max8907_regulators[] = {
> +	REG_MBATT(),
> +	REG_LDO(SD1, "in-v1", MAX8907_REG_SDCTL1, 650000, 2225000, 25000),

> +#define MATCH(_name, _id) \
> +	{ \
> +		.name = #_name, \
> +		.driver_data = (void *)&max8907_regulators[MAX8907_##_id], \

If you're going to be doing this you should be doing:

	[MAX8907_##_id] = REG_MBATT()

and so on above to make sure the arrays agree with each other (this is
the same problem as we have with enums in ASoC drivers).

Otherwise this looks good.

  reply	other threads:[~2012-08-09 11:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08 21:18 [PATCH V2 1/3] regulator: add always set/clear masks to regulator_enable_regmap Stephen Warren
2012-08-08 21:18 ` [PATCH V2 2/3] regulator: add regulator_get_voltage_fixed helper op Stephen Warren
2012-08-09 10:59   ` Mark Brown
2012-08-09 15:22     ` Stephen Warren
2012-08-09 15:44       ` Mark Brown
2012-08-08 21:18 ` [PATCH V2 3/3] regulator: add MAX8907 driver Stephen Warren
2012-08-09 11:04   ` Mark Brown [this message]
2012-08-09 12:19   ` Laxman Dewangan
2012-08-09 12:38     ` Mark Brown
2012-08-09 12:27       ` Laxman Dewangan
2012-08-09 13:00         ` Mark Brown
2012-08-09 12:52           ` Laxman Dewangan
2012-08-09 10:09 ` [PATCH V2 1/3] regulator: add always set/clear masks to regulator_enable_regmap Mark Brown
2012-08-09 15:17   ` Stephen Warren

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=20120809110432.GO24328@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=jack.yoo@maxim-ic.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.org \
    /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 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).