linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Mayuresh Kulkarni <mkulkarni@opensource.cirrus.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: About usb_new_device() API
Date: Fri, 2 Aug 2019 12:27:26 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1908021221120.1645-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <1564760625.15747.9.camel@opensource.cirrus.com>

On Fri, 2 Aug 2019, Mayuresh Kulkarni wrote:

> Hi Alan,
> 
> Thanks a lot for clearing out the confusion.
> 
> Our USB device can operate in 2 mutually exclusive modes: one is normal
> composite USB audio mode and other is vendor specific HID device mode.
> 
> On the same platform (Android based):
> - When the device is in normal composite USB audio mode,
> "cat /sys/bus/usb/devices/.../power/control" show "auto".
> - When the device is in vendor specific HID device mode,
> "cat /sys/bus/usb/devices/.../power/control" show "on".
> 
> And hence as per your comment, I am unable to see USB-2.0 L2 for vendor
> specific HID device mode.
> 
> I guess I need to find out "who" is setting the /power/control = "auto"
> when composite USB audio device is detected. And explore if it could be
> moved to a more generic place.

I'm pretty sure this is done by some program, not automatically done by 
the kernel.

> Is there any module parameter (or some other means) by which,
> power/control (or deprecated power/level) will always be "auto", by
> default?

No, there isn't.  The power/control (or power/level) attribute has to 
be set by the user or a program.

Alan Stern


  reply	other threads:[~2019-08-02 16:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 14:49 About usb_new_device() API Mayuresh Kulkarni
2019-08-01 17:51 ` Alan Stern
2019-08-02 15:43   ` Mayuresh Kulkarni
2019-08-02 16:27     ` Alan Stern [this message]
2019-08-05  8:43       ` Mayuresh Kulkarni
2019-08-05 14:07         ` Alan Stern
2019-08-05 16:30           ` Mayuresh Kulkarni

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=Pine.LNX.4.44L0.1908021221120.1645-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=linux-usb@vger.kernel.org \
    --cc=mkulkarni@opensource.cirrus.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).