linux/Documentation/power
Liam Girdwood a5766f11cf regulator: core - Rework machine API to remove string based functions.
This improves the machine level API in order to configure
regulator constraints and consumers as platform data and removes the
old string based API that required several calls to set up each regulator.

The intention is to create a struct regulator_init_data, populate
it's fields with constraints, consumers devices, etc and then register
the regulator device from board.c in the standard Linux way.

e.g. regulator LDO2 (supplying codec and sim) platform data.

/* regulator LDO2 consumer devices */
static struct regulator_consumer_supply ldo2_consumers[] = {
{
	.dev	= &platform_audio_device.dev,
	.supply	= "codec_avdd",
},
{
	.dev	= &platform_sim_device.dev,
	.supply	= "sim_vcc",
}
};

/* regulator LDO2 constraints  */
static struct regulator_init_data ldo2_data = {
	.constraints = {
		.min_uV = 3300000,
		.max_uV = 3300000,
		.valid_modes_mask = REGULATOR_MODE_NORMAL,
		.apply_uV = 1,
	},
	.num_consumer_supplies = ARRAY_SIZE(ldo2_consumers),
	.consumer_supplies = ldo2_consumers,
};

/* machine regulator devices with thier consumers and constraints */
static struct platform_device wm8350_regulator_devices[] = {
{
	.name = "wm8350-regulator",
	.id = WM8350_LDO_2,
	.dev = {
		.platform_data = &ldo2_data,
	},
},
};

Changes in detail:-

  o Removed all const char* regulator config functions in machine API.
  o Created new struct regulator_init_data to contain regulator
    machine configuration constraints and consmuers.
  o Changed set_supply(), set_machine_constraints(),
    set_consumer_device_supply() to remove their string identifier
    parameters. Also made them static and moved functions nearer top of
    core.c.
  o Removed no longer used inline func to_rdev()
  o Added regulator_get_init_drvdata() to retrieve init data.
  o Added struct device* as parameter to regulator_register().
  o Changed my email address.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2008-10-13 21:51:50 +01:00
..
regulator regulator: core - Rework machine API to remove string based functions. 2008-10-13 21:51:50 +01:00
00-INDEX pm: remove obsolete piece of PM documentation 2008-07-24 10:47:23 -07:00
apm-acpi.txt pm: remove obsolete piece of PM documentation 2008-07-24 10:47:23 -07:00
basic-pm-debugging.txt PM: Suspend/hibernation debug documentation update (rev. 2) 2008-02-01 18:30:54 -05:00
devices.txt PM: Handle device registrations during suspend/resume 2008-04-19 19:10:24 -07:00
drivers-testing.txt PM: Suspend/hibernation debug documentation update (rev. 2) 2008-02-01 18:30:54 -05:00
freezing-of-tasks.txt freezer: do not send signals to kernel threads 2007-10-18 14:37:19 -07:00
interface.txt PM: Rename struct pm_ops and related things 2007-10-18 14:37:18 -07:00
notifiers.txt Hibernation: Add PM_RESTORE_PREPARE and PM_POST_RESTORE notifiers (rev. 2) 2008-02-01 18:30:53 -05:00
pci.txt PCI: remove useless pci driver method 2007-07-11 16:02:08 -07:00
pm_qos_interface.txt pm_qos: spelling fixes 2008-08-05 14:33:50 -07:00
power_supply_class.txt power_supply: add CHARGE_COUNTER property and olpc_battery support for it 2008-05-13 12:27:11 +04:00
s2ram.txt [PATCH] s2ram debugging documentation 2006-12-07 08:39:28 -08:00
states.txt power management: remove firmware disk mode 2007-04-30 16:40:40 -07:00
swsusp-and-swap-files.txt typo fixes 2007-10-20 01:34:40 +02:00
swsusp-dmcrypt.txt [PATCH] swsusup with dm-crypt mini howto 2005-09-05 00:06:17 -07:00
swsusp.txt PM: documentation cleanups 2008-02-07 01:27:17 -05:00
tricks.txt Fix typos in Documentation/: 'S' 2006-10-03 22:55:17 +02:00
userland-swsusp.txt Hibernation: Introduce exportable suspend ioctls header (rev. 2) 2008-02-01 18:30:53 -05:00
video_extension.txt [PATCH] acpi: fix video docs 2005-06-25 16:24:32 -07:00
video.txt Fix typos in Documentation/: 'N'-'P' 2006-10-03 22:52:05 +02:00