2021-01-03 21:43:10

by Jeff LaBundy

[permalink] [raw]
Subject: [PATCH 4/6] mfd: iqs62x: Increase interrupt handler return delay

The time the device takes to deassert its RDY output following an
I2C stop condition scales with the core clock frequency.

To prevent level-triggered interrupts from being reasserted after
the interrupt handler returns, increase the time before returning
to account for the worst-case delay (~90 us) plus margin.

Signed-off-by: Jeff LaBundy <[email protected]>
---
drivers/mfd/iqs62x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/iqs62x.c b/drivers/mfd/iqs62x.c
index 7a1ff7c..07c9725 100644
--- a/drivers/mfd/iqs62x.c
+++ b/drivers/mfd/iqs62x.c
@@ -533,7 +533,7 @@ static irqreturn_t iqs62x_irq(int irq, void *context)
* ensure the device's RDY output has been deasserted by the time the
* interrupt handler returns.
*/
- usleep_range(50, 100);
+ usleep_range(150, 200);

return IRQ_HANDLED;
}
--
2.7.4


2021-01-14 10:23:36

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 4/6] mfd: iqs62x: Increase interrupt handler return delay

On Sun, 03 Jan 2021, Jeff LaBundy wrote:

> The time the device takes to deassert its RDY output following an
> I2C stop condition scales with the core clock frequency.
>
> To prevent level-triggered interrupts from being reasserted after
> the interrupt handler returns, increase the time before returning
> to account for the worst-case delay (~90 us) plus margin.
>
> Signed-off-by: Jeff LaBundy <[email protected]>
> ---
> drivers/mfd/iqs62x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

For my own reference (apply this as-is to your sign-off block):

Acked-for-MFD-by: Lee Jones <[email protected]>

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog