Loading asoc/codecs/bolero/va-macro.c +22 −0 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -603,6 +604,26 @@ static int va_macro_tx_va_mclk_enable(struct va_macro_priv *va_priv, 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; Loading Loading @@ -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 Loading
asoc/codecs/bolero/va-macro.c +22 −0 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -603,6 +604,26 @@ static int va_macro_tx_va_mclk_enable(struct va_macro_priv *va_priv, 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; Loading Loading @@ -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