diff options
author | Semen Protsenko <semen.protsenko@globallogic.com> | 2015-04-21 20:27:37 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-05-04 15:31:20 +0200 |
commit | 67ddd32bfc9f5746e6c293154f8287278e6744ba (patch) | |
tree | 5f68db4389c8c913e33b0d94ad78145c39ba1277 /drivers/gpio/gpio-max732x.c | |
parent | 0218d5a8b2a3f4bdbc99523a61406b8c5ab14d39 (diff) | |
download | op-kernel-dev-67ddd32bfc9f5746e6c293154f8287278e6744ba.zip op-kernel-dev-67ddd32bfc9f5746e6c293154f8287278e6744ba.tar.gz |
gpio: max732x: Propagate wake-up setting to parent irq controller
Set .irq_set_wake callback to prevent possible issues on wake-up.
This patch was inspired by this commit:
b80eef95beb04760629822fa130aeed54cdfafca
Signed-off-by: Semen Protsenko <semen.protsenko@globallogic.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-max732x.c')
-rw-r--r-- | drivers/gpio/gpio-max732x.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c index 0fa4543c..1885e5c 100644 --- a/drivers/gpio/gpio-max732x.c +++ b/drivers/gpio/gpio-max732x.c @@ -429,6 +429,14 @@ static int max732x_irq_set_type(struct irq_data *d, unsigned int type) return 0; } +static int max732x_irq_set_wake(struct irq_data *data, unsigned int on) +{ + struct max732x_chip *chip = irq_data_get_irq_chip_data(data); + + irq_set_irq_wake(chip->client->irq, on); + return 0; +} + static struct irq_chip max732x_irq_chip = { .name = "max732x", .irq_mask = max732x_irq_mask, @@ -436,6 +444,7 @@ static struct irq_chip max732x_irq_chip = { .irq_bus_lock = max732x_irq_bus_lock, .irq_bus_sync_unlock = max732x_irq_bus_sync_unlock, .irq_set_type = max732x_irq_set_type, + .irq_set_wake = max732x_irq_set_wake, }; static uint8_t max732x_irq_pending(struct max732x_chip *chip) |