Browse Source

asoc: wcd937x: Clear Buck disable flag in PMU even if already up

Buck disable flag, which is used to indicate if suspend can disable
the buck, is not cleared during powerup if it is already enabled.
This causes suspend to disable buck even during active usecase.
Clear the buck disable flag when returning due to already enable.

Change-Id: I5118b66492dff27965a587e1bc6b916d5c26b9fb
Signed-off-by: Ramprasad Katkam <[email protected]>
Ramprasad Katkam 6 years ago
parent
commit
b7fc921d89
1 changed files with 1 additions and 0 deletions
  1. 1 0
      asoc/codecs/wcd937x/wcd937x.c

+ 1 - 0
asoc/codecs/wcd937x/wcd937x.c

@@ -1629,6 +1629,7 @@ static int wcd937x_codec_enable_vdd_buck(struct snd_soc_dapm_widget *w,
 			dev_dbg(component->dev,
 				"%s: buck already in enabled state\n",
 				__func__);
+			clear_bit(ALLOW_BUCK_DISABLE, &wcd937x->status_mask);
 			return 0;
 		}
 		ret = msm_cdc_enable_ondemand_supply(wcd937x->dev,