Re: [PATCH v2] drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer

From: Kuogee Hsieh
Date: Thu Dec 15 2022 - 15:12:59 EST



On 12/15/2022 12:10 PM, Stephen Boyd wrote:
Quoting Dmitry Baryshkov (2022-12-15 10:46:42)
On 15/12/2022 20:32, Kuogee Hsieh wrote:
if (!aux->cmd_busy)
return;

if (aux->native)
- dp_aux_native_handler(aux, isr);
+ ret = dp_aux_native_handler(aux, isr);
else
- dp_aux_i2c_handler(aux, isr);
+ ret = dp_aux_i2c_handler(aux, isr);

- complete(&aux->comp);
+ if (ret == IRQ_HANDLED)
+ complete(&aux->comp);
Can you just move the complete() into the individual handling functions?
Then you won't have to return the error code from dp_aux_*_handler() at
all. You can check `isr' in that function and call complete if there was
any error.
I'd prefer we apply my patch and pass the irqreturn_t variable to the
caller of this function so spurious irqs are shutdown. Should I send it
as a proper patch?
yes, please