October 2017
Intermediate to advanced
586 pages
14h 8m
English
In order to extract init data passed from within the DT, there is a new data type that we need to introduce, struct of_regulator_match, which looks like this:
struct of_regulator_match {
const char *name;
void *driver_data;
struct regulator_init_data *init_data;
struct device_node *of_node;
const struct regulator_desc *desc;
};
Prior to making any use of this data structure, we need to figure out how to achieve the regulator binding of a DT file.
Every PMIC node in the DT should have a sub-node named regulators, in which we have to declare each of the regulators this PMIC provides as a dedicated sub-node. In other words, every regulator of a PMIC is defined as a sub-node of the regulators node, which in turn ...