Re: [PATCH v2 6/6] Input: cyttsp5 - implement proper sleep and wakeup procedures
From: Maximilian Weigand
Date: Tue May 02 2023 - 10:22:01 EST
Hi,
On 02.05.23 02:22, Dmitry Torokhov wrote:
> On Mon, May 01, 2023 at 01:30:10PM +0200, Maximilian Weigand wrote:
>> struct cyttsp5 {
>> struct device *dev;
>> struct completion cmd_done;
>> + struct completion cmd_command_done;
>
> Why do we need separate comletion? Do you observe some additional
> traffic from the controller when powering it off and on?
I checked and indeed there is no overlap in the different command types,
so one completion will work. I will reformat correspondingly.
>> +static int __maybe_unused cyttsp5_suspend(struct device *dev)
>> +{
>> + struct cyttsp5 *ts = dev_get_drvdata(dev);
>> +
>> + if (!ts->is_wakeup_source)
>
> I believe the idiomatic way to check this is to call
> device_may_wakeup().
Thanks for pointing that out. I will fix that, too.
Thanks for the feedback and best regards
Maximilian