linux/drivers/mfd
Jonathan Hunter b1c840e32d mfd: tps6586x: Handle interrupts on suspend
commit ac4ca4b9f4 upstream.

The tps6586x driver creates an irqchip that is used by its various child
devices for managing interrupts. The tps6586x-rtc device is one of its
children that uses the tps6586x irqchip. When using the tps6586x-rtc as
a wake-up device from suspend, the following is seen:

 PM: Syncing filesystems ... done.
 Freezing user space processes ... (elapsed 0.001 seconds) done.
 OOM killer disabled.
 Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done.
 Disabling non-boot CPUs ...
 Entering suspend state LP1
 Enabling non-boot CPUs ...
 CPU1 is up
 tps6586x 3-0034: failed to read interrupt status
 tps6586x 3-0034: failed to read interrupt status

The reason why the tps6586x interrupt status cannot be read is because
the tps6586x interrupt is not masked during suspend and when the
tps6586x-rtc interrupt occurs, to wake-up the device, the interrupt is
seen before the i2c controller has been resumed in order to read the
tps6586x interrupt status.

The tps6586x-rtc driver sets it's interrupt as a wake-up source during
suspend, which gets propagated to the parent tps6586x interrupt.
However, the tps6586x-rtc driver cannot disable it's interrupt during
suspend otherwise we would never be woken up and so the tps6586x must
disable it's interrupt instead.

