Re: [PATCH 0/2] i2c: proper RuntimePM for the adapter device
On Fri, Dec 25, 2015 at 3:55 AM, Wolfram Sang wrote: >> I think the below drivers >> >> drivers/i2c/busses/i2c-at91.c >> drivers/i2c/busses/i2c-designware-core.c >> drivers/i2c/busses/i2c-designware-platdrv.c >> drivers/i2c/busses/i2c-rcar.c >> drivers/i2c/busses/i2c-sh_mobile.c >> drivers/i2c/busses/i2c-hix5hd2.c >> drivers/i2c/busses/i2c-nomadik.c >> drivers/i2c/busses/i2c-omap.c >> drivers/i2c/busses/i2c-qup.c >> drivers/i2c/busses/i2c-s3c2410.c > > They use RuntimePM on their platform device, not on the adapter device > AFAICS. > Indeed my bad. -- 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: [PATCH 0/2] i2c: proper RuntimePM for the adapter device
> I think the below drivers > > drivers/i2c/busses/i2c-at91.c > drivers/i2c/busses/i2c-designware-core.c > drivers/i2c/busses/i2c-designware-platdrv.c > drivers/i2c/busses/i2c-rcar.c > drivers/i2c/busses/i2c-sh_mobile.c > drivers/i2c/busses/i2c-hix5hd2.c > drivers/i2c/busses/i2c-nomadik.c > drivers/i2c/busses/i2c-omap.c > drivers/i2c/busses/i2c-qup.c > drivers/i2c/busses/i2c-s3c2410.c They use RuntimePM on their platform device, not on the adapter device AFAICS. signature.asc Description: PGP signature
Re: [PATCH 0/2] i2c: proper RuntimePM for the adapter device
> >> Also maybe we can add a flag that the driver enables. >> that way for a short period till the driver removes the call >> the double call is not there. > > The only driver I found was the s3c2410 and I fixed it. Is there another > one? Then, I'd update my series because I want a consistent state in one > go. > I think the below drivers drivers/i2c/busses/i2c-at91.c drivers/i2c/busses/i2c-designware-core.c drivers/i2c/busses/i2c-designware-platdrv.c drivers/i2c/busses/i2c-rcar.c drivers/i2c/busses/i2c-sh_mobile.c drivers/i2c/busses/i2c-hix5hd2.c drivers/i2c/busses/i2c-nomadik.c drivers/i2c/busses/i2c-omap.c drivers/i2c/busses/i2c-qup.c drivers/i2c/busses/i2c-s3c2410.c -- 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
[PATCH 2/2] i2c: enable i2c adapter to suspend/resume asynchronously
Now, PM core supports asynchronous suspend/resume mode for devices during system suspend/resume, and the power state transition of one device may be completed in separate kernel thread. PM core ensures all power state transition dependency between devices. This patch enables i2c adapters to suspend/resume asynchronously. This will take advantage of multicore and improve system suspend/resume speed. After enabling all i2c devices, i2c adapters and i2c controllers on ASUS T100TA tablet, the system suspend-to-idle time is reduced to about 510ms from 750ms, and the system resume time is reduced to about 790ms from 900ms. Signed-off-by: Zhonghui Fu --- drivers/i2c/i2c-core.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index ba8eb08..72d5466 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1564,6 +1564,8 @@ static int i2c_register_adapter(struct i2c_adapter *adap) pm_runtime_no_callbacks(&adap->dev); + device_enable_async_suspend(&adap->dev); + #ifdef CONFIG_I2C_COMPAT res = class_compat_create_link(i2c_adapter_compat_class, &adap->dev, adap->dev.parent); -- 1.7.1 -- 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
[PATCH 1/2] i2c: enable i2c device to suspend/resume asynchronously
Now, PM core supports asynchronous suspend/resume mode for devices during system suspend/resume, and the power state transition of one device may be completed in separate kernel thread. PM core ensures all power state transition dependency between devices. This patch enables i2c devices to suspend/resume asynchronously. This will take advantage of multicore and improve system suspend/resume speed. After enabling all i2c devices, i2c adapters and i2c controllers on ASUS T100TA tablet, the system suspend-to-idle time is reduced to about 510ms from 750ms, and the system resume time is reduced to about 790ms from 900ms. Signed-off-by: Zhonghui Fu --- drivers/i2c/i2c-core.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index ba8eb08..4ff620e 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1072,6 +1072,7 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info) client->dev.of_node = info->of_node; client->dev.fwnode = info->fwnode; + device_enable_async_suspend(&client->dev); i2c_dev_set_name(adap, client); status = device_register(&client->dev); if (status) -- 1.7.1 -- 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
[PATCH] i2c/designware: enable i2c controller to suspend/resume asynchronously
Now, PM core supports asynchronous suspend/resume mode for devices during system suspend/resume, and the power state transition of one device may be completed in separate kernel thread. PM core ensures all power state transition dependency between devices. This patch enables designware i2c controllers to suspend/resume asynchronously. This will take advantage of multicore and improve system suspend/resume speed. After enabling all i2c devices, i2c adapters and i2c controllers on ASUS T100TA tablet, the system suspend-to-idle time is reduced to about 510ms from 750ms, and the system resume time is reduced to about 790ms from 900ms. Signed-off-by: Zhonghui Fu --- drivers/i2c/busses/i2c-designware-platdrv.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 6b00061..395130b 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -230,6 +230,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) } adap = &dev->adapter; + device_enable_async_suspend(&pdev->dev); adap->owner = THIS_MODULE; adap->class = I2C_CLASS_DEPRECATED; ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev)); -- 1.7.1 -- 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: [PATCH 0/2] i2c: proper RuntimePM for the adapter device
> > RuntimePM for the logical adapter device should be handled in a central > > place > > by the core, and not by drivers. This series does exactly that. > > This is good idea. Thanks! > Also maybe we can add a flag that the driver enables. > that way for a short period till the driver removes the call > the double call is not there. The only driver I found was the s3c2410 and I fixed it. Is there another one? Then, I'd update my series because I want a consistent state in one go. signature.asc Description: Digital signature