lkml.org 
[lkml]   [2022]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v1 1/1] regulator: da9211: Use irq handler when ready
Date
On 24 November 2022 16:46, Ricardo Ribalda wrote:
>If the system does not come from reset (like when it is kexec()), the regulator might have an IRQ waiting for us.
>
>If we enable the IRQ handler before its structures are ready, we crash.

A good catch, thank you :-)

...
>+ ret = da9211_regulator_init(chip);
...
> chip->chip_irq = i2c->irq;

On the other hand... with the init call made before chip_irq is assigned, the IRQs won't be unmasked:
https://elixir.bootlin.com/linux/latest/source/drivers/regulator/da9211-regulator.c#L430

Nacked-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>

Regards,
Adam

\
 
 \ /
  Last update: 2022-11-27 21:55    [W:0.358 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site