Commit 0eb46ad0 authored by Mark Brown's avatar Mark Brown

regmap: irq: Only update mask bits when doing initial mask

Don't write the full register, it's possible there's bits other than the
masks in the same register which we shouldn't be changing.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: default avatarStephen Warren <swarren@wwwdotorg.org>
parent 16032624
...@@ -306,7 +306,8 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags, ...@@ -306,7 +306,8 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
d->mask_buf[i] = d->mask_buf_def[i]; d->mask_buf[i] = d->mask_buf_def[i];
reg = chip->mask_base + reg = chip->mask_base +
(i * map->reg_stride * d->irq_reg_stride); (i * map->reg_stride * d->irq_reg_stride);
ret = regmap_write(map, reg, d->mask_buf[i]); ret = regmap_update_bits(map, reg,
d->mask_buf[i], d->mask_buf[i]);
if (ret != 0) { if (ret != 0) {
dev_err(map->dev, "Failed to set masks in 0x%x: %d\n", dev_err(map->dev, "Failed to set masks in 0x%x: %d\n",
reg, ret); reg, ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment