mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
asoc: codecs: update VA_MACRO core voting
Update entry for core voting in VA_MACRO. Change-Id: Iecc1035e04b9cd0f69e33e93643294ba879da63b Signed-off-by: Harshal Ahire <hahire@codeaurora.org>
This commit is contained in:
parent
f25ff5d47d
commit
021f8805a1
1 changed files with 22 additions and 0 deletions
|
|
@ -119,6 +119,7 @@ struct va_macro_swr_ctrl_platform_data {
|
|||
int (*read)(void *handle, int reg);
|
||||
int (*write)(void *handle, int reg, int val);
|
||||
int (*bulk_write)(void *handle, u32 *reg, u32 *val, size_t len);
|
||||
int (*core_vote)(void *handle, bool enable);
|
||||
int (*clk)(void *handle, bool enable);
|
||||
int (*handle_irq)(void *handle,
|
||||
irqreturn_t (*swrm_irq_handler)(int irq,
|
||||
|
|
@ -603,6 +604,26 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int va_macro_core_vote(void *handle, bool enable)
|
||||
{
|
||||
struct va_macro_priv *va_priv = (struct va_macro_priv *) handle;
|
||||
|
||||
if (va_priv == NULL) {
|
||||
pr_err("%s: va priv data is NULL\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (enable) {
|
||||
pm_runtime_get_sync(va_priv->dev);
|
||||
pm_runtime_put_autosuspend(va_priv->dev);
|
||||
pm_runtime_mark_last_busy(va_priv->dev);
|
||||
}
|
||||
|
||||
if (bolero_check_core_votes(va_priv->dev))
|
||||
return 0;
|
||||
else
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int va_macro_swrm_clock(void *handle, bool enable)
|
||||
{
|
||||
struct va_macro_priv *va_priv = (struct va_macro_priv *) handle;
|
||||
|
|
@ -2845,6 +2866,7 @@ static int va_macro_probe(struct platform_device *pdev)
|
|||
va_priv->swr_plat_data.write = NULL;
|
||||
va_priv->swr_plat_data.bulk_write = NULL;
|
||||
va_priv->swr_plat_data.clk = va_macro_swrm_clock;
|
||||
va_priv->swr_plat_data.core_vote = va_macro_core_vote;
|
||||
va_priv->swr_plat_data.handle_irq = NULL;
|
||||
mutex_init(&va_priv->swr_clk_lock);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue