regulator: helper routine to extract regulator_init_data

The helper routine is meant to be used by the regulator drivers
to extract the regulator_init_data structure from the data
that is passed from device tree.
'consumer_supplies' which is part of regulator_init_data is not extracted
as the regulator consumer mappings are passed through DT differently,
implemented in subsequent patches.
Similarly the regulator<-->parent/supply mapping is handled in
subsequent patches.

Also add documentation for regulator bindings to be used to pass
regulator_init_data struct information from device tree.

Some of the regulator properties which are linux and board specific,
are left out since its not clear if they can
be in someway embedded into the kernel or passed in from DT.
They will be revisited later.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Rajendra Nayak
2011-11-18 16:47:17 +05:30
committed by Mark Brown
parent cfcfc9eca2
commit 8f446e6fa1
4 changed files with 156 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
/*
* OpenFirmware regulator support routines
*
*/
#ifndef __LINUX_OF_REG_H
#define __LINUX_OF_REG_H
#if defined(CONFIG_OF)
extern struct regulator_init_data
*of_get_regulator_init_data(struct device *dev);
#else
static inline struct regulator_init_data
*of_get_regulator_init_data(struct device *dev)
{
return NULL;
}
#endif /* CONFIG_OF */
#endif /* __LINUX_OF_REG_H */