linux/drivers/pinctrl
Doug Anderson 68bda47c57 pinctrl: rockchip: Handle wakeup pins
The rockchip pinctrl driver was using irq_gc_set_wake() as its
implementation of irq_set_wake() but was totally ignoring everything
that irq_gc_set_wake() did (which is to upkeep gc->wake_active).

Let's fix that by setting gc->wake_active as GPIO_INTEN at suspend
time and restoring GPIO_INTEN at resume time.

NOTE a few quirks when thinking about this patch:
- Rockchip pinctrl hardware supports both "disable/enable" and
  "mask/unmask".  Right now we only use "disable/enable" and present
  those to Linux as "mask/unmask".  This should be OK because
  enable/disable is optional and Linux will implement it in terms of
  mask/unmask.  At the moment we always tell hardware all interrupts
  are unmasked (the boot default).
- At suspend time Linux tries to call "disable" on all interrupts and
  also enables wakeup on all wakeup interrupts.  One would think that
  since "disable" is implemented as "mask" when "disable" isn't
  provided and that since we were ignoring gc->wake_active that
  nothing would have woken us up.  That's not the case since Linux
  "optimizes" things and just leaves interrutps unmasked, assuming it
  could mask them later when they go off.  That meant that at suspend
  time all interrupts were actually being left enabled.

With this patch random non-wakeup interrupts no longer wake the system
up.  Wakeup interrupts still wake the system up.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-12-30 13:17:27 +01:00
..
berlin pinctrl: berlin: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
freescale Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
intel Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mvebu pinctrl: mvebu: drop owner assignment from platform_drivers 2014-10-20 16:21:22 +02:00
nomadik Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
qcom Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
samsung Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sh-pfc pinctrl: sh-pfc: drop owner assignment from platform_drivers 2014-10-20 16:21:24 +02:00
sirf pinctrl: sirf: drop owner assignment from platform_drivers 2014-10-20 16:21:24 +02:00
spear Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sunxi Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
vt8500 pinctrl: vt8500: drop owner assignment from platform_drivers 2014-10-20 16:21:26 +02:00
core.c pinctrl: avoid duplicated calling enable_pinmux_setting for a pin 2014-07-11 14:08:26 +02:00
core.h pinctrl: move subsystem mutex to pinctrl_dev struct 2013-04-26 17:01:35 +02:00
devicetree.c pinctrl: Quiet logging about missing DT nodes when not using DT 2014-02-24 10:44:54 +01:00
devicetree.h pinctrl: core device tree mapping table parsing support 2012-04-18 13:53:10 +02:00
Kconfig pinctrl: Move Intel Baytrail pinctrl driver under intel directory 2014-10-29 10:35:20 +01:00
Makefile pinctrl: Move Intel Baytrail pinctrl driver under intel directory 2014-10-29 10:35:20 +01:00
pinconf-generic.c pinctrl: pinconf-generic: Declare dt_params/conf_items const 2014-11-11 13:00:25 +01:00
pinconf.c pinctrl: pinconf: remove warning: unused variable 'ops' 2013-12-13 13:55:15 +01:00
pinconf.h pinctrl: add function to parse generic pinconfig properties from a dt node 2013-06-16 11:57:32 +02:00
pinctrl-adi2-bf54x.c pinctrl: pinctrl-adi: combine multiple groups of one function together 2014-02-25 10:49:13 +01:00
pinctrl-adi2-bf60x.c pinctrl: pinctrl-adi: combine multiple groups of one function together 2014-02-25 10:49:13 +01:00
pinctrl-adi2.c pinctrl: adi2: Remove duplicate gpiochip_remove_pin_ranges 2014-09-05 10:33:51 +02:00
pinctrl-adi2.h pinctrl: pinctrl-adi: combine multiple groups of one function together 2014-02-25 10:49:13 +01:00
pinctrl-as3722.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-at91.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pinctrl-at91.h pinctrl: at91: use own header 2014-10-29 09:28:35 +01:00
pinctrl-bcm281xx.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pinctrl-bcm2835.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-coh901.c pinctrl: remove all usage of gpio_remove ret val in driver/pinctl 2014-07-22 16:34:12 +02:00
pinctrl-coh901.h
pinctrl-falcon.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-lantiq.c pinctrl: clean up after enable refactoring 2014-09-04 10:05:07 +02:00
pinctrl-lantiq.h pinctrl: lantiq: Fix header file include guard 2014-04-22 08:41:35 +02:00
pinctrl-palmas.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-rockchip.c pinctrl: rockchip: Handle wakeup pins 2014-12-30 13:17:27 +01:00
pinctrl-single.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-st.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pinctrl-tb10x.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pinctrl-tegra20.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-tegra30.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-tegra114.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-tegra124.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-tegra-xusb.c USB patches for 3.19-rc1 2014-12-14 14:57:16 -08:00
pinctrl-tegra.c pinctrl: clean up after enable refactoring 2014-09-04 10:05:07 +02:00
pinctrl-tegra.h pinctrl: tegra: add missing kerneldoc 2014-04-22 16:55:41 +02:00
pinctrl-tz1090-pdc.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-tz1090.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-u300.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-utils.c pinctrl: utils: include export.h to avoid warnings 2013-08-28 15:50:33 +02:00
pinctrl-utils.h pinctrl: add utility functions for add map/configs 2013-08-14 21:00:41 +02:00
pinctrl-xway.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinmux.c pinctrl: clean up after enable refactoring 2014-09-04 10:05:07 +02:00
pinmux.h pinctrl: ifdef CONFIG_DEBUG_FS cleanup 2012-04-18 13:53:12 +02:00