aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/regmap-irq.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-01 15:29:14 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-04 07:13:53 -0400
commit0eb46ad0c8d60943c1f46cef795fc537fbffd177 (patch)
treefbf0bf634141cf46e9e8c134a7171813050c3c02 /drivers/base/regmap/regmap-irq.c
parent16032624f511b2fac0671cba5e7da40aa7e73a66 (diff)
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: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Diffstat (limited to 'drivers/base/regmap/regmap-irq.c')
-rw-r--r--drivers/base/regmap/regmap-irq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index c7e5b18f4edc..4a52743b60cd 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -306,7 +306,8 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
306 d->mask_buf[i] = d->mask_buf_def[i]; 306 d->mask_buf[i] = d->mask_buf_def[i];
307 reg = chip->mask_base + 307 reg = chip->mask_base +
308 (i * map->reg_stride * d->irq_reg_stride); 308 (i * map->reg_stride * d->irq_reg_stride);
309 ret = regmap_write(map, reg, d->mask_buf[i]); 309 ret = regmap_update_bits(map, reg,
310 d->mask_buf[i], d->mask_buf[i]);
310 if (ret != 0) { 311 if (ret != 0) {
311 dev_err(map->dev, "Failed to set masks in 0x%x: %d\n", 312 dev_err(map->dev, "Failed to set masks in 0x%x: %d\n",
312 reg, ret); 313 reg, ret);