Bug 200861 - baytrail axp288 axp20x-pek : power button irq firing continuously after freeze
Summary: baytrail axp288 axp20x-pek : power button irq firing continuously after freeze
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: I2C (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: Hans de Goede
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-19 13:37 UTC by Rafael Gandolfi
Modified: 2018-08-31 00:06 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.18 mainline
Subsystem:
Regression: No
Bisected commit-id:


Attachments
clear_i2c_poknirq (57 bytes, text/plain)
2018-08-19 13:37 UTC, Rafael Gandolfi
Details
config-4.18.0-custom (194.33 KB, text/x-mpsub)
2018-08-19 13:38 UTC, Rafael Gandolfi
Details
dmesg (40.00 KB, text/plain)
2018-08-19 13:39 UTC, Rafael Gandolfi
Details
lsmod (3.65 KB, text/plain)
2018-08-19 13:39 UTC, Rafael Gandolfi
Details
powerstat.RcD.001.before_sleep (6.98 KB, text/plain)
2018-08-19 13:39 UTC, Rafael Gandolfi
Details
powerstat.RcD.002.after_sleep_and_pwr_btn_press_release (6.98 KB, text/plain)
2018-08-19 13:39 UTC, Rafael Gandolfi
Details
proc_int.001.at_boot (4.50 KB, text/plain)
2018-08-19 13:40 UTC, Rafael Gandolfi
Details
proc_int.002.after_pwr_btn_press (4.50 KB, text/plain)
2018-08-19 13:40 UTC, Rafael Gandolfi
Details
proc_int.003.after_pwr_btn_release (4.50 KB, text/plain)
2018-08-19 13:40 UTC, Rafael Gandolfi
Details
proc_int.004.after_sleep_and_wake_up_by_pwr_btn_press_release (4.50 KB, text/plain)
2018-08-19 13:40 UTC, Rafael Gandolfi
Details
proc_int.005.after_another_pwr_btn_press (4.50 KB, text/plain)
2018-08-19 13:40 UTC, Rafael Gandolfi
Details
proc_int.006.after_another_pwr_btn_release (4.50 KB, text/plain)
2018-08-19 13:41 UTC, Rafael Gandolfi
Details
proc_int.007.doing_nothing (4.50 KB, text/plain)
2018-08-19 13:41 UTC, Rafael Gandolfi
Details
proc_int.008.doing_nothing_longer (4.50 KB, text/plain)
2018-08-19 13:41 UTC, Rafael Gandolfi
Details
sys_kernel_debug_pmc_atom_sleep_state.001.before_sleep (108 bytes, text/plain)
2018-08-19 13:42 UTC, Rafael Gandolfi
Details
sys_kernel_debug_pmc_atom_sleep_state.002.after_sleep (126 bytes, text/plain)
2018-08-19 13:42 UTC, Rafael Gandolfi
Details
uname.a (100 bytes, text/plain)
2018-08-19 13:42 UTC, Rafael Gandolfi
Details
[PATCH] i2c: designware: Re-init controllers with pm_disabled set on resume (4.58 KB, patch)
2018-08-29 13:10 UTC, Hans de Goede
Details | Diff

Description Rafael Gandolfi 2018-08-19 13:37:58 UTC
Created attachment 277943 [details]
clear_i2c_poknirq

Since v4.18, SOiX is working for my Meegopad T02 but when waking up, the irq for the power button is behaving stangely.

1/normal behaviour :
power button press		: 1 irq at axp20x-pek-dbf
power button release	: 1 irq at axp20x-pek-dbr

2/after wakeup by pressing power button:
axp20x-pek-dbr increases by 1
axp20x-pek-dbf doesn't change

3/after freeze :
power button press		: 5000 irq/s at axp20x-pek-dbr, 0 irq at axp20x-pek-dbf
power button release	: nothing

After 3, if I try to freeze, it wakes up immediatly.

To stop the irq firing continuously I can unload/reload axp20x_pek module or clear the axp20x-pek-dbr interupt with i2cset.

Then I can freeze and when it wakes up it is in the 2/ state.

Note, that a long press (16s) to the power button halts the Meegopad T02, this behavior is not affected by the freeze.
Comment 1 Rafael Gandolfi 2018-08-19 13:38:42 UTC
Created attachment 277945 [details]
config-4.18.0-custom
Comment 2 Rafael Gandolfi 2018-08-19 13:39:01 UTC
Created attachment 277947 [details]
dmesg
Comment 3 Rafael Gandolfi 2018-08-19 13:39:20 UTC
Created attachment 277949 [details]
lsmod
Comment 4 Rafael Gandolfi 2018-08-19 13:39:36 UTC
Created attachment 277951 [details]
powerstat.RcD.001.before_sleep
Comment 5 Rafael Gandolfi 2018-08-19 13:39:48 UTC
Created attachment 277953 [details]
powerstat.RcD.002.after_sleep_and_pwr_btn_press_release
Comment 6 Rafael Gandolfi 2018-08-19 13:40:07 UTC
Created attachment 277955 [details]
proc_int.001.at_boot
Comment 7 Rafael Gandolfi 2018-08-19 13:40:19 UTC
Created attachment 277957 [details]
proc_int.002.after_pwr_btn_press
Comment 8 Rafael Gandolfi 2018-08-19 13:40:32 UTC
Created attachment 277959 [details]
proc_int.003.after_pwr_btn_release
Comment 9 Rafael Gandolfi 2018-08-19 13:40:44 UTC
Created attachment 277961 [details]
proc_int.004.after_sleep_and_wake_up_by_pwr_btn_press_release
Comment 10 Rafael Gandolfi 2018-08-19 13:40:56 UTC
Created attachment 277963 [details]
proc_int.005.after_another_pwr_btn_press
Comment 11 Rafael Gandolfi 2018-08-19 13:41:10 UTC
Created attachment 277965 [details]
proc_int.006.after_another_pwr_btn_release
Comment 12 Rafael Gandolfi 2018-08-19 13:41:22 UTC
Created attachment 277967 [details]
proc_int.007.doing_nothing
Comment 13 Rafael Gandolfi 2018-08-19 13:41:44 UTC
Created attachment 277969 [details]
proc_int.008.doing_nothing_longer
Comment 14 Rafael Gandolfi 2018-08-19 13:42:05 UTC
Created attachment 277971 [details]
sys_kernel_debug_pmc_atom_sleep_state.001.before_sleep
Comment 15 Rafael Gandolfi 2018-08-19 13:42:19 UTC
Created attachment 277973 [details]
sys_kernel_debug_pmc_atom_sleep_state.002.after_sleep
Comment 16 Rafael Gandolfi 2018-08-19 13:42:35 UTC
Created attachment 277975 [details]
uname.a
Comment 17 Hans de Goede 2018-08-29 13:10:38 UTC
Created attachment 278197 [details]
[PATCH] i2c: designware: Re-init controllers with pm_disabled set on resume

Thank you for bringing this to our attention, I believe that this patch fixes this.
Comment 18 Rafael Gandolfi 2018-08-29 14:14:06 UTC
Thank you for the patch, I've just tested it on top of v4.18 in cold boot and reboot conditions doing several 'freeze'/wake up in a row and it fixes the problem.

Note You need to log in before you can comment on or make changes to this bug.