Skip to content

Commit

Permalink
i2c: enable async suspend/resume on i2c client devices
Browse files Browse the repository at this point in the history
This enables the async suspend for i2c client devices. This reduces
the suspend/resume time considerably on platforms where i2c devices
can take a lot of time (hundreds of ms) to resume.

Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Signed-off-by: Rajat Jain <rajatja@google.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
  • Loading branch information
Derek Basehore authored and Wolfram Sang committed Nov 29, 2021
1 parent d320ec7 commit 172d931
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/i2c/i2c-core-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,7 @@ i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *inf
client->dev.of_node = of_node_get(info->of_node);
client->dev.fwnode = info->fwnode;

device_enable_async_suspend(&client->dev);
i2c_dev_set_name(adap, client, info);

if (info->swnode) {
Expand Down

0 comments on commit 172d931

Please sign in to comment.