[Letux-kernel] [PATCH] mfd: rn5t618: fix IRQ trigger by changing it to level mode
Andreas Kemnade
andreas at kemnade.info
Tue Apr 6 19:23:18 CEST 2021
Hi,
this is the real fix for
power: supply: rn5t618: introduce work struct to solve IRQ races with ADC
It has solved problems with some charges but did not solve problems
with my bicycle hub dynamo and monitoring Vbus.
lets see if this is accepted upstream.
Regards,
Andreas
On Tue, 6 Apr 2021 00:15:58 +0200
Andreas Kemnade <andreas at kemnade.info> wrote:
> During more massive generation of interrupts, the IRQ got stuck,
> and the subdevices did not see any new interrupts. That happens
> especially at wonky USB supply in combination with ADC reads.
> To fix that trigger the IRQ at level low instead of falling edge.
>
> Fixes: 0c81604516af ("mfd: rn5t618: Add IRQ support")
> Signed-off-by: Andreas Kemnade <andreas at kemnade.info>
> ---
> drivers/mfd/rn5t618.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/rn5t618.c b/drivers/mfd/rn5t618.c
> index ecddd7b6500e..a852eef1f4d2 100644
> --- a/drivers/mfd/rn5t618.c
> +++ b/drivers/mfd/rn5t618.c
> @@ -109,7 +109,7 @@ static int rn5t618_irq_init(struct rn5t618 *rn5t618)
>
> ret = devm_regmap_add_irq_chip(rn5t618->dev, rn5t618->regmap,
> rn5t618->irq,
> - IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
> + IRQF_TRIGGER_LOW | IRQF_ONESHOT,
> 0, irq_chip, &rn5t618->irq_data);
> if (ret)
> dev_err(rn5t618->dev, "Failed to register IRQ chip\n");
More information about the Letux-kernel
mailing list