[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221109165331.29332-8-rf@opensource.cirrus.com>
Date: Wed, 9 Nov 2022 16:53:26 +0000
From: Richard Fitzgerald <rf@...nsource.cirrus.com>
To: <lee@...nel.org>, <robh+dt@...nel.org>,
<krzysztof.kozlowski+dt@...aro.org>, <linus.walleij@...aro.org>,
<broonie@...nel.org>, <tglx@...utronix.de>, <maz@...nel.org>
CC: <alsa-devel@...a-project.org>, <devicetree@...r.kernel.org>,
<linux-gpio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<patches@...nsource.cirrus.com>,
Richard Fitzgerald <rf@...nsource.cirrus.com>
Subject: [PATCH 07/12] 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 <rf@...nsource.cirrus.com>
---
drivers/regulator/arizona-micsupp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/arizona-micsupp.c b/drivers/regulator/arizona-micsupp.c
index 21c36972a8e9..596ecd8041cd 100644
--- a/drivers/regulator/arizona-micsupp.c
+++ b/drivers/regulator/arizona-micsupp.c
@@ -262,7 +262,6 @@ static int arizona_micsupp_common_init(struct platform_device *pdev,
INIT_WORK(&micsupp->check_cp_work, arizona_micsupp_check_cp);
micsupp->init_data.consumer_supplies = &micsupp->supply;
- micsupp->supply.supply = "MICVDD";
micsupp->supply.dev_name = dev_name(micsupp->dev);
micsupp->desc = desc;
@@ -319,6 +318,8 @@ static int arizona_micsupp_probe(struct platform_device *pdev)
micsupp->dapm = &arizona->dapm;
micsupp->dev = arizona->dev;
+ micsupp->supply.supply = "MICVDD";
+
/*
* Since the chip usually supplies itself we provide some
* default init_data for it. This will be overridden with
@@ -354,6 +355,8 @@ static int madera_micsupp_probe(struct platform_device *pdev)
micsupp->dev = madera->dev;
micsupp->init_data = arizona_micsupp_ext_default;
+ micsupp->supply.supply = "MICVDD";
+
return arizona_micsupp_common_init(pdev, micsupp, &madera_micsupp,
&madera->pdata.micvdd);
}
--
2.30.2
Powered by blists - more mailing lists