Skip to content

Commit bcf3402

Browse files
broonieLiam Girdwood
authored andcommitted
regulator: Allow init_data to be passed to fixed voltage regulators
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
1 parent 93c62da commit bcf3402

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎drivers/regulator/fixed.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ static int regulator_fixed_voltage_probe(struct platform_device *pdev)
7373

7474
drvdata->microvolts = config->microvolts;
7575

76-
drvdata->dev = regulator_register(&drvdata->desc, drvdata);
76+
drvdata->dev = regulator_register(&drvdata->desc, &pdev->dev,
77+
config->init_data, drvdata);
7778
if (IS_ERR(drvdata->dev)) {
7879
ret = PTR_ERR(drvdata->dev);
7980
goto err_name;

‎include/linux/regulator/fixed.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@
1414
#ifndef __REGULATOR_FIXED_H
1515
#define __REGULATOR_FIXED_H
1616

17+
struct regulator_init_data;
18+
1719
struct fixed_voltage_config {
1820
const char *supply_name;
1921
int microvolts;
22+
struct regulator_init_data *init_data;
2023
};
2124

2225
#endif

0 commit comments

Comments
 (0)