Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1273556

Re: [PATCH v11 4/8] Input: goodix - add power management support

From Dmitry Torokhov <dmitry.torokhov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v11 4/8] Input: goodix - add power management support
Date 2015-11-19 23:40 +0100
Message-ID <qwG1X-74P-5@gated-at.bofh.it> (permalink)
References <qwwvE-Oq-9@gated-at.bofh.it> <qwwFk-RT-15@gated-at.bofh.it> <qwC82-4vu-15@gated-at.bofh.it> <qwFIC-6YF-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Nov 19, 2015 at 2:18 PM, Rafael J. Wysocki <rafael@kernel.org> wrote:
> Hi,
>
> On Thu, Nov 19, 2015 at 7:24 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.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?

I was thinking about dpm watchdog that will panic the system if
suspend takes too long. Hmm, this is debug facility and the default
timeout is 60 seconds, so I guess we can ignore my concern.

>
>> 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.

I see.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v11 0/8] Goodix touchscreen enhancements Irina Tirdea <irina.tirdea@intel.com> - 2015-11-19 13:30 +0100
  [PATCH v11 1/8] Input: goodix - use actual config length for each device type Irina Tirdea <irina.tirdea@intel.com> - 2015-11-19 13:40 +0100
  [PATCH v11 4/8] Input: goodix - add power management support Irina Tirdea <irina.tirdea@intel.com> - 2015-11-19 13:40 +0100
    Re: [PATCH v11 4/8] Input: goodix - add power management support Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-11-19 19:30 +0100
      Re: [PATCH v11 4/8] Input: goodix - add power management support "Rafael J. Wysocki" <rafael@kernel.org> - 2015-11-19 23:20 +0100
        Re: [PATCH v11 4/8] Input: goodix - add power management support Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-11-19 23:40 +0100
    Re: [PATCH v11 4/8] Input: goodix - add power management support Bastien Nocera <hadess@hadess.net> - 2015-11-23 17:40 +0100

csiph-web