[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dcf284c6-dee5-d726-7f8f-c4ff1be99ddb@collabora.com>
Date: Tue, 25 Oct 2022 12:06:23 +0200
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
To: Nícolas F. R. A. Prado
<nfraprado@...labora.com>, Mark Brown <broonie@...nel.org>
Cc: kernel@...labora.com, Derek Fang <derek.fang@...ltek.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Rob Herring <robh+dt@...nel.org>, alsa-devel@...a-project.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/4] ASoC: dt-bindings: realtek,rt5682s: Add AVDD and
MICVDD supplies
Il 25/10/22 00:00, Nícolas F. R. A. Prado ha scritto:
> The rt5682s codec can have two supplies: AVDD and MICVDD. They are
> already used by sc7180-trogdor-kingoftown.dtsi, so document them in the
> binding.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
>
I also don't like these uppercase supply names... I wonder if it's worth changing
the driver to get "avdd" *or* "AVDD" (so, if "avdd" fails -> backwards compat)...
...this way, we can change the devicetree to use the lowercase names without
breaking abi.
Of course, this commit would need to be changed to document only the lowercase
supply names.
Driver-wise, we have a rt5682s_supply_names array... we could do something like:
static const char *rt5682s_supply_names_legacy[RT5682S_NUM_SUPPLIES] = {
[RT5682S_SUPPLY_AVDD] = "AVDD",
[RT5682S_SUPPLY_MICVDD] = "MICVDD",
};
static const char *rt5682s_supply_names[RT5682S_NUM_SUPPLIES] = {
[RT5682S_SUPPLY_AVDD] = "avdd",
[RT5682S_SUPPLY_MICVDD] = "micvdd",
};
for (...) assign_supply_names;
ret = devm_regulator_bulk_get(...);
if (ret) {
for (...) assign_legacy_supply_names;
ret = devm_regulator_bulk_get(...)
if (ret)
return ret;
}
What do you think?
Cheers,
Angelo
Powered by blists - more mailing lists