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: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
f34687bd3a
commit
cc2aada378
@@ -1,9 +1,10 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// 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.h>
|
||||||
|
#include <linux/clk-provider.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
@@ -1032,7 +1033,8 @@ static int wsa881x_shutdown(struct wsa881x_pdata *pdata)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
clk_disable_unprepare(pdata->wsa_mclk);
|
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);
|
ret = msm_cdc_pinctrl_select_sleep_state(pdata->wsa_clk_gpio_p);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
Reference in New Issue
Block a user