Skip to content

Commit

Permalink
regulator (max5970): Fix IRQ handler
Browse files Browse the repository at this point in the history
[ Upstream commit a3fa983 ]

The max5970 datasheet gives the impression that IRQ status bits must
be cleared by writing a one to set bits, as those are marked with 'R/C',
however tests showed that a zero must be written.

Fixes an IRQ storm as the interrupt handler actually clears the IRQ
status bits.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Link: https://msgid.link/r/20240130150257.3643657-1-naresh.solanki@9elements.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
PatrickRudolph authored and gregkh committed Mar 1, 2024
1 parent 04d46a9 commit f7d7990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/max5970-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static int max597x_regmap_read_clear(struct regmap *map, unsigned int reg,
return ret;

if (*val)
return regmap_write(map, reg, *val);
return regmap_write(map, reg, 0);

return 0;
}
Expand Down

0 comments on commit f7d7990

Please sign in to comment.