Prevent the tps6586x interrupt handler from executing on exiting suspend
before the i2c controller has been resumed by disabling the tps6586x
interrupt on entering suspend and re-enabling it on resuming from
suspend.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-05-02 21:41:10 +01:00
..
88pm80x.c mfd: 88pm80x: Change chip id definition and detection 2013-06-18 09:41:10 +02:00
88pm800.c mfd: 88pm800: Fix I2C device resource leak if probe fails 2014-03-19 08:58:15 +00:00
88pm805.c mfd: marvell: Constify struct mfd_cell where possible 2014-01-06 09:13:26 +00:00
88pm860x-core.c mfd: 88pm860x: Fix possible NULL pointer dereference on i2c_new_dummy error 2014-03-19 08:58:11 +00:00
88pm860x-i2c.c mfd: Convert struct i2c_msg initialization to C99 format 2012-09-21 23:40:34 +02:00
aat2870-core.c mfd: aat2870: Fix sparse error 2013-10-23 16:20:44 +01:00
ab3100-core.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
ab3100-otp.c mfd: ab3100-otp: Convert to managed resources for allocating memory 2013-06-13 12:11:39 +02:00
ab8500-core.c mfd: ab8500-core: Return zero in get_register_interruptible() 2019-05-02 21:41:10 +01:00
ab8500-debugfs.c mfd: ab8500-debugfs: Move dereference after check for NULL 2014-01-06 09:13:17 +00:00
ab8500-gpadc.c mfd: ab8500-gpadc: Add CONFIG_PM_SLEEP to suspend/resume 2013-08-14 18:52:51 +01:00
ab8500-sysctrl.c mfd: ab8500-sysctrl: Let sysctrl driver work without pdata 2013-05-21 23:23:21 +02:00
abx500-core.c mfd: abx500-core: Remove unused function abx500_dump_all_banks() 2014-06-03 08:11:51 +01:00
adp5520.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
arizona-core.c mfd: arizona: Rid data size incompatibility warn when building for 64bit 2017-11-11 13:33:44 +00:00
arizona-i2c.c mfd: arizona: Rid data size incompatibility warn when building for 64bit 2017-11-11 13:33:44 +00:00
arizona-irq.c mfd: arizona: Correct error message for addition of main IRQ chip 2014-06-03 08:11:45 +01:00
arizona-spi.c mfd: arizona: Rid data size incompatibility warn when building for 64bit 2017-11-11 13:33:44 +00:00
arizona.h mfd: arizona: Rid data size incompatibility warn when building for 64bit 2017-11-11 13:33:44 +00:00
as3711.c mfd: as3711: Make of_device_id array const 2014-06-03 08:11:38 +01:00
as3722.c mfd: as3722: Make FUSE7_REG readable 2014-03-19 08:58:37 +00:00
asic3.c mfd: Constify struct mfd_cell where possible 2014-01-06 09:13:29 +00:00
axp20x.c mfd: AXP20x: Add mfd driver for AXP20x PMIC 2014-06-03 08:11:25 +01:00
bcm590xx.c Changes to existing drivers: 2014-06-06 12:08:39 -07:00
cros_ec.c i2c: ChromeOS EC tunnel driver 2014-06-03 08:11:49 +01:00
cros_ec_i2c.c mfd: cros ec: i2c: Use consistent function names 2014-01-21 08:13:35 +00:00
cros_ec_spi.c mfd: cros ec: spi: Don't send first message too soon 2018-03-03 15:51:39 +00:00
cs5535-mfd.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
da903x.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
da9052-core.c mfd: da9052: Fix volatile register definition ommissions 2014-03-19 08:58:13 +00:00
da9052-i2c.c mfd: da9052: Add new DA9053 BC chip variant 2014-03-19 08:58:25 +00:00
da9052-irq.c mfd: da9052: Introduce da9052-irq.c 2012-11-20 12:21:10 +01:00
da9052-spi.c mfd: da9052: Add new DA9053 BC chip variant 2014-03-19 08:58:25 +00:00
da9055-core.c mfd: dialog: Constify struct mfd_cell where possible 2014-01-06 09:13:25 +00:00
da9055-i2c.c mfd: da9055: Add DT support for PMIC 2014-03-19 08:58:39 +00:00
da9063-core.c mfd: da9063: Add support for production silicon variant code 2014-03-19 08:58:19 +00:00
da9063-i2c.c mfd: da9063: Add Dialog DA9063 core driver 2013-08-20 03:15:52 +02:00
da9063-irq.c mfd: da9063: Add IRQ support 2013-08-20 03:16:00 +02:00
davinci_voicecodec.c mfd: davinci_voicecodec: Provide a regmap for register I/O 2013-09-02 10:27:49 +02:00
db8500-prcmu.c mfd: db8500-prcmu: Remove check for CONFIG_DBX500_PRCMU_DEBUG 2014-06-03 08:11:53 +01:00
dbx500-prcmu-regs.h mfd: dbx500: Remove any mention of the BML8580CLK 2013-09-26 11:04:16 +02:00
dm355evm_msp.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
ezx-pcap.c mfd: ezx-pcap: Drop devm_free_irq of devm_ allocated irq 2013-10-23 16:21:17 +01:00
htc-egpio.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
htc-i2cpld.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
htc-pasic3.c mfd: Constify struct mfd_cell where possible 2014-01-06 09:13:29 +00:00
intel_msic.c mfd: intel: Constify struct mfd_cell where possible 2014-01-06 09:13:28 +00:00
ipaq-micro.c mfd: ipaq-micro: Make mfd_cell array const 2014-06-03 08:11:43 +01:00
janz-cmodio.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
jz4740-adc.c mfd: Constify struct mfd_cell where possible 2014-01-06 09:13:29 +00:00
Kconfig mfd: wm8350-i2c: Make sure the i2c regmap functions are compiled 2017-02-23 03:54:09 +00:00
kempld-core.c mfd: kempld-core: Fix callback return value check 2015-04-10 10:03:55 +01:00
lm3533-core.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
lm3533-ctrlbank.c mfd: Use SI-units for the lm3533 max-current interface 2012-05-20 17:27:02 +02:00
lp3943.c mfd: lp3943: Make mfd_cell array const 2014-06-03 08:11:36 +01:00
lp8788-irq.c mfd: lp8788-irq: Uninitialized variable in irq handler 2016-08-22 22:37:49 +01:00
lp8788.c mfd: Constify struct mfd_cell where possible 2014-01-06 09:13:29 +00:00
lpc_ich.c mfd: lpc_ich: Enable GPIO for Panther Point 2014-06-03 08:11:15 +01:00
lpc_sch.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
Makefile Changes to existing drivers: 2014-06-06 12:08:39 -07:00
max8907.c mfd: max8907: Make of_device_id array const 2014-06-03 08:11:32 +01:00
max8925-core.c mfd: maxim: Constify struct mfd_cell where possible 2014-01-06 09:13:27 +00:00
max8925-i2c.c mfd: max8925: Fix possible NULL pointer dereference on i2c_new_dummy error 2014-03-19 08:58:10 +00:00
max8997-irq.c mfd: Add irq domain support for max8997 interrupts 2012-07-09 00:16:13 +02:00
max8997.c mfd: max8997: Make of_device_id array const 2014-06-03 08:11:30 +01:00
max8998-irq.c mfd: max8998: Add irq domain support 2013-06-30 23:29:44 +02:00
max8998.c mfd: max8998: Fix potential NULL pointer dereference 2017-11-26 13:50:30 +00:00
max14577.c mfd: max14577: Cast to architecture agnostic data type 2014-06-03 08:11:50 +01:00
max77686-irq.c mfd: Allow to specify max77686 interrupt through DT or platform file also 2012-07-09 15:13:42 +02:00
max77686.c mfd: max77686: Make of_device_id array const 2014-06-03 08:11:30 +01:00
max77693-irq.c mfd: max77693: Fix up bug of wrong interrupt number 2013-11-04 09:41:19 +01:00
max77693.c mfd: max77693: Make of_device_id array const 2014-06-03 08:11:32 +01:00
mc13xxx-core.c mfd: mc13xxx: Do not use platform data with devicetree 2014-06-03 08:11:29 +01:00
mc13xxx-i2c.c mfd: mc13xxx: Simplify probe() & remove() 2014-01-21 08:28:10 +00:00
mc13xxx-spi.c mfd: mc13xxx: Add missing spi_setup() 2014-03-19 08:58:35 +00:00
mc13xxx.h mfd: mc13xxx: Simplify probe() & remove() 2014-01-21 08:28:10 +00:00
mcp-core.c Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
mcp-sa11x0.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
menelaus.c mfd: menelaus: Use module_i2c_driver 2014-06-03 08:12:47 +01:00
mfd-core.c mfd: core: Fix device reference leak in mfd_clone_cell 2017-02-23 03:54:34 +00:00
omap-usb-host.c mfd: omap-usb-host: Fix improper mask use. 2014-09-17 09:21:54 -07:00
omap-usb-tll.c mfd: omap-usb-tll: Fix register offsets 2017-11-26 13:50:30 +00:00
omap-usb.h mfd: omap-usb-tll: Move configuration code to omap_tll_init() 2013-04-09 09:46:23 +02:00
palmas.c mfd: palmas: Remove redundant of_match_ptr 2013-10-23 16:22:01 +01:00
pcf50633-adc.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
pcf50633-core.c mfd: pcf50633: Correct device name for pcf50633 regulator 2013-12-02 17:58:58 +00:00
pcf50633-gpio.c mfd: Include linux/mfd/pcf50633/pmic.h in pcf50633-gpio.c 2012-03-06 18:46:51 +01:00
pcf50633-irq.c mfd: Include linux/mfd/pcf50633/mbc.h in pcf50633-irq.c 2012-03-06 18:46:51 +01:00
pm8921-core.c mfd: pm8921: Remove pm8xxx API now that sub-devices use regmap 2014-06-03 08:11:23 +01:00
rc5t583-irq.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
rc5t583.c mfd: Constify struct mfd_cell where possible 2014-01-06 09:13:29 +00:00
rdc321x-southbridge.c mfd: rdc321x: Fix off-by-one for ngpio setting 2014-06-03 08:11:17 +01:00
retu-mfd.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
rtl8411.c mfd: rtsx: Fix sparse non static symbol warning 2014-01-21 08:28:14 +00:00
rts5209.c mfd: mmc: rtsx: Change default tx phase 2013-08-30 14:24:07 +02:00
rts5227.c For the 3.12 merge window we have one new driver for the DA9063 PMIC 2013-09-07 20:14:19 -07:00
rts5229.c mfd: mmc: rtsx: Change default tx phase 2013-08-30 14:24:07 +02:00
rts5249.c mfd: rtsx: Modify rts5249_optimize_phy 2013-10-23 16:20:59 +01:00
rtsx_pcr.c mfd: rtsx_pcr: Fix MSI enable error handling 2014-11-17 14:11:40 +00:00
rtsx_pcr.h mfd: rtsx: Add support for card reader rtl8402 2014-01-21 08:28:11 +00:00
rtsx_usb.c mfd: rtsx_usb: Avoid setting ucr->current_sg.status 2017-02-23 03:54:09 +00:00
sec-core.c mfd: sec-core: Make of_device_id array const 2014-06-03 08:11:35 +01:00
sec-irq.c mfd: sec-core: Remove duplicated device type from sec_pmic_dev 2014-06-03 08:11:21 +01:00
si476x-cmd.c mfd: si476x: Use get_unaligned_be16() for unaligned be16 loads 2013-05-16 19:15:07 +02:00
si476x-i2c.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
si476x-prop.c mfd: si476x: Add chip properties handling code 2013-04-19 18:37:59 +02:00
sm501.c mfd: sm501: Set coherent_dma_mask when creating subdevices 2018-12-16 22:08:47 +00:00
smsc-ece1099.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
ssbi.c mfd: ssbi: Mark match table const 2014-01-21 08:28:08 +00:00
sta2x11-mfd.c mfd: sta2x11-mfd: Use named constants for pci_power_t values 2014-01-21 08:29:00 +00:00
stmpe-i2c.c mfd: stmpe: Probe properly from the Device Tree 2014-05-09 10:51:09 +01:00
stmpe-spi.c mfd: stmpe: Use spi_get_drvdata() 2013-04-09 12:18:16 +02:00
stmpe.c mfd: stmpe: root out static GPIO and IRQ assignments 2014-05-23 09:41:01 +01:00
stmpe.h mfd: stmpe: mask off unused blocks properly 2014-05-09 10:51:06 +01:00
stw481x.c mfd: stw481x: Check the return value of devm_regmap_init_i2c 2014-03-19 08:58:17 +00:00
sun6i-prcm.c mfd: Add support for sun6i PRCM (Power/Reset/Clock Management) unit 2014-06-03 08:11:40 +01:00
syscon.c Changes to existing drivers: 2014-06-06 12:08:39 -07:00
t7l66xb.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
tc3589x.c mfd: tc3589x: Reform device tree probing 2014-03-19 08:58:05 +00:00
tc6387xb.c mfd: toshiba: Constify struct mfd_cell where possible 2014-01-06 09:13:26 +00:00
tc6393xb.c mfd: tc6393xb: Fail ohci suspend if full state restore is required 2015-01-12 15:44:02 +00:00
ti_am335x_tscadc.c mfd: ti_am335x_tscadc: Fix TSC resume 2014-11-17 14:11:40 +00:00
timberdale.c mfd: timberdale: Use pci_enable_msix_exact() instead of pci_enable_msix() 2014-03-19 08:58:34 +00:00
timberdale.h [media] mfd: Add timberdale video-in driver to timberdale 2010-12-29 08:16:46 -02:00
tmio_core.c mfd: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required 2011-10-31 19:32:05 -04:00
tps6105x.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
tps6507x.c mfd: tps6507x: Make of_device_id array const 2014-06-03 08:11:27 +01:00
tps6586x.c mfd: tps6586x: Handle interrupts on suspend 2019-05-02 21:41:10 +01:00
tps65010.c mfd: tps65010: Use devm_*() functions 2013-08-20 08:51:48 +01:00
tps65090.c mfd: tps65090: Stop caching most registers 2014-04-23 12:32:19 +01:00
tps65217.c mfd: tps65217: Naturalise cross-architecture discrepancies 2014-02-19 13:30:30 +00:00
tps65218.c mfd: tps65218: Make INT1 our status_base register 2015-02-04 10:57:39 +00:00
tps65910.c mfd: tps65910: Make of_device_id array const 2014-06-03 08:11:26 +01:00
tps65911-comparator.c mfd: tps65911-comparator: Fix an off by one bug 2018-11-20 18:04:56 +00:00
tps65912-core.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
tps65912-i2c.c mfd: tps65912: Convert to managed resources for allocating memory 2013-06-13 12:11:39 +02:00
tps65912-irq.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
tps65912-spi.c mfd: tps65912: Convert to managed resources for allocating memory 2013-06-13 12:11:39 +02:00
tps80031.c mfd: ti: Constify struct mfd_cell where possible 2014-01-06 09:13:29 +00:00
twl-core.c Immutable branch between MFD and Extcon due for v3.16 merge-window. 2014-06-03 08:08:40 +01:00
twl-core.h mfd: Move twl-core IRQ allocation into twl[4030|6030]-irq files 2012-03-22 13:04:33 +01:00
twl4030-audio.c mfd: twl4030-audio: Fix sibling-node lookup 2018-03-03 15:51:39 +00:00
twl4030-irq.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
twl4030-power.c mfd: twl4030-power: Fix regression with missing compatible flag 2015-01-12 15:44:01 +00:00
twl6030-irq.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
twl6040.c mfd: twl6040: Fix child-node lookup 2018-03-03 15:51:40 +00:00
ucb1x00-assabet.c MFD: ucb1x00-assabet: add support for UCB1x00 GPIO switches 2012-02-18 23:15:44 +00:00
ucb1x00-core.c mfd: ucb1x00-core: Use SIMPLE_DEV_PM_OPS macro 2014-03-19 08:58:33 +00:00
ucb1x00-ts.c MFD: ucb1x00: convert to use genirq 2012-02-18 23:15:43 +00:00
ucb1400_core.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
vexpress-sysreg.c ARM: vexpress: move HBI check to sysreg driver 2014-05-15 17:02:21 +01:00
viperboard.c mfd: Constify struct mfd_cell where possible 2014-01-06 09:13:29 +00:00
vx855.c mfd: Remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-21 08:27:45 +00:00
wl1273-core.c mfd: wl1273: Use devm_*() functions 2013-08-20 08:51:58 +01:00
wm831x-auxadc.c mfd: Convert wm831x to irq_domain 2012-05-20 17:27:07 +02:00
wm831x-core.c mfd: wolfson: Constify struct mfd_cell where possible 2014-01-06 09:13:25 +00:00
wm831x-i2c.c mfd: wm831x: Use PM ops for shutdown 2014-01-21 08:27:51 +00:00
wm831x-irq.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
wm831x-otp.c mfd: wm831x: Feed the device UUID into device_add_randomness() 2012-07-19 10:38:31 -04:00
wm831x-spi.c mfd: wm831x: Use PM ops for shutdown 2014-01-21 08:27:51 +00:00
wm5102-tables.c mfd: wm5102: Correct default for LDO Control 2 register 2014-06-03 08:12:55 +01:00
wm5110-tables.c mfd: arizona: Correct addresses of always-on trigger registers 2014-06-03 08:11:51 +01:00
wm8350-core.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
wm8350-gpio.c mfd: Rename wm8350 static gpio_set_debounce() 2011-09-06 16:37:58 +02:00
wm8350-i2c.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
wm8350-irq.c mfd: Delete non-required instances of include <linux/init.h> 2014-03-19 08:58:07 +00:00
wm8350-regmap.c mfd: Remove custom wm8350 cache implementation 2012-07-09 00:16:10 +02:00
wm8400-core.c mfd: wm8400-core: Make mfd_cell array const 2014-06-03 08:11:34 +01:00
wm8994-core.c mfd: wm8994-core: Naturalise cross-architecture discrepancies 2014-02-19 13:30:27 +00:00
wm8994-irq.c mfd: Use dev_get_platdata() 2013-07-31 13:01:29 +01:00
wm8994-regmap.c mfd: wm8994: Implement support for WM1811 devices with higher cust_ids 2012-09-14 09:52:11 +02:00
wm8994.h mfd: Initialise WM8994 register cache after reading chip ID registers 2011-12-13 00:11:13 +08:00
wm8997-tables.c mfd: arizona: Correct addresses of always-on trigger registers 2014-06-03 08:11:51 +01:00