* [PATCH 0/1] regulator: da9121: add IRQ free to release function
@ 2020-12-01 18:18 Adam Ward
2020-12-01 18:18 ` [PATCH 1/1] regulator: da9121: Request IRQ directly and free in release function to avoid masking race Adam Ward
0 siblings, 1 reply; 2+ messages in thread
From: Adam Ward @ 2020-12-01 18:18 UTC (permalink / raw)
To: Mark Brown, Rob Herring
Cc: Liam Girdwood, Vincent Whitchurch, linux-kernel, devicetree,
Support Opensource
This patch fixes the DA9121 driver to disable the IRQ before cancelling
the work, to be sure the IRQ doesn't restart it before all IRQs are
masked
Adam Ward (1):
regulator: da9121: Request IRQ directly and free in release function
to avoid masking race
drivers/regulator/da9121-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] regulator: da9121: Request IRQ directly and free in release function to avoid masking race
2020-12-01 18:18 [PATCH 0/1] regulator: da9121: add IRQ free to release function Adam Ward
@ 2020-12-01 18:18 ` Adam Ward
0 siblings, 0 replies; 2+ messages in thread
From: Adam Ward @ 2020-12-01 18:18 UTC (permalink / raw)
To: Mark Brown, Rob Herring
Cc: Liam Girdwood, Vincent Whitchurch, linux-kernel, devicetree,
Support Opensource
Signed-off-by: Adam Ward <Adam.Ward.opensource@diasemi.com>
---
drivers/regulator/da9121-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121-regulator.c
index d9a8a4b..3e59f68 100644
--- a/drivers/regulator/da9121-regulator.c
+++ b/drivers/regulator/da9121-regulator.c
@@ -945,8 +945,7 @@ static int da9121_config_irq(struct i2c_client *i2c,
chip->passive_delay = p_delay;
- ret = devm_request_threaded_irq(chip->dev,
- chip->chip_irq, NULL,
+ ret = request_threaded_irq(chip->chip_irq, NULL,
da9121_irq_handler,
IRQF_TRIGGER_LOW|IRQF_ONESHOT,
"da9121", chip);
@@ -1036,6 +1035,7 @@ static int da9121_i2c_remove(struct i2c_client *i2c)
const int mask_all[4] = { 0xFF, 0xFF, 0xFF, 0xFF };
int ret = 0;
+ free_irq(chip->chip_irq, chip);
cancel_delayed_work_sync(&chip->work);
ret = regmap_bulk_write(chip->regmap, DA9121_REG_SYS_MASK_0, mask_all, 4);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-01 18:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-01 18:18 [PATCH 0/1] regulator: da9121: add IRQ free to release function Adam Ward
2020-12-01 18:18 ` [PATCH 1/1] regulator: da9121: Request IRQ directly and free in release function to avoid masking race Adam Ward
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).