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

Commit 0bb3a155 authored by Laxminath Kasam's avatar Laxminath Kasam Committed by Gerrit - the friendly Code Review server
Browse files

asoc: wsa881x-analog: Disable MCLK if clk enabled state



In WSA analog driver, disable MCLK only if clock enabled.

Change-Id: I3a6aa42dc258e3c6ad1ceccdf74f0136338d79b2
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent 39e62ec4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015-2016, 2018-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2016, 2018-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
@@ -1027,6 +1028,7 @@ static int wsa881x_shutdown(struct wsa881x_pdata *pdata)
		return ret;
	}

	if (__clk_is_enabled(pdata->wsa_mclk))
		clk_disable_unprepare(pdata->wsa_mclk);

	ret = msm_cdc_pinctrl_select_sleep_state(pdata->wsa_clk_gpio_p);