Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350378
b: refs/heads/master
c: 9442490
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Jan 4, 2013
1 parent 6bfee79 commit a85a8e3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 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: 33be49324f7f3e9dff10d3d07a5c78ee82f8d54e
refs/heads/master: 9442490a02867088bcd5ed6231fa3b35a733c2b8
21 changes: 17 additions & 4 deletions trunk/drivers/base/regmap/regmap-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,14 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
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 (d->chip->wake_invert)
ret = regmap_update_bits(d->map, reg,
d->mask_buf_def[i],
~d->wake_buf[i]);
else
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",
Expand Down Expand Up @@ -419,8 +425,15 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
d->wake_buf[i] = d->mask_buf_def[i];
reg = chip->wake_base +
(i * map->reg_stride * d->irq_reg_stride);
ret = regmap_update_bits(map, reg, d->wake_buf[i],
d->wake_buf[i]);

if (chip->wake_invert)
ret = regmap_update_bits(map, reg,
d->mask_buf_def[i],
0);
else
ret = regmap_update_bits(map, reg,
d->mask_buf_def[i],
d->wake_buf[i]);
if (ret != 0) {
dev_err(map->dev, "Failed to set masks in 0x%x: %d\n",
reg, ret);
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 @@ -381,6 +381,7 @@ struct regmap_irq_chip {
unsigned int wake_base;
unsigned int irq_reg_stride;
unsigned int mask_invert;
unsigned int wake_invert;
bool runtime_pm;

int num_regs;
Expand Down

0 comments on commit a85a8e3

Please sign in to comment.