linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18"
@ 2020-11-20  3:06 Jiaxin Yu
  2020-11-20  3:06 ` [PATCH 1/2] ASoC: mediatek: " Jiaxin Yu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jiaxin Yu @ 2020-11-20  3:06 UTC (permalink / raw)
  To: broonie, tiwai, matthias.bgg, tzungbi, alsa-devel, robh+dt,
	linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: shane.chien, Trevor.Wu, Jiaxin Yu

This series fixed "LDO_VAUD18-supply" regulator register fail.
We can see the error log "mt6359-sound supply LDO_VAUD18 not found, using
dummy regulator" when register the DAPM widget "LDO_VAUD18"
Otherwise, the power can not be turned on correctly when recording.

Jiaxin Yu (2):
  ASoC: mediatek: mt6359: Fix regulator_dev_lookup() fails for id
    "LDO_VAUD18"
  dt-bindings: mediatek: mt6359: remove unused property for mt6359

 Documentation/devicetree/bindings/sound/mt6359.yaml | 9 ---------
 sound/soc/codecs/mt6359.c                           | 7 ++++---
 2 files changed, 4 insertions(+), 12 deletions(-)

-- 
2.18.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] ASoC: mediatek: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18"
  2020-11-20  3:06 [PATCH 0/2] ASoC: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18" Jiaxin Yu
@ 2020-11-20  3:06 ` Jiaxin Yu
  2020-11-20  3:06 ` [PATCH 2/2] dt-bindings: mediatek: mt6359: remove unused property for mt6359 Jiaxin Yu
  2020-11-20 21:35 ` [PATCH 0/2] ASoC: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18" Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Jiaxin Yu @ 2020-11-20  3:06 UTC (permalink / raw)
  To: broonie, tiwai, matthias.bgg, tzungbi, alsa-devel, robh+dt,
	linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: shane.chien, Trevor.Wu, Jiaxin Yu

Mt6359 platform device is instantiated by mfd_add_devices(). In the
case, dev->of_node is NULL so that always fails to get the regulator_dev.

Use regualator-name "vaud18" that in dts node instead of
"LDO_VAUD19-supply". So that we can get regulator_dev through
regulator_lookup_by_name() directly.

Fixes: 64a70744b778 ("ASoC: Fix vaud18 power leakage of mt6359")
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
---
 sound/soc/codecs/mt6359.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/mt6359.c b/sound/soc/codecs/mt6359.c
