Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323299
b: refs/heads/master
c: 36ac914
h: refs/heads/master
i:
  323297: dc018b0
  323295: 21bf666
v: v3
  • Loading branch information
Xiaofan Tian authored and Mark Brown committed Aug 30, 2012
1 parent 76b563d commit e0a20db
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a97637988c355646e730bcf0e6d548619112cdd
refs/heads/master: 36ac914ba2a5f1a14c5e0bf5d33bc20016d50940
12 changes: 10 additions & 2 deletions trunk/drivers/base/regmap/regmap-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
for (i = 0; i < d->chip->num_regs; i++) {
reg = d->chip->mask_base +
(i * map->reg_stride * d->irq_reg_stride);
ret = regmap_update_bits(d->map, reg,
if (d->chip->mask_invert)
ret = regmap_update_bits(d->map, reg,
d->mask_buf_def[i], ~d->mask_buf[i]);
else
ret = regmap_update_bits(d->map, reg,
d->mask_buf_def[i], d->mask_buf[i]);
if (ret != 0)
dev_err(d->map->dev, "Failed to sync masks in %x\n",
Expand Down Expand Up @@ -338,7 +342,11 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
d->mask_buf[i] = d->mask_buf_def[i];
reg = chip->mask_base +
(i * map->reg_stride * d->irq_reg_stride);
ret = regmap_update_bits(map, reg,
if (chip->mask_invert)
ret = regmap_update_bits(map, reg,
d->mask_buf[i], ~d->mask_buf[i]);
else
ret = regmap_update_bits(map, reg,
d->mask_buf[i], d->mask_buf[i]);
if (ret != 0) {
dev_err(map->dev, "Failed to set masks in 0x%x: %d\n",
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/regmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ struct regmap_irq_chip {
unsigned int ack_base;
unsigned int wake_base;
unsigned int irq_reg_stride;
unsigned int mask_invert;
bool runtime_pm;

int num_regs;
Expand Down

0 comments on commit e0a20db

Please sign in to comment.