diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-04 11:32:54 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-04 15:53:43 -0500 |
commit | 33be49324f7f3e9dff10d3d07a5c78ee82f8d54e (patch) | |
tree | 81bcda95ea2a86cb02a8004095ecf5d19c727f28 /drivers/base/regmap | |
parent | a7440eaa90cf2659920b9b28973cc1a13a2b331f (diff) |
regmap: irq: Fix sync of wake statuses to hardware
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>
Diffstat (limited to 'drivers/base/regmap')
-rw-r--r-- | drivers/base/regmap/regmap-irq.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index aaf599a320b3..be5579964be0 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c | |||
@@ -88,6 +88,17 @@ static void regmap_irq_sync_unlock(struct irq_data *data) | |||
88 | if (ret != 0) | 88 | if (ret != 0) |
89 | dev_err(d->map->dev, "Failed to sync masks in %x\n", | 89 | dev_err(d->map->dev, "Failed to sync masks in %x\n", |
90 | reg); | 90 | reg); |
91 | |||
92 | reg = d->chip->wake_base + | ||
93 | (i * map->reg_stride * d->irq_reg_stride); | ||
94 | if (d->wake_buf) { | ||
95 | ret = regmap_update_bits(d->map, reg, | ||
96 | d->mask_buf_def[i], d->wake_buf[i]); | ||
97 | if (ret != 0) | ||
98 | dev_err(d->map->dev, | ||
99 | "Failed to sync wakes in %x: %d\n", | ||
100 | reg, ret); | ||
101 | } | ||
91 | } | 102 | } |
92 | 103 | ||
93 | if (d->chip->runtime_pm) | 104 | if (d->chip->runtime_pm) |