index d37dbd2b50c2..6de0d744fa9e 100644
--- a/sound/soc/codecs/mt6359.c
+++ b/sound/soc/codecs/mt6359.c
@@ -1943,7 +1943,6 @@ static const struct snd_soc_dapm_widget mt6359_dapm_widgets[] = {
 	SND_SOC_DAPM_SUPPLY_S("CLK_BUF", SUPPLY_SEQ_CLK_BUF,
 			      MT6359_DCXO_CW12,
 			      RG_XO_AUDIO_EN_M_SFT, 0, NULL, 0),
-	SND_SOC_DAPM_REGULATOR_SUPPLY("LDO_VAUD18", 0, 0),
 	SND_SOC_DAPM_SUPPLY_S("AUDGLB", SUPPLY_SEQ_AUD_GLB,
 			      MT6359_AUDDEC_ANA_CON13,
 			      RG_AUDGLB_PWRDN_VA32_SFT, 1, NULL, 0),
@@ -1963,6 +1962,8 @@ static const struct snd_soc_dapm_widget mt6359_dapm_widgets[] = {
 	SND_SOC_DAPM_SUPPLY_S("AUDIF_CK", SUPPLY_SEQ_TOP_CK,
 			      MT6359_AUD_TOP_CKPDN_CON0,
 			      RG_AUDIF_CK_PDN_SFT, 1, NULL, 0),
+	SND_SOC_DAPM_REGULATOR_SUPPLY("vaud18", 0, 0),
+
 	/* Digital Clock */
 	SND_SOC_DAPM_SUPPLY_S("AUDIO_TOP_AFE_CTL", SUPPLY_SEQ_AUD_TOP_LAST,
 			      MT6359_AUDIO_TOP_CON0,
@@ -2312,7 +2313,7 @@ static int mt_dcc_clk_connect(struct snd_soc_dapm_widget *source,
 static const struct snd_soc_dapm_route mt6359_dapm_routes[] = {
 	/* Capture */
 	{"AIFTX_Supply", NULL, "CLK_BUF"},
-	{"AIFTX_Supply", NULL, "LDO_VAUD18"},
+	{"AIFTX_Supply", NULL, "vaud18"},
 	{"AIFTX_Supply", NULL, "AUDGLB"},
 	{"AIFTX_Supply", NULL, "CLKSQ Audio"},
 	{"AIFTX_Supply", NULL, "AUD_CK"},
@@ -2440,7 +2441,7 @@ static const struct snd_soc_dapm_route mt6359_dapm_routes[] = {
 
 	/* DL Supply */
 	{"DL Power Supply", NULL, "CLK_BUF"},
-	{"DL Power Supply", NULL, "LDO_VAUD18"},
+	{"DL Power Supply", NULL, "vaud18"},
 	{"DL Power Supply", NULL, "AUDGLB"},
 	{"DL Power Supply", NULL, "CLKSQ Audio"},
 	{"DL Power Supply", NULL, "AUDNCP_CK"},
-- 
2.18.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] dt-bindings: mediatek: mt6359: remove unused property for mt6359
  2020-11-20  3:06 [PATCH 0/2] ASoC: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18" Jiaxin Yu
  2020-11-20  3:06 ` [PATCH 1/2] ASoC: mediatek: " Jiaxin Yu
@ 2020-11-20  3:06 ` Jiaxin Yu
  2020-11-20 21:35 ` [PATCH 0/2] ASoC: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18" Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Jiaxin Yu @ 2020-11-20  3:06 UTC (permalink / raw)
  To: broonie, tiwai, matthias.bgg, tzungbi, alsa-devel, robh+dt,
	linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: shane.chien, Trevor.Wu, Jiaxin Yu

This reverts commit 08651373808e16b01d3b12207f52504c17b6774c.
("dt-bindings: mediatek: mt6359: Add new property for mt6359")

Remove unused property "LDO_VAUD18-supply" in mt6359codec.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
---
 Documentation/devicetree/bindings/sound/mt6359.yaml | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/mt6359.yaml b/Documentation/devicetree/bindings/sound/mt6359.yaml
index ef027c79032f..a54f466f769d 100644
--- a/Documentation/devicetree/bindings/sound/mt6359.yaml
+++ b/Documentation/devicetree/bindings/sound/mt6359.yaml
@@ -17,11 +17,6 @@ description: |
   Must be a child node of PMIC wrapper.
 
 properties:
-  LDO_VAUD18-supply:
-    $ref: /schemas/types.yaml#/definitions/phandle
-    description: |
-      Regulator of LDO VAUD18 at 1.8V.
-
   mediatek,dmic-mode:
     $ref: /schemas/types.yaml#/definitions/uint32
     description: |
@@ -54,15 +49,11 @@ properties:
     description: |
       Specifies the type of mic type connected to adc2
 
-required:
-  - LDO_VAUD18-supply
-
 additionalProperties: false
 
 examples:
   - |
     mt6359codec: mt6359codec {
-      LDO_VAUD18-supply = <&mt6359p_vaud18_reg>;
       mediatek,dmic-mode = <0>;
       mediatek,mic-type-0 = <2>;
     };
-- 
2.18.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] ASoC: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18"
  2020-11-20  3:06 [PATCH 0/2] ASoC: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18" Jiaxin Yu
  2020-11-20  3:06 ` [PATCH 1/2] ASoC: mediatek: " Jiaxin Yu
  2020-11-20  3:06 ` [PATCH 2/2] dt-bindings: mediatek: mt6359: remove unused property for mt6359 Jiaxin Yu
@ 2020-11-20 21:35 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2020-11-20 21:35 UTC (permalink / raw)
  To: tiwai, Jiaxin Yu, matthias.bgg, tzungbi, linux-arm-kernel,
	linux-kernel, linux-mediatek, robh+dt, alsa-devel
  Cc: Trevor.Wu, shane.chien

On Fri, 20 Nov 2020 11:06:11 +0800, Jiaxin Yu wrote:
> This series fixed "LDO_VAUD18-supply" regulator register fail.
> We can see the error log "mt6359-sound supply LDO_VAUD18 not found, using
> dummy regulator" when register the DAPM widget "LDO_VAUD18"
> Otherwise, the power can not be turned on correctly when recording.
> 
> Jiaxin Yu (2):
>   ASoC: mediatek: mt6359: Fix regulator_dev_lookup() fails for id
>     "LDO_VAUD18"
>   dt-bindings: mediatek: mt6359: remove unused property for mt6359
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: mediatek: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18"
      commit: 9546c76c73a1ee8b662b09f7308bcb63d2cd0d51
[2/2] ASoC: mt6359: remove unused property for mt6359
      commit: 6e85530496a496616ece6c444df23522afc81520

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-20 21:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20  3:06 [PATCH 0/2] ASoC: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18" Jiaxin Yu
2020-11-20  3:06 ` [PATCH 1/2] ASoC: mediatek: " Jiaxin Yu
2020-11-20  3:06 ` [PATCH 2/2] dt-bindings: mediatek: mt6359: remove unused property for mt6359 Jiaxin Yu
2020-11-20 21:35 ` [PATCH 0/2] ASoC: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18" Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).