From: Rajat Jain Date: Mon, 25 Oct 2021 21:35:30 +0000 (-0700) Subject: i2c: enable async suspend/resume for i2c adapters X-Git-Tag: v6.1-rc5~2217^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d320ec7acc83a66cb1367f6cdee53177f07a9f5d;p=platform%2Fkernel%2Flinux-starfive.git i2c: enable async suspend/resume for i2c adapters Enable async suspend/resume of i2c adapters. It enormously helps with reducing the resume time of systems (as much as 20%-40%) where I2C devices can take significant time (100s of ms) to resume. Signed-off-by: Rajat Jain Tested-by: Jarkko Nikula Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index f193f90..457504a 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1577,6 +1577,7 @@ static int i2c_register_adapter(struct i2c_adapter *adap) if (res) goto out_reg; + device_enable_async_suspend(&adap->dev); pm_runtime_no_callbacks(&adap->dev); pm_suspend_ignore_children(&adap->dev, true); pm_runtime_enable(&adap->dev);