On Thu, 21 Feb 2019 22:04:45 +0100 Andreas Kemnade <andreas@xxxxxxxxxxxx> wrote: > On Tue, 5 Feb 2019 13:15:05 +0100 > Wolfram Sang <wsa@xxxxxxxxxxxxx> wrote: > > > On Thu, Jan 10, 2019 at 07:59:16AM -0800, Tony Lindgren wrote: > > > We currently get the following error with pixcir_ts driver during a > > > suspend resume cycle: > > > > > > omap_i2c 4802a000.i2c: controller timed out > > > pixcir_ts 1-005c: pixcir_int_enable: can't read reg 0x34 : -110 > > > pixcir_ts 1-005c: Failed to disable interrupt generation: -110 > > > pixcir_ts 1-005c: Failed to stop > > > dpm_run_callback(): pixcir_i2c_ts_resume+0x0/0x98 > > > [pixcir_i2c_ts] returns -110 > > > PM: Device 1-005c failed to resume: error -110 > > > > > > And at least am437x based devices with pixcir_ts will fail to resume > > > to a touchscreen that is configured as the wakeup-source in device > > > tree for these devices. > > > > > > This is because pixcir_ts tries to reconfigure it's registers for > > > noirq suspend which fails. This also leaves i2c-omap in enabled state > > > for suspend. > > > > > > Let's fix the pixcir_ts issue and make sure i2c-omap is suspended by > > > adding SET_NOIRQ_SYSTEM_SLEEP_PM_OPS. In the long run the solution > > > seems to be to move the handling of suspended adapters to the i2c > > > core, but that still needs some more work. > > > > > > Let's also get rid of some ifdefs while at it and replace them with > > > __maybe_unused as SET_RUNTIME_PM_OPS and SET_NOIRQ_SYSTEM_SLEEP_PM_OPS > > > already deal with the various PM Kconfig options. > > > > > > Cc: Dave Gerlach <d-gerlach@xxxxxx> > > > Cc: Grygorii Strashko <grygorii.strashko@xxxxxx> > > > Cc: Keerthy <j-keerthy@xxxxxx> > > > Cc: Tero Kristo <t-kristo@xxxxxx> > > > Reported-by: Keerthy <j-keerthy@xxxxxx> > > > Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx> > > > > Applied to for-current, thanks! > > > this one breaks my system: gta04 (dm3730 + twl4030) > loaded a minimal set of things: > > root@(none):/# rtcwake -s 10 -m mem > rtcwake: wakeup from "mem" using /dev/rtc0 at Sat Jan 1 00:04:01 2000 > [ 50.857360] PM: suspend entry (deep) > [ 50.861480] PM: Syncing filesystems ... done. > [ 50.881561] Freezing user space processes ... (elapsed 0.003 seconds) done. > [ 50.893493] OOM killer disabled. > [ 50.896911] Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done. > [ 50.908050] printk: Suspending console(s) (use no_console_suspend to debug) > [ 50.978393] Disabling non-boot CPUs ... > [ 50.978485] Successfully put all powerdomains to target state > [ 50.986816] twl: Read failed (mod 1, reg 0x01 count 1) > [ 50.986846] twl4030: I2C error -13 reading PIH ISR > [ 50.986907] twl: Read failed (mod 1, reg 0x01 count 1) > [ 50.986907] twl4030: I2C error -13 reading PIH ISR > [ 50.986968] twl: Read failed (mod 1, reg 0x01 count 1) > [ 50.986968] twl4030: I2C error -13 reading PIH ISR > [ 50.987030] twl: Read failed (mod 1, reg 0x01 count 1) > was a bit more patient: after some minutes, resume finishes. Regards, Andreas
Attachment:
pgpMARuBjlK6q.pgp
Description: OpenPGP digital signature