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: Mon, 12 Jan 2015 20:45:23 +0800	[thread overview]
Message-ID: <CAOVJa8H1JsarfphiWmTEw8MsJUxDcYi=c5GPJzvbvhziAiDcXA@mail.gmail.com> (raw)
In-Reply-To: <CAOVJa8HHwa-ZmwqgBozVuwWUZaBiVHb3-81sn3tOOp0_x5HNGw@mail.gmail.com>

hi alan:
> I found the power/runtime_usage = 2 when device plug in and do nothing.
> Except update_autosuspend will increase runtime_usage, is there any
> function will increase it when we did not enable runtime
> suspend/resume?
We found the runtime_usage will be 2 after calling usb_new_device.
in usb_new_device,
        pm_runtime_set_active(&udev->dev);
        pm_runtime_get_noresume(&udev->dev);  // after calling left
function, runtime_usage =1
        pm_runtime_use_autosuspend(&udev->dev);
        pm_runtime_enable(&udev->dev);

       /* By default, forbid autosuspend for all devices.  It will be
        * allowed for hubs during binding.
        */
       usb_disable_autosuspend(udev); // after calling left function,
runtime_usage =2

Under what circumstance, the runtime_usage will be 1 to let "echo auto
> power/control" work?
appreciate your kind help,

  reply	other threads:[~2015-01-12 12:45 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 [this message]
2015-01-12 15:18       ` Alan Stern
2015-01-13  9:35         ` vichy
2015-01-13 12:11           ` vichy
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='CAOVJa8H1JsarfphiWmTEw8MsJUxDcYi=c5GPJzvbvhziAiDcXA@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.