Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308691
b: refs/heads/master
c: 2fe372f
h: refs/heads/master
i:
  308689: 137a32d
  308687: 171452c
v: v3
  • Loading branch information
Paul Parsons authored and Samuel Ortiz committed May 1, 2012
1 parent 37fceec commit ff386ca
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1baf665b8167c0ab1240e76b1eae647d5ab60b23
refs/heads/master: 2fe372fc2a037c8de0c721b45cd0e4e9c8d8c25e
16 changes: 16 additions & 0 deletions trunk/drivers/mfd/asic3.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,28 @@ static int asic3_gpio_irq_type(struct irq_data *data, unsigned int type)
return 0;
}

static int asic3_gpio_irq_set_wake(struct irq_data *data, unsigned int on)
{
struct asic3 *asic = irq_data_get_irq_chip_data(data);
u32 bank, index;
u16 bit;

bank = asic3_irq_to_bank(asic, data->irq);
index = asic3_irq_to_index(asic, data->irq);
bit = 1<<index;

asic3_set_register(asic, bank + ASIC3_GPIO_SLEEP_MASK, bit, !on);

return 0;
}

static struct irq_chip asic3_gpio_irq_chip = {
.name = "ASIC3-GPIO",
.irq_ack = asic3_mask_gpio_irq,
.irq_mask = asic3_mask_gpio_irq,
.irq_unmask = asic3_unmask_gpio_irq,
.irq_set_type = asic3_gpio_irq_type,
.irq_set_wake = asic3_gpio_irq_set_wake,
};

static struct irq_chip asic3_irq_chip = {
Expand Down

0 comments on commit ff386ca

Please sign in to comment.