Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
of_regulator.c File Reference
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>

Go to the source code of this file.

Functions

struct regulator_init_dataof_get_regulator_init_data (struct device *dev, struct device_node *node)
 
 EXPORT_SYMBOL_GPL (of_get_regulator_init_data)
 
int of_regulator_match (struct device *dev, struct device_node *node, struct of_regulator_match *matches, unsigned int num_matches)
 
 EXPORT_SYMBOL_GPL (of_regulator_match)
 

Function Documentation

EXPORT_SYMBOL_GPL ( of_get_regulator_init_data  )
EXPORT_SYMBOL_GPL ( of_regulator_match  )
struct regulator_init_data* of_get_regulator_init_data ( struct device dev,
struct device_node node 
)
read

of_get_regulator_init_data - extract regulator_init_data structure info : device requesting for regulator_init_data

Populates regulator_init_data structure by extracting data from device tree node, returns a pointer to the populated struture or NULL if memory alloc fails.

Definition at line 77 of file of_regulator.c.

int of_regulator_match ( struct device dev,
struct device_node node,
struct of_regulator_match matches,
unsigned int  num_matches 
)

of_regulator_match - extract multiple regulator init data from device tree. : device requesting the data : parent device node of the regulators : match table for the regulators : number of entries in match table

This function uses a match table specified by the regulator driver to parse regulator init data from the device tree. is expected to contain a set of child nodes, each providing the init data for one regulator. The data parsed from a child node will be matched to a regulator based on either the deprecated property regulator-compatible if present, or otherwise the child node's name. Note that the match table is modified in place.

Returns the number of matches found or a negative error code on failure.

Definition at line 111 of file of_regulator.c.