regmap: set MASK_ON_SUSPEND/SKIP_SET_WAKE if no wake_base
authorStephen Warren <swarren@nvidia.com>
Wed, 1 Aug 2012 17:40:49 +0000 (11:40 -0600)
committerSimone Willett <swillett@nvidia.com>
Wed, 7 Nov 2012 02:28:56 +0000 (18:28 -0800)
commit9182f46fbc0b89ead5968c16cc988b39a7c3ede2
treeb303773092259bd12243984cf226638dd510ef69
parent5d7c8abfdedaeb0964ad168b719a4d61ddc6aa89
regmap: set MASK_ON_SUSPEND/SKIP_SET_WAKE if no wake_base

If a regmap-irq chip has no wake base:

* There's no point calling .irq_set_wake, hence IRQCHIP_SKIP_SET_WAKE.

* If some IRQs in the chip are enabled for wake and some aren't, we
  should mask those interrupts that are not wake enabled, so that if
  they occur during suspend, the system is not awoken. Hence,
  IRQCHIP_MASK_ON_SUSPEND.

Note that IRQCHIP_MASK_ON_SUSPEND is handled by check_wakeup_irqs(),
which always iterates over every single interrupt in the system,
irrespective of whether an interrupt is a child of a controller whose
output interrupt has no wake-enabled inputs and hence is presumably
masked itself. Hence this change might cause interrupt unnecessary
masking operations and associated register I/O.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 685879f4b2036e58c1a0cdaaee2b155d3c965461)

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: Ibdb63f7574fa2017d1ba1f6f497c787f12f4e260
Reviewed-on: http://git-master/r/161552
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Stephen Warren <swarren@nvidia.com>
drivers/base/regmap/regmap-irq.c