From: Mark Brown Date: Fri, 4 Jan 2013 16:32:54 +0000 (+0000) Subject: regmap: irq: Fix sync of wake statuses to hardware X-Git-Tag: next-20130218~31^2~2^2~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=33be49324f7f3e9dff10d3d07a5c78ee82f8d54e;p=karo-tx-linux.git 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 --- 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) 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)