Re: [PATCH] extcon: ptn5150: handle pending IRQ events during system resume

From: Xu Yang

Date: Fri Nov 14 2025 - 21:42:21 EST


Hi MyungJoo,

On Sat, Nov 15, 2025 at 10:01:45AM +0900, MyungJoo Ham wrote:
> >When the system is suspended and ptn5150 wakeup interrupt is disabled,
> >any changes on ptn5150 will only be record in interrupt status
> >registers and won't fire an IRQ since its trigger type is falling
> >edge. So the HW interrupt line will keep at low state and any further
> >changes won't trigger IRQ anymore. To fix it, this will schedule a
> >work to check whether any IRQ are pending and handle it accordingly.
>
> It is ok call ptn5150_irq_work() anytime during resume even if
> irq-handler is invoked right before ptn5150_resume(), right?

Yes, it's ok because the mutex lock will protect it and if irq-handler
is invoked firstly, ptn5150_resume() will just read the status registers
and return soon since no pending events.

>
> Acked-by: MyungJoo Ham <myungjoo.ham@xxxxxxxxxxx>

Thanks,
Xu Yang

>
> >
> >Signed-off-by: Xu Yang <xu.yang_2@xxxxxxx>
> >---
> > drivers/extcon/extcon-ptn5150.c | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >