mbox series

[0/8] Adjust usage of rt5682(s) power supply properties

Message ID 20221028205540.3197304-1-nfraprado@collabora.com
Headers show
Series Adjust usage of rt5682(s) power supply properties | expand

Message

Nícolas F. R. A. Prado Oct. 28, 2022, 8:55 p.m. UTC
This series sets straight the usage of power supply properties for the
rt5682 and rt5682s audio codecs.

These properties were already being used by sc7180-trogdor.dtsi (and
derived DTs like sc7180-trogdor-kingoftown.dtsi).

We start by documenting the power supplies that are already in use and
then add few others that were missing to the bindings.

Then we update the drivers to also support the new supplies.

Finally we update the trogdor DTs so they have the newly added but
required supplies and remove a superfluous one that was causing
warnings.


Nícolas F. R. A. Prado (8):
  ASoC: dt-bindings: realtek,rt5682s: Add AVDD and MICVDD supplies
  ASoC: dt-bindings: realtek,rt5682s: Add dbvdd and ldo1-in supplies
  ASoC: dt-bindings: rt5682: Add AVDD, MICVDD and VBAT supplies
  ASoC: dt-bindings: rt5682: Add dbvdd and ldo1-in supplies
  ASoC: rt5682s: Support dbvdd and ldo1-in supplies
  ASoC: rt5682: Support dbvdd and ldo1-in supplies
  arm64: dts: qcom: sc7180-trogdor: Add missing supplies for rt5682
  arm64: dts: qcom: sc7180-trogdor: Remove VBAT supply from rt5682s

 .../bindings/sound/realtek,rt5682s.yaml       | 23 +++++++++++++++++++
 .../devicetree/bindings/sound/rt5682.txt      | 20 ++++++++++++++++
 .../dts/qcom/sc7180-trogdor-kingoftown.dtsi   |  1 +
 ...0-trogdor-wormdingler-rev1-boe-rt5682s.dts |  1 +
 ...0-trogdor-wormdingler-rev1-inx-rt5682s.dts |  1 +
 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi  |  2 ++
 sound/soc/codecs/rt5682.c                     |  2 ++
 sound/soc/codecs/rt5682.h                     |  2 +-
 sound/soc/codecs/rt5682s.c                    | 22 ++++++++++++++++++
 sound/soc/codecs/rt5682s.h                    |  2 ++
 10 files changed, 75 insertions(+), 1 deletion(-)

Comments

Mark Brown Oct. 31, 2022, 9:54 p.m. UTC | #1
On Mon, Oct 31, 2022 at 03:38:10PM -0400, Nícolas F. R. A. Prado wrote:

> We could have both if we converted the existing ones to lowercase first, but as
> I mentioned in [1] this requires using devm_regulator_get_optional() before
> falling back, which seemed like an abuse of that API and to unnecessarily
> complicate the code.

Yeah, it's definitely not what the ABI is for and probably more trouble
than it's worth.  We *could* probably write some helpers that handle
legacy supply names to the regulator core code if someone really wanted
to retire old names, that way the complication would be shared between
users which seems more managable but someone would still need the time
and enthusiasm to write the code.
Krzysztof Kozlowski Nov. 3, 2022, 10:26 p.m. UTC | #2
On 28/10/2022 16:55, Nícolas F. R. A. Prado wrote:
> The rt5682 codec has two additional power supply pins, DBVDD and
> LDO1_IN, that aren't currently described in the binding. Add them.
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> ---

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof