Skip to content

Commit 9211402

Browse files
rfvirgilbroonie
authored andcommitted
regulator: arizona-micsupp: Don't use a common regulator name
The Arizona and Madera codecs all have a datasheet name of "MICVDD" for the regulator output. But future codecs with a regulator that can be controlled by this driver have different naming convention for the output of the regulator. Move the setting of the supply name from arizona_micsupp_common_init() to arizona_micsupp_probe() and madera_micsupp_probe(). Signed-off-by: Richard Fitzgerald <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 2da34b2 commit 9211402

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/regulator/arizona-micsupp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ static int arizona_micsupp_common_init(struct platform_device *pdev,
262262
INIT_WORK(&micsupp->check_cp_work, arizona_micsupp_check_cp);
263263

264264
micsupp->init_data.consumer_supplies = &micsupp->supply;
265-
micsupp->supply.supply = "MICVDD";
266265
micsupp->supply.dev_name = dev_name(micsupp->dev);
267266
micsupp->desc = desc;
268267

@@ -319,6 +318,8 @@ static int arizona_micsupp_probe(struct platform_device *pdev)
319318
micsupp->dapm = &arizona->dapm;
320319
micsupp->dev = arizona->dev;
321320

321+
micsupp->supply.supply = "MICVDD";
322+
322323
/*
323324
* Since the chip usually supplies itself we provide some
324325
* default init_data for it. This will be overridden with
@@ -354,6 +355,8 @@ static int madera_micsupp_probe(struct platform_device *pdev)
354355
micsupp->dev = madera->dev;
355356
micsupp->init_data = arizona_micsupp_ext_default;
356357

358+
micsupp->supply.supply = "MICVDD";
359+
357360
return arizona_micsupp_common_init(pdev, micsupp, &madera_micsupp,
358361
&madera->pdata.micvdd);
359362
}

0 commit comments

Comments
 (0)