[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130417191944.GB19873@opensource.wolfsonmicro.com>
Date: Wed, 17 Apr 2013 20:19:45 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Anthony Olech <anthony.olech.opensource@...semi.com>
Cc: Samuel Ortiz <sameo@...ux.intel.com>,
Arnd Bergmann <arnd@...db.de>,
Mauro Carvalho Chehab <mchehab@...hat.com>,
Steven Toth <stoth@...nellabs.com>,
Michael Krufky <mkrufky@...nellabs.com>,
LKML <linux-kernel@...r.kernel.org>,
David Dajun Chen <david.chen@...semi.com>
Subject: Re: [NEW DRIVER V5 1/7] drivers/mfd: DA9058 MFD core driver
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists