All of lore.kernel.org
 help / color / mirror / Atom feed
From: vichy <vichy.kuo@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pm@vger.kernel.org
Subject: Re: Auto suspend not working on usb hid devices
Date: Tue, 13 Jan 2015 20:11:19 +0800	[thread overview]
Message-ID: <CAOVJa8H9+tDB-arQ8UFJzkOr7W3uhkStSHCxHo1UV+QegqkuZw@mail.gmail.com> (raw)
In-Reply-To: <CAOVJa8GkYnT3MV-jgLhoagUL1N3GhTGooho=pbVr7LcUUWXwvQ@mail.gmail.com>

hi alan:


>> The pm_runtime_put_async_autosuspend() call decrements runtime_usage
>> back to 1.
> I purposely dump runtime_usage after calling
> pm_runtime_put_async_autosuspend(), but the value is still 2.
> I found the value increase/decrease like below:
> pm_runtime_get_noresume => 1
> usb_disable_autosuspend => 2
> usb_probe_device
>     -> usb_autoresume_device => 3
> usb_set_configuration
>     ->usb_autoresume_device =>4
> usb_set_configuration
>     ->usb_autosuspend_device =>3
> pm_runtime_put_sync_autosuspend => 2
>
> so even after calling pm_runtime_put_async_autosuspend() at end fo
> usb_new_device()
> the runtime_usage will not be back to 1

is there any rule for us to determine where we add those
usb_autoresume_device/usb_autosuspend_device in usb driver?

Sincerely appreciate your help,

  reply	other threads:[~2015-01-13 12:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-11 13:23 Auto suspend not working on usb hid devices vichy
2015-01-11 15:53 ` Alan Stern
2015-01-12 10:45   ` vichy
2015-01-12 12:45     ` vichy
2015-01-12 15:18       ` Alan Stern
2015-01-13  9:35         ` vichy
2015-01-13 12:11           ` vichy [this message]
2015-01-13 15:37           ` Alan Stern
2015-01-16 11:21             ` vichy
2015-01-16 15:23               ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOVJa8H9+tDB-arQ8UFJzkOr7W3uhkStSHCxHo1UV+QegqkuZw@mail.gmail.com \
    --to=vichy.kuo@gmail.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.