From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Anthony Olech <anthony.olech.opensource@diasemi.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
Arnd Bergmann <arnd@arndb.de>,
Mauro Carvalho Chehab <mchehab@redhat.com>,
Steven Toth <stoth@kernellabs.com>,
Michael Krufky <mkrufky@kernellabs.com>,
LKML <linux-kernel@vger.kernel.org>,
David Dajun Chen <david.chen@diasemi.com>
Subject: Re: [NEW DRIVER V5 1/7] drivers/mfd: DA9058 MFD core driver
Date: Wed, 17 Apr 2013 20:19:45 +0100 [thread overview]
Message-ID: <20130417191944.GB19873@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <201304171650.r3HGo6YZ023894@latitude>
On Wed, Apr 17, 2013 at 05:33:33PM +0100, Anthony Olech wrote:
> +static struct regulator_consumer_supply platform_vddarm_consumers[] = {
> + {.supply = "vcc",}
> +};
> +
This looks very system specific and should be done by the system
integration for the board not the MFD.
> +static struct da9058_regulator_pdata buck1_pdata = {
> + .regulator_name = "DA9058_BUCK1",
> + .regulator_id = DA9058_BUCK_1,
> + .min_uv = DA9058_BUCK12_VOLT_LOWER * 1000,
> + .max_uv = DA9058_BUCK12_VOLT_UPPER * 1000,
> + .control_voltage_step = DA9058_BUCK_VOLT_STEP * 1000,
> + .control_register = DA9058_BUCK1_REG,
> + .control_step_mask = DA9058_MAX_VSEL,
> + .control_enable_mask = DA9058_BUCK_LDO_EN,
> + .ramp_register = DA9058_SUPPLY_REG,
> + .ramp_enable_mask = DA9058_SUPPLY_VBUCK1GO,
> + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE |
> + REGULATOR_CHANGE_STATUS,
> + .valid_modes_mask = REGULATOR_MODE_NORMAL,
> + .boot_on = 1,
> + .num_consumer_supplies = ARRAY_SIZE(platform_vddarm_consumers),
> + .consumer_supplies = platform_vddarm_consumers,
> +};
The regulators might be used for some totally different purpose on
another system, and the configuration may be different even if the
purpose is the same. The above also doesn't make much sense, you allow
changing modes but only support one mode.
You need to split out the regulator_init_data and let the board set it
up.
prev parent reply other threads:[~2013-04-17 19:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-17 16:33 [NEW DRIVER V5 1/7] drivers/mfd: DA9058 MFD core driver Anthony Olech
2013-04-17 19:19 ` Mark Brown [this message]
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=20130417191944.GB19873@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=anthony.olech.opensource@diasemi.com \
--cc=arnd@arndb.de \
--cc=david.chen@diasemi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=mkrufky@kernellabs.com \
--cc=sameo@linux.intel.com \
--cc=stoth@kernellabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox