Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76ccdc74 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: wcd9xxx: Correct handling of RC Oscillator"

parents 7452518e 9048adf0
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -561,8 +561,15 @@ void wcd9xxx_resmgr_put_clk_block(struct wcd9xxx_resmgr *resmgr,
		if (--resmgr->clk_rco_users == 0 &&
		    resmgr->clk_type == WCD9XXX_CLK_RCO) {
			wcd9xxx_disable_clock_block(resmgr);
			snd_soc_update_bits(resmgr->codec,
					WCD9XXX_A_RC_OSC_FREQ, 0x80, 0x00);
			/* if RCO is enabled, switch from it */
			if (snd_soc_read(resmgr->codec, WCD9XXX_A_RC_OSC_FREQ)
					& 0x80) {
				if (resmgr->codec_type !=
						WCD9XXX_CDC_TYPE_HELICON)
					snd_soc_write(resmgr->codec,
						WCD9XXX_A_CLK_BUFF_EN2, 0x02);
				wcd9xxx_resmgr_enable_config_mode(resmgr, 0);
			}
			resmgr->clk_type = WCD9XXX_CLK_OFF;
		}
		break;