Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Sometimes can't correctly resume from suspend #20

Closed
roman-yepishev opened this Issue Jun 20, 2013 · 2 comments

Comments

Projects
None yet
1 participant
Owner

roman-yepishev commented Jun 20, 2013

Pastebin of kmsg from zabulus - http://pastebin.com/iv39Qhu4
Seemingly relevant entries:

[50063.509294] Restarting tasks ... done.
[50063.564677] suspend: exit suspend, ret = -16 (2013-06-20 08:34:13.518791272 UTC)
[50063.564761] active wake lock PowerManagerService
[50063.564813] suspend: abort suspend
[50063.938229] suspend: enter suspend
[50063.938259] PM: Syncing filesystems ... done.
[50064.058195] Freezing user space processes ... (elapsed 0.20 seconds) done.
[50064.264935] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
[50064.265961] Suspending console(s) (use no_console_suspend to debug)
[50064.276271] power_suspend_late return 0
[50064.277507] wakeup wake lock: wlan_wake
[50064.367319] Restarting tasks ... done.
[50064.386483] suspend: exit suspend, ret = 0 (2013-06-20 08:34:23.521311458 UTC)
[50064.386519] active wake lock alarm_rtc, time left 98
[50064.386537] suspend: abort suspend
[50067.069070] __ratelimit: 5 callbacks suppressed
[50067.069137] dhdsdio_htclk: HT Avail request error: -35
[50067.087707] dhd_bus_stop: FAILED REGISTER WRITE, LINE 2551
[50067.105403] dhd_bus_stop: Failed to force clock for F2: err -35
[50067.143970] dhd_bus_stop: FAILED REGISTER WRITE, LINE 2574
[50067.267605] salsa_wifi_power: Wifi Power OFF
[50067.269800] wifi_power_param_set: previous salsa_wifi_power_state=0
[50067.377631] wifi_set_carddetect: 0
[50067.377748] salsa_wifi_power: Wifi Power OFF
[50067.377808] wifi_power_param_set: current wifi_power_state=0
[50067.419959] mmc1: card 0001 removed
[50068.027582] wake lock mmc_delayed_work, expired
[50068.148562] suspend: enter suspend
Owner

roman-yepishev commented Jun 24, 2013

After 9d6a71c I got quite a similar lockup - no touchscreen interaction, but GPIO power key did wake up the device, although AVR powerup did not trigger an interrupt.

Logs were full of this:

<3>[12213.084759] [ISL] i2c_read --> Send reg. info error
<3>[12213.186947] msm_i2c msm_i2c.0: Bus still busy, status 2100, intf 100
<3>[12213.186973] msm_i2c msm_i2c.0: Error waiting for notbusy
<3>[12213.308305] msm_i2c msm_i2c.0: Bus still busy, status 2100, intf 100
<3>[12213.308332] msm_i2c msm_i2c.0: Error waiting for notbusy
<3>[12213.409758] msm_i2c msm_i2c.0: Bus still busy, status 2100, intf 100
<3>[12213.409782] msm_i2c msm_i2c.0: Error waiting for notbusy
E/Ms3CSensor(   69): Ms3AxesDrvMsInit failed[-5]
W/Ms3CSensor(   69): Ms3CSensor::initialize() failed. retry

I suppose this is happening on resume because all the devices get queried at the same time - ISL, AUO TS, MS3C/SMB380, AVR KP, which can create a lot of traffic on the bus and eventually it switches to status 0x2100 (which is actually not documented) and requires a hard reset.

The I2C devices defined in board file are:

  • MT9P012 - Camera
  • TI TPS65023 - Power IC
  • TI BQ27210 - Battery fuel gauge
  • AUO H353 TS - Touchscreen
  • AVR uC - keypad LEDS/keypad input/LCD LED
  • Bosch SMB380 - Accelerometer
  • Intersil ISL29018 - Ambient light sensor
  • TI TCA6507 - Top LED driver
  • TI TPA2018 - Speaker amplifier

Some of these may not be a good citizen.

@ghost ghost assigned roman-yepishev Jun 24, 2013

@roman-yepishev roman-yepishev added a commit that referenced this issue Jul 3, 2013

@roman-yepishev roman-yepishev msm-i2c: Drop Acer code for suspend/transaction locking
Adapter reinitialization on 0x2100 i2c controller status seems to be required.
In case adapter actually ends up in this state, print an entry with [bug #20]
prefix.
e754957
Owner

roman-yepishev commented Jul 12, 2013

After adding SMB380 and ISL29018 drivers to android-msm-2.6.35 I started getting the same issue. Will test the devices separately to see which one is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment