Skip to content

Commit

Permalink
regmap: irq: Fix sync of wake statuses to hardware
Browse files Browse the repository at this point in the history
This wasn't implemented but happened to work on test systems due to lack
of wake mask inversion support.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jan 4, 2013
1 parent a7440ea commit 33be493
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/base/regmap/regmap-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
if (ret != 0)
dev_err(d->map->dev, "Failed to sync masks in %x\n",
reg);

reg = d->chip->wake_base +
(i * map->reg_stride * d->irq_reg_stride);
if (d->wake_buf) {
ret = regmap_update_bits(d->map, reg,
d->mask_buf_def[i], d->wake_buf[i]);
if (ret != 0)
dev_err(d->map->dev,
"Failed to sync wakes in %x: %d\n",
reg, ret);
}
}

if (d->chip->runtime_pm)
Expand Down

0 comments on commit 33be493

Please sign in to comment.