lkml.org 
[lkml]   [2022]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 3/3] soundwire: qcom: add in-band wake up interrupt support
From

> @@ -1424,6 +1464,11 @@ static int swrm_runtime_resume(struct device *dev)
> struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(dev);
> int ret;
>
> + if (ctrl->wake_irq > 0) {
> + if (!irqd_irq_disabled(irq_get_irq_data(ctrl->wake_irq)))
> + disable_irq_nosync(ctrl->wake_irq);
> + }
> +
> clk_prepare_enable(ctrl->hclk);

This one is quite interesting. If you disable the IRQ mechanism but
haven't yet resumed the clock, that leaves a time window where the
peripheral could attempt to drive the line high. what happens in that case?

>
> if (ctrl->clock_stop_not_supported) {
> @@ -1491,6 +1536,11 @@ static int __maybe_unused swrm_runtime_suspend(struct device *dev)
>
> usleep_range(300, 305);
>
> + if (ctrl->wake_irq > 0) {
> + if (irqd_irq_disabled(irq_get_irq_data(ctrl->wake_irq)))
> + enable_irq(ctrl->wake_irq);
> + }
> +

and this one is similar, you could have a case where the peripheral
signals a wake immediately after the ClockStopNow frame, but you may not
yet have enabled the wake detection interrupt.

Would that imply that the wake is missed?



> return 0;
> }
>

\
 
 \ /
  Last update: 2022-02-28 19:24    [W:0.131 / U:2.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site