Skip to contentSkip to conversation

i2c: enable async suspend/resume on i2c devices

PATCH In review Derek Basehore 3 participants 5 messages Jul 26, 2018 – Aug 14, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: enable async suspend/resume on i2c devices

This enables the async suspend property for i2c devices. This reduces the suspend/resume time considerably on platforms with multiple i2c devices (such as a trackpad or touchscreen).

---
 drivers/i2c/i2c-core-base.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/i2c-core-base.c +1 -0
index 1ba40bb2b966..3382bb7e1dcc 100644
@@ -749,6 +749,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, info);
 
 	if (info->properties) {
Signature · 1 line
2.18.0.345.g5c9ce644c3-goog
#1 lore raw
Quoted 3 lines · Derek Basehore

This enables the async suspend property for i2c devices. This reduces the suspend/resume time considerably on platforms with multiple i2c devices (such as a trackpad or touchscreen).

How did you test this?

Especially on Chromebooks based on Intel Cherrytrail / Braswell platforms, they have a painful PMIC vs. OS design solution.

+Cc: Hans, who did a lot in this area.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw

Hi,

Quoted 11 lines · Andy Shevchenko
Quoted 3 lines · Derek Basehore

This enables the async suspend property for i2c devices. This reduces the suspend/resume time considerably on platforms with multiple i2c devices (such as a trackpad or touchscreen).

How did you test this?

Especially on Chromebooks based on Intel Cherrytrail / Braswell platforms, they have a painful PMIC vs. OS design solution.

+Cc: Hans, who did a lot in this area.

We disable suspend of the i2c controller for the i2c-bus to which the PMIc is connected on these platforms, so I do not expect this to cause any new issues.

But this is something to keep an eye on,

Regards,

Hans

#3 lore raw
Quoted 11 lines · Hans de Goede

Hi,

Quoted 1 line · Andy Shevchenko

On Fri, Jul 27, 2018 at 1:55 AM, Derek Basehore <[email protected]>

Quoted 5 lines · wrote:
Quoted 3 lines

This enables the async suspend property for i2c devices. This reduces the suspend/resume time considerably on platforms with multiple i2c devices (such as a trackpad or touchscreen).

How did you test this?

It was tested on Apollolake Chromebook devices.

Quoted 17 lines
Quoted 5 lines

Especially on Chromebooks based on Intel Cherrytrail / Braswell platforms, they have a painful PMIC vs. OS design solution.

+Cc: Hans, who did a lot in this area.

We disable suspend of the i2c controller for the i2c-bus to which the PMIc is connected on these platforms, so I do not expect this to cause any new issues.

But this is something to keep an eye on,

Regards,

Hans

#4 lore raw
In reply to Derek Basehore

+Cc: Jarkko

Quoted 24 lines · Derek Basehore

This enables the async suspend property for i2c devices. This reduces the suspend/resume time considerably on platforms with multiple i2c devices (such as a trackpad or touchscreen).

---
 drivers/i2c/i2c-core-base.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/i2c-core-base.c +1 -1
index 1ba40bb2b966..3382bb7e1dcc 100644
@@ -749,6 +749,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, info);
 
        if (info->properties) {
--

2.18.0.345.g5c9ce644c3-goog

Signature · 2 lines
With Best Regards,
Andy Shevchenko