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

Commit cbb6f02c authored by Ramprasad Katkam's avatar Ramprasad Katkam Committed by Meng Wang
Browse files

asoc: bolero: set bolero dev_up flag before macro notification



When UP notification is sent to macros, the macros can try
to do regcache sync for their regions. Set dev_up flag in bolero
before sending UP event to macros to enable register access.

Change-Id: Ic04cfef121e9be55e91bf8927da26f9ec249338e
Signed-off-by: default avatarRamprasad Katkam <katkam@codeaurora.org>
parent bde36b8f
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 */
 */


#include <linux/of_platform.h>
#include <linux/of_platform.h>
@@ -615,6 +615,9 @@ static int bolero_ssr_enable(struct device *dev, void *data)
			BOLERO_MACRO_EVT_WAIT_VA_CLK_RESET, 0x0);
			BOLERO_MACRO_EVT_WAIT_VA_CLK_RESET, 0x0);


	regcache_cache_only(priv->regmap, false);
	regcache_cache_only(priv->regmap, false);
	mutex_lock(&priv->clk_lock);
	priv->dev_up = true;
	mutex_unlock(&priv->clk_lock);
	/* call ssr event for supported macros */
	/* call ssr event for supported macros */
	for (macro_idx = START_MACRO; macro_idx < MAX_MACRO; macro_idx++) {
	for (macro_idx = START_MACRO; macro_idx < MAX_MACRO; macro_idx++) {
		if (!priv->macro_params[macro_idx].event_handler)
		if (!priv->macro_params[macro_idx].event_handler)
@@ -623,9 +626,6 @@ static int bolero_ssr_enable(struct device *dev, void *data)
			priv->component,
			priv->component,
			BOLERO_MACRO_EVT_SSR_UP, 0x0);
			BOLERO_MACRO_EVT_SSR_UP, 0x0);
	}
	}
	mutex_lock(&priv->clk_lock);
	priv->dev_up = true;
	mutex_unlock(&priv->clk_lock);
	bolero_cdc_notifier_call(priv, BOLERO_WCD_EVT_SSR_UP);
	bolero_cdc_notifier_call(priv, BOLERO_WCD_EVT_SSR_UP);
	return 0;
	return 0;
}
}