Re: [PATCH] i2c: enable async suspend/resume on i2c devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 27, 2020 at 04:19:51PM +0100, Ricardo Cañuelo wrote:
> 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).
> 
> (am from https://patchwork.ozlabs.org/patch/949922/)
> 
> Signed-off-by: Derek Basehore <dbasehore@xxxxxxxxxxxx>
> Reviewed-on: https://chromium-review.googlesource.com/1152411
> Tested-by: Venkateswarlu V Vinjamuri <venkateswarlu.v.vinjamuri@xxxxxxxxx>
> Reviewed-by: Venkateswarlu V Vinjamuri <venkateswarlu.v.vinjamuri@xxxxxxxxx>
> Reviewed-by: Justin TerAvest <teravest@xxxxxxxxxxxx>
> Signed-off-by: Guenter Roeck <groeck@xxxxxxxxxxxx>
> Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@xxxxxxxxxxxxx>
> ---

Adding linux-pm to CC. I don't know much about internals of async
suspend. Is there a guide like "what every maintainer needs to know
about"?

> This patch was originally created for chromeos some time ago and I'm
> evaluating if it's a good candidate for upstreaming.
> 
> By the looks of it I think it was done with chromebooks in mind, but
> AFAICT this would impact every i2c client in every platform, so I'd like
> to know your opinion about it.
> 
> As far as I know there was no further investigation or testing on it, so
> I don't know if it was tested on any other hardware.
> 
> Best,
> Ricardo
> 
>  drivers/i2c/i2c-core-base.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> index cefad0881942..643bc0fe0281 100644
> --- a/drivers/i2c/i2c-core-base.c
> +++ b/drivers/i2c/i2c-core-base.c
> @@ -769,6 +769,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->properties) {
> -- 
> 2.18.0
> 

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux