]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mfd: sec: Add PM ops and make it a wake up source
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Tue, 26 Nov 2013 13:50:27 +0000 (14:50 +0100)
committerLee Jones <lee.jones@linaro.org>
Fri, 29 Nov 2013 09:30:24 +0000 (09:30 +0000)
commit27647c7a4e04610ac4a4defef78e03c9bcf3c2e3
treebda20385f324a77390551778c90971b7fa4badd8
parent92e4beb064c789b971fd1f52a530f81c66957829
mfd: sec: Add PM ops and make it a wake up source

Add PM suspend/resume ops to the sec MFD core driver and make it a wake
up source. This allows proper waking from suspend to RAM and also fixes
broken interrupts after resuming:
[   42.705703] sec_pmic 7-0066: Failed to read IRQ status: -5

Interrupts stop working after first resume initiated by them (e.g. by
RTC Alarm interrupt) because interrupt registers were not cleared properly.

When device is woken up from suspend by RTC Alarm, an interrupt occurs
before resuming I2C bus controller. The interrupt is handled by
regmap_irq_thread which tries to read RTC registers. This read fails
(I2C is still suspended) and RTC Alarm interrupt is disabled.

Disable the S5M8767 interrupts during suspend (disable_irq()) and enable
them during resume so the device will be still woken up but the interrupt
won't happen before resuming I2C bus.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/sec-core.c