Re: [RESEND/PATCH] i2c: pxa: Use suspend() and resume() instead of the _noirq hooks
> suspend/resume order depends on probe ordering, so with deferred probe, > the probe ordering might be right, but it should be thoroughly tested. Thanks a lot for the input here, Kevin! signature.asc Description: Digital signature
Re: [RESEND/PATCH] i2c: pxa: Use suspend() and resume() instead of the _noirq hooks
Ezequiel Garcia writes: > On 10/20/2014 06:07 PM, Kevin Hilman wrote: >> Ezequiel Garcia writes: >> >>> The _noirq were previously chosen to make sure all the users of the >>> adapter were suspended by the time the adapter itself enters the >>> suspended state. >>> >>> The {suspend,resume}_noirq usage was converted from an earlier >>> implementation based on suspend_late and resume_early on this commit: >>> >>> commit 57f4d4f1b72983f8c76e2f232e064730aeffe599 >>> Author: Magnus Damm >>> Date: Wed Jul 8 13:22:39 2009 +0200 >>> >>> I2C: Rework i2c-pxa suspend_late()/resume_early() >>> >>> However, all the I2C devices are probed as children of its I2C adapter, >>> and hence the device model guarantees they are suspended before its parent, >>> and >>> resumed after it. >>> >>> In other words, there's no need to use the _noirq hooks to get a >>> suspend/resume >>> device/adapter order. >> >> Are you sure *really* about this? >> > > Hm, now you made me doubt. Good. :) >> It's usally not the children that are the problem here. It's usually >> some other driver trying to use an I2C device e.g. MMC changing voltage >> using an I2C-based PMIC during its suspend process. >> > > So we can't know for sure if using suspend/resume is going to work OK for > a I2C adapter? > > There might be some use of it that can't be accurately modeled in the > device model. Correct. > I.e., the above example is a dependency of MMC on the I2C being suspended > after him, but right now there's no way to model such relationship. That's right. That's why many i2c drivers are using the late/early callbacks for suspend/resume. suspend/resume order depends on probe ordering, so with deferred probe, the probe ordering might be right, but it should be thoroughly tested. Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND/PATCH] i2c: pxa: Use suspend() and resume() instead of the _noirq hooks
On 10/20/2014 06:07 PM, Kevin Hilman wrote: > Ezequiel Garcia writes: > >> The _noirq were previously chosen to make sure all the users of the >> adapter were suspended by the time the adapter itself enters the >> suspended state. >> >> The {suspend,resume}_noirq usage was converted from an earlier >> implementation based on suspend_late and resume_early on this commit: >> >> commit 57f4d4f1b72983f8c76e2f232e064730aeffe599 >> Author: Magnus Damm >> Date: Wed Jul 8 13:22:39 2009 +0200 >> >> I2C: Rework i2c-pxa suspend_late()/resume_early() >> >> However, all the I2C devices are probed as children of its I2C adapter, >> and hence the device model guarantees they are suspended before its parent, >> and >> resumed after it. >> >> In other words, there's no need to use the _noirq hooks to get a >> suspend/resume >> device/adapter order. > > Are you sure *really* about this? > Hm, now you made me doubt. > It's usally not the children that are the problem here. It's usually > some other driver trying to use an I2C device e.g. MMC changing voltage > using an I2C-based PMIC during its suspend process. > So we can't know for sure if using suspend/resume is going to work OK for a I2C adapter? There might be some use of it that can't be accurately modeled in the device model. I.e., the above example is a dependency of MMC on the I2C being suspended after him, but right now there's no way to model such relationship. -- Ezequiel Garcia, VanguardiaSur www.vanguardiasur.com.ar signature.asc Description: OpenPGP digital signature
Re: [RESEND/PATCH] i2c: pxa: Use suspend() and resume() instead of the _noirq hooks
Ezequiel Garcia writes: > The _noirq were previously chosen to make sure all the users of the > adapter were suspended by the time the adapter itself enters the > suspended state. > > The {suspend,resume}_noirq usage was converted from an earlier > implementation based on suspend_late and resume_early on this commit: > > commit 57f4d4f1b72983f8c76e2f232e064730aeffe599 > Author: Magnus Damm > Date: Wed Jul 8 13:22:39 2009 +0200 > > I2C: Rework i2c-pxa suspend_late()/resume_early() > > However, all the I2C devices are probed as children of its I2C adapter, > and hence the device model guarantees they are suspended before its parent, > and > resumed after it. > > In other words, there's no need to use the _noirq hooks to get a > suspend/resume > device/adapter order. Are you sure *really* about this? It's usally not the children that are the problem here. It's usually some other driver trying to use an I2C device e.g. MMC changing voltage using an I2C-based PMIC during its suspend process. Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html