spmi: pmic-arb: use irq_chip callback to set spmi irq wakeup capability
authorKiran Gunda <kgunda@codeaurora.org>
Fri, 28 Jul 2017 07:10:43 +0000 (12:40 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 11:51:19 +0000 (13:51 +0200)
commitcdeef07a8dd5ea45b2f2ec4169d2669dddd24e6c
treeeae97bac9910f87aef56286ad9210f1dafc8c6fc
parentff615ed91b5dffa0f1977ee1d703f697e2b4d62f
spmi: pmic-arb: use irq_chip callback to set spmi irq wakeup capability

Currently the driver sets the pmic arbiter core interrupt as wakeup capable
irrespective of the child irqs which causes the system to wakeup
unnecessarily. To fix this, set the core interrupt as wakeup capable
only if any of the child irqs request for it. Do this by marking it as
wakeup capable in the irq_set_wake callback.

Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spmi/spmi-pmic-arb.c