[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0iPwohZt+N1quhnCq0zj+HSROaA_8nOTFV_zisYCa2bRw@mail.gmail.com>
Date: Thu, 19 Nov 2015 23:18:06 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Irina Tirdea <irina.tirdea@...el.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Bastien Nocera <hadess@...ess.net>,
Aleksei Mamlin <mamlinav@...il.com>,
Karsten Merker <merker@...ian.org>,
linux-input@...r.kernel.org, Mark Rutland <mark.rutland@....com>,
Rob Herring <robh+dt@...nel.org>,
Octavian Purdila <octavian.purdila@...el.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH v11 4/8] Input: goodix - add power management support
Hi,
On Thu, Nov 19, 2015 at 7:24 PM, Dmitry Torokhov
<dmitry.torokhov@...il.com> wrote:
> On Thu, Nov 19, 2015 at 02:26:37PM +0200, Irina Tirdea wrote:
>> Implement suspend/resume for goodix driver.
>>
[cut]
>>
>> +static int __maybe_unused goodix_suspend(struct device *dev)
>> +{
>> + struct i2c_client *client = to_i2c_client(dev);
>> + struct goodix_ts_data *ts = i2c_get_clientdata(client);
>> + int error;
>> +
>> + /* We need gpio pins to suspend/resume */
>> + if (!ts->gpiod_int || !ts->gpiod_rst)
>> + return 0;
>> +
>> + wait_for_completion(&ts->firmware_loading_complete);
>
> This is not that nice as it may lead to angry splats from the PM core if
> firmware loading takes too long and we start suspending before it
> completes.
What exactly do you mean? The suspend watchdog or something else?
> Rafael, if we issue pm_stay_awake() before requesting firmware and
> pm_relax() once it is done, will this prevent the current suspend
> timeouts?
pm_stay_awake() only works if the checking of wakeup sources is
enabled which generally depends on what user space does.
Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists