diff options
Diffstat (limited to 'include/linux/regulator/driver.h')
| -rw-r--r-- | include/linux/regulator/driver.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 5f1e9ca47417..d4ad5b5a02bb 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | struct regmap; | 22 | struct regmap; |
| 23 | struct regulator_dev; | 23 | struct regulator_dev; |
| 24 | struct regulator_config; | ||
| 24 | struct regulator_init_data; | 25 | struct regulator_init_data; |
| 25 | struct regulator_enable_gpio; | 26 | struct regulator_enable_gpio; |
| 26 | 27 | ||
| @@ -205,6 +206,15 @@ enum regulator_type { | |||
| 205 | * @supply_name: Identifying the regulator supply | 206 | * @supply_name: Identifying the regulator supply |
| 206 | * @of_match: Name used to identify regulator in DT. | 207 | * @of_match: Name used to identify regulator in DT. |
| 207 | * @regulators_node: Name of node containing regulator definitions in DT. | 208 | * @regulators_node: Name of node containing regulator definitions in DT. |
| 209 | * @of_parse_cb: Optional callback called only if of_match is present. | ||
| 210 | * Will be called for each regulator parsed from DT, during | ||
| 211 | * init_data parsing. | ||
| 212 | * The regulator_config passed as argument to the callback will | ||
| 213 | * be a copy of config passed to regulator_register, valid only | ||
| 214 | * for this particular call. Callback may freely change the | ||
| 215 | * config but it cannot store it for later usage. | ||
| 216 | * Callback should return 0 on success or negative ERRNO | ||
| 217 | * indicating failure. | ||
| 208 | * @id: Numerical identifier for the regulator. | 218 | * @id: Numerical identifier for the regulator. |
| 209 | * @ops: Regulator operations table. | 219 | * @ops: Regulator operations table. |
| 210 | * @irq: Interrupt number for the regulator. | 220 | * @irq: Interrupt number for the regulator. |
| @@ -251,6 +261,9 @@ struct regulator_desc { | |||
| 251 | const char *supply_name; | 261 | const char *supply_name; |
| 252 | const char *of_match; | 262 | const char *of_match; |
| 253 | const char *regulators_node; | 263 | const char *regulators_node; |
| 264 | int (*of_parse_cb)(struct device_node *, | ||
| 265 | const struct regulator_desc *, | ||
| 266 | struct regulator_config *); | ||
| 254 | int id; | 267 | int id; |
| 255 | bool continuous_voltage_range; | 268 | bool continuous_voltage_range; |
| 256 | unsigned n_voltages; | 269 | unsigned n_voltages; |
