On 09/26/2018 02:40 AM, Hans de Goede wrote: > Hi, > > On 25-09-18 22:47, Grygorii Strashko wrote: >> >> >> On 09/23/2018 09:00 AM, Hans de Goede wrote: >>> On most Intel Bay- and Cherry-Trail systems the PMIC is connected >>> over I2C >>> and the PMIC is accessed through various means by the _PS0 and _PS3 ACPI >>> methods (power on / off methods) of various devices. >>> >>> This leads to suspend/resume ordering problems where a device may be >>> resumed and get its _PS0 method executed before the I2C controller is >>> resumed. On Cherry Trail this leads to errors like these: >>> >>> i2c_designware 808622C1:06: controller timed out >>> ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion] >>> ACPI Error: Method parse/execution failed \_SB.P18W._ON, AE_ERROR >>> video LNXVIDEO:00: Failed to change power state to D0 >>> >> >> Hm. There should some dependency from PM domain (or smth. like this) >> which, in turn should depends from i2c. > > Yes and I've a patchset pending to fix the dependency missing in this > specific case. But there might be other cases where we miss the dependency > the idea behind this patch / behind the generic solution Wolfram is > working on which will replace this patch / is to make it easier to > catch/debug cases where such a dependency is missing. Thanks for explanation, It might be good to update commit message and pay attention that this is not just w/a, but debug instrument. Note. it will help catch not only dependency issues, but also buggy drivers who left workers/kthreads/irq threads enabled while suspending and which might run on other CPUs in parallel with suspend process until suspend_enter()->disable_nonboot_cpus() call. -- regards, -grygorii