Merge "asoc: codecs: delay codec irq handler during ssr"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
340b1f9238
@@ -295,6 +295,7 @@ static irqreturn_t wcd9xxx_irq_thread(int irq, void *data)
|
|||||||
static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 1);
|
static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 1);
|
||||||
struct wcd9xxx_core_resource *wcd9xxx_res = data;
|
struct wcd9xxx_core_resource *wcd9xxx_res = data;
|
||||||
int num_irq_regs = wcd9xxx_res->num_irq_regs;
|
int num_irq_regs = wcd9xxx_res->num_irq_regs;
|
||||||
|
struct wcd9xxx *wcd9xxx;
|
||||||
u8 status[4], status1[4] = {0}, unmask_status[4] = {0};
|
u8 status[4], status1[4] = {0}, unmask_status[4] = {0};
|
||||||
|
|
||||||
if (unlikely(wcd9xxx_lock_sleep(wcd9xxx_res) == false)) {
|
if (unlikely(wcd9xxx_lock_sleep(wcd9xxx_res) == false)) {
|
||||||
@@ -309,6 +310,23 @@ static irqreturn_t wcd9xxx_irq_thread(int irq, void *data)
|
|||||||
goto err_disable_irq;
|
goto err_disable_irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wcd9xxx = (struct wcd9xxx *)wcd9xxx_res->parent;
|
||||||
|
if (!wcd9xxx) {
|
||||||
|
dev_err(wcd9xxx_res->dev,
|
||||||
|
"%s: Codec core not supplied\n", __func__);
|
||||||
|
goto err_disable_irq;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!wcd9xxx->dev_up) {
|
||||||
|
dev_info_ratelimited(wcd9xxx_res->dev, "wcd9xxx dev not up\n");
|
||||||
|
/*
|
||||||
|
* sleep to not block the core when device is
|
||||||
|
* not up (slimbus will not be available) to
|
||||||
|
* process interrupts.
|
||||||
|
*/
|
||||||
|
msleep(10);
|
||||||
|
}
|
||||||
|
|
||||||
memset(status, 0, sizeof(status));
|
memset(status, 0, sizeof(status));
|
||||||
ret = regmap_bulk_read(wcd9xxx_res->wcd_core_regmap,
|
ret = regmap_bulk_read(wcd9xxx_res->wcd_core_regmap,
|
||||||
wcd9xxx_res->intr_reg[WCD9XXX_INTR_STATUS_BASE],
|
wcd9xxx_res->intr_reg[WCD9XXX_INTR_STATUS_BASE],
|
||||||
|
Reference in New Issue
Block